liquid_feedback_frontend

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/report/index.lua	Tue Feb 23 21:09:10 2010 +0100
     1.3 @@ -0,0 +1,130 @@
     1.4 +function link_area(area)
     1.5 +  ui.link{
     1.6 +    external = "",
     1.7 +    attr = {
     1.8 +      onclick =
     1.9 +        "openEl('area_" .. tostring(area.id) .. "');" ..
    1.10 +        "return(false);"
    1.11 +    },
    1.12 +    content = function()
    1.13 +      ui.heading{
    1.14 +        attr = { style = "background-color: #000; color: #fff;" },
    1.15 +        content = area.name
    1.16 +      }
    1.17 +    end
    1.18 +  }
    1.19 +end
    1.20 +
    1.21 +slot.set_layout("report")
    1.22 +
    1.23 +ui.form{
    1.24 +  attr = {
    1.25 +    style = " float: right;",
    1.26 +    onsubmit = "openElDirect(); return(false);"
    1.27 +  },
    1.28 +  content = function()
    1.29 +    slot.put("#")
    1.30 +    ui.tag{
    1.31 +      tag = "input",
    1.32 +      attr = {
    1.33 +        id = "input_issue",
    1.34 +        type = "text",
    1.35 +        style = "width: 4em;"
    1.36 +      }
    1.37 +    }
    1.38 +    slot.put(".")
    1.39 +    ui.tag{
    1.40 +      tag = "input",
    1.41 +      attr = {
    1.42 +        id = "input_initiative",
    1.43 +        type = "text",
    1.44 +        style = "width: 4em;"
    1.45 +      }
    1.46 +    }
    1.47 +    slot.put(" ")
    1.48 +    ui.tag{
    1.49 +      tag = "input",
    1.50 +      attr = {
    1.51 +        type = "submit",
    1.52 +        value = "OK",
    1.53 +      }
    1.54 +    }
    1.55 +  end
    1.56 +}
    1.57 +
    1.58 +ui.link{
    1.59 +  external = "",
    1.60 +  attr = {
    1.61 +    onclick = "undo(); return(false);"
    1.62 +  },
    1.63 +  text = _"Back"
    1.64 +}
    1.65 +
    1.66 +slot.put(" ")
    1.67 +
    1.68 +ui.link{
    1.69 +  external = "",
    1.70 +  text = _"Areas"
    1.71 +}
    1.72 +
    1.73 +slot.put(" ")
    1.74 +
    1.75 +ui.link{
    1.76 +  external = "",
    1.77 +  attr = {
    1.78 +    onclick = "openPrevIssue(); return(false);"
    1.79 +  },
    1.80 +  text = "<< " .. _"Previous issue"
    1.81 +}
    1.82 +
    1.83 +slot.put(" ")
    1.84 +
    1.85 +ui.link{
    1.86 +  external = "",
    1.87 +  attr = {
    1.88 +    onclick = "openPrevInitiative(); return(false);"
    1.89 +  },
    1.90 +  text = "< " .. _"Previous initiative"
    1.91 +}
    1.92 +
    1.93 +slot.put(" ")
    1.94 +
    1.95 +ui.link{
    1.96 +  external = "",
    1.97 +  attr = {
    1.98 +    onclick = "openNextInitiative(); return(false);"
    1.99 +  },
   1.100 +  text = _"Next initiative" .. " >"
   1.101 +}
   1.102 +
   1.103 +slot.put(" ")
   1.104 +
   1.105 +ui.link{
   1.106 +  external = "",
   1.107 +  attr = {
   1.108 +    onclick = "openNextIssue(); return(false);"
   1.109 +  },
   1.110 +  text = _"Next issue" .. " >>"
   1.111 +}
   1.112 +
   1.113 +local areas = Area:new_selector():exec()
   1.114 +
   1.115 +
   1.116 +ui.container{
   1.117 +  attr = { id = "areas" },
   1.118 +  content = function()
   1.119 +    for i, area in ipairs(areas) do
   1.120 +      link_area(area)
   1.121 +    end
   1.122 +  end
   1.123 +}
   1.124 +
   1.125 +ui.script{ script = "openEl('areas')" }
   1.126 +
   1.127 +for i, area in ipairs(areas) do
   1.128 +  execute.view{
   1.129 +    module = "report",
   1.130 +    view = "area",
   1.131 +    params = { area = area }
   1.132 +  }
   1.133 +end
   1.134 \ No newline at end of file

Impressum / About Us