liquid_feedback_frontend

annotate app/main/report/index.lua @ 33:1d213e9e3456

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

Impressum / About Us