liquid_feedback_frontend
diff app/main/report/index.lua @ 34:a851cc1d9903
Beautified report view for closed issues
author | bsw |
---|---|
date | Wed Feb 24 12:37:28 2010 +0100 (2010-02-24) |
parents | a6caaff47205 |
children |
line diff
1.1 --- a/app/main/report/index.lua Tue Feb 23 21:10:56 2010 +0100 1.2 +++ b/app/main/report/index.lua Wed Feb 24 12:37:28 2010 +0100 1.3 @@ -8,7 +8,6 @@ 1.4 }, 1.5 content = function() 1.6 ui.heading{ 1.7 - attr = { style = "background-color: #000; color: #fff;" }, 1.8 content = area.name 1.9 } 1.10 end 1.11 @@ -17,97 +16,136 @@ 1.12 1.13 slot.set_layout("report") 1.14 1.15 -ui.form{ 1.16 +slot.put("<br />") 1.17 + 1.18 +ui.container{ 1.19 attr = { 1.20 - style = " float: right;", 1.21 - onsubmit = "openElDirect(); return(false);" 1.22 + class = "nav", 1.23 + style = "text-align: center;" 1.24 }, 1.25 content = function() 1.26 - slot.put("#") 1.27 - ui.tag{ 1.28 - tag = "input", 1.29 - attr = { 1.30 - id = "input_issue", 1.31 - type = "text", 1.32 - style = "width: 4em;" 1.33 - } 1.34 + 1.35 + 1.36 + ui.container{ 1.37 + attr = { 1.38 + class = "left", 1.39 + }, 1.40 + content = function() 1.41 + ui.link{ 1.42 + external = "", 1.43 + attr = { 1.44 + onclick = "undo(); return(false);" 1.45 + }, 1.46 + content = function() 1.47 + ui.image{ static = "icons/16/cancel.png" } 1.48 + slot.put(" ") 1.49 + slot.put(_"Back") 1.50 + end 1.51 + } 1.52 + end 1.53 } 1.54 - slot.put(".") 1.55 - ui.tag{ 1.56 - tag = "input", 1.57 + 1.58 + ui.form{ 1.59 attr = { 1.60 - id = "input_initiative", 1.61 - type = "text", 1.62 - style = "width: 4em;" 1.63 - } 1.64 + style = "float: right;", 1.65 + onsubmit = "openElDirect(); return(false);" 1.66 + }, 1.67 + content = function() 1.68 + slot.put("#") 1.69 + ui.tag{ 1.70 + tag = "input", 1.71 + attr = { 1.72 + id = "input_issue", 1.73 + type = "text", 1.74 + style = "width: 4em;" 1.75 + } 1.76 + } 1.77 + slot.put(".") 1.78 + ui.tag{ 1.79 + tag = "input", 1.80 + attr = { 1.81 + id = "input_initiative", 1.82 + type = "text", 1.83 + style = "width: 4em;" 1.84 + } 1.85 + } 1.86 + slot.put(" ") 1.87 + ui.tag{ 1.88 + tag = "input", 1.89 + attr = { 1.90 + type = "submit", 1.91 + value = "OK", 1.92 + } 1.93 + } 1.94 + end 1.95 + } 1.96 + 1.97 + 1.98 + ui.link{ 1.99 + external = "", 1.100 + attr = { 1.101 + onclick = "openPrevIssue(); return(false);" 1.102 + }, 1.103 + content = function() 1.104 + ui.image{ static = "icons/16/resultset_previous_double.png" } 1.105 + slot.put(" ") 1.106 + slot.put(_"Previous issue") 1.107 + end 1.108 } 1.109 - slot.put(" ") 1.110 - ui.tag{ 1.111 - tag = "input", 1.112 + 1.113 + ui.link{ 1.114 + external = "", 1.115 + attr = { 1.116 + onclick = "openPrevInitiative(); return(false);" 1.117 + }, 1.118 + content = function() 1.119 + ui.image{ static = "icons/16/resultset_previous.png" } 1.120 + slot.put(" ") 1.121 + slot.put(_"Previous initiative") 1.122 + end 1.123 + } 1.124 + 1.125 + ui.link{ 1.126 + external = "", 1.127 attr = { 1.128 - type = "submit", 1.129 - value = "OK", 1.130 - } 1.131 + onclick = "openParent(); return(false);" 1.132 + }, 1.133 + content = function() 1.134 + ui.image{ static = "icons/16/go_up.png" } 1.135 + slot.put(" ") 1.136 + slot.put(_"Go up") 1.137 + end 1.138 + } 1.139 + 1.140 + ui.link{ 1.141 + external = "", 1.142 + attr = { 1.143 + onclick = "openNextInitiative(); return(false);" 1.144 + }, 1.145 + content = function() 1.146 + ui.image{ static = "icons/16/resultset_next.png" } 1.147 + slot.put(" ") 1.148 + slot.put(_"Next initiative") 1.149 + end 1.150 + } 1.151 + 1.152 + ui.link{ 1.153 + external = "", 1.154 + attr = { 1.155 + onclick = "openNextIssue(); return(false);" 1.156 + }, 1.157 + content = function() 1.158 + ui.image{ static = "icons/16/resultset_next_double.png" } 1.159 + slot.put(" ") 1.160 + slot.put(_"Next issue") 1.161 + end 1.162 } 1.163 end 1.164 } 1.165 1.166 -ui.link{ 1.167 - external = "", 1.168 - attr = { 1.169 - onclick = "undo(); return(false);" 1.170 - }, 1.171 - text = _"Back" 1.172 -} 1.173 - 1.174 -slot.put(" ") 1.175 - 1.176 -ui.link{ 1.177 - external = "", 1.178 - text = _"Areas" 1.179 -} 1.180 - 1.181 -slot.put(" ") 1.182 - 1.183 -ui.link{ 1.184 - external = "", 1.185 - attr = { 1.186 - onclick = "openPrevIssue(); return(false);" 1.187 - }, 1.188 - text = "<< " .. _"Previous issue" 1.189 -} 1.190 - 1.191 -slot.put(" ") 1.192 +slot.put("<br />") 1.193 1.194 -ui.link{ 1.195 - external = "", 1.196 - attr = { 1.197 - onclick = "openPrevInitiative(); return(false);" 1.198 - }, 1.199 - text = "< " .. _"Previous initiative" 1.200 -} 1.201 - 1.202 -slot.put(" ") 1.203 - 1.204 -ui.link{ 1.205 - external = "", 1.206 - attr = { 1.207 - onclick = "openNextInitiative(); return(false);" 1.208 - }, 1.209 - text = _"Next initiative" .. " >" 1.210 -} 1.211 - 1.212 -slot.put(" ") 1.213 - 1.214 -ui.link{ 1.215 - external = "", 1.216 - attr = { 1.217 - onclick = "openNextIssue(); return(false);" 1.218 - }, 1.219 - text = _"Next issue" .. " >>" 1.220 -} 1.221 - 1.222 -local areas = Area:new_selector():exec() 1.223 +local areas = Area:new_selector():add_order_by("name"):exec() 1.224 1.225 1.226 ui.container{ 1.227 @@ -116,7 +154,8 @@ 1.228 for i, area in ipairs(areas) do 1.229 link_area(area) 1.230 end 1.231 - end 1.232 + slot.put("<br /><br />") 1.233 + slot.put(_"This report can be saved (use 'save complete website') and used offline.") end 1.234 } 1.235 1.236 ui.script{ script = "openEl('areas')" } 1.237 @@ -127,4 +166,5 @@ 1.238 view = "area", 1.239 params = { area = area } 1.240 } 1.241 -end 1.242 \ No newline at end of file 1.243 +end 1.244 +