liquid_feedback_frontend

view app/main/report/index.lua @ 31:a6caaff47205

Report view for all closed issues added
author bsw
date Tue Feb 23 21:09:10 2010 +0100 (2010-02-23)
parents
children a851cc1d9903
line source
1 function link_area(area)
2 ui.link{
3 external = "",
4 attr = {
5 onclick =
6 "openEl('area_" .. tostring(area.id) .. "');" ..
7 "return(false);"
8 },
9 content = function()
10 ui.heading{
11 attr = { style = "background-color: #000; color: #fff;" },
12 content = area.name
13 }
14 end
15 }
16 end
18 slot.set_layout("report")
20 ui.form{
21 attr = {
22 style = " float: right;",
23 onsubmit = "openElDirect(); return(false);"
24 },
25 content = function()
26 slot.put("#")
27 ui.tag{
28 tag = "input",
29 attr = {
30 id = "input_issue",
31 type = "text",
32 style = "width: 4em;"
33 }
34 }
35 slot.put(".")
36 ui.tag{
37 tag = "input",
38 attr = {
39 id = "input_initiative",
40 type = "text",
41 style = "width: 4em;"
42 }
43 }
44 slot.put(" ")
45 ui.tag{
46 tag = "input",
47 attr = {
48 type = "submit",
49 value = "OK",
50 }
51 }
52 end
53 }
55 ui.link{
56 external = "",
57 attr = {
58 onclick = "undo(); return(false);"
59 },
60 text = _"Back"
61 }
63 slot.put(" ")
65 ui.link{
66 external = "",
67 text = _"Areas"
68 }
70 slot.put(" ")
72 ui.link{
73 external = "",
74 attr = {
75 onclick = "openPrevIssue(); return(false);"
76 },
77 text = "<< " .. _"Previous issue"
78 }
80 slot.put(" ")
82 ui.link{
83 external = "",
84 attr = {
85 onclick = "openPrevInitiative(); return(false);"
86 },
87 text = "< " .. _"Previous initiative"
88 }
90 slot.put(" ")
92 ui.link{
93 external = "",
94 attr = {
95 onclick = "openNextInitiative(); return(false);"
96 },
97 text = _"Next initiative" .. " >"
98 }
100 slot.put(" ")
102 ui.link{
103 external = "",
104 attr = {
105 onclick = "openNextIssue(); return(false);"
106 },
107 text = _"Next issue" .. " >>"
108 }
110 local areas = Area:new_selector():exec()
113 ui.container{
114 attr = { id = "areas" },
115 content = function()
116 for i, area in ipairs(areas) do
117 link_area(area)
118 end
119 end
120 }
122 ui.script{ script = "openEl('areas')" }
124 for i, area in ipairs(areas) do
125 execute.view{
126 module = "report",
127 view = "area",
128 params = { area = area }
129 }
130 end

Impressum / About Us