liquid_feedback_frontend

view app/main/suggestion/show.lua @ 159:5d797c6706d5

implement quorum display

show the initiative quorum as a small 1px line in bargraph
allow to update your support on the diff page
better linked title in diff page
show absolute quorum numbers in detail pages of issue and initiative
author Daniel Poelzleithner <poelzi@poelzi.org>
date Sat Oct 09 03:42:48 2010 +0200 (2010-10-09)
parents 44ba79952610
children cc64a4fc6ab6
line source
1 local suggestion = Suggestion:by_id(param.get_id())
3 -- redirect to initiative if suggestion does not exist anymore
4 if not suggestion then
5 local initiative_id = param.get('initiative_id', atom.integer)
6 if initiative_id then
7 slot.reset_all{except={"notice", "error"}}
8 request.redirect{
9 module='initiative',
10 view='show',
11 id=initiative_id,
12 params = { tab = "suggestions" }
13 }
14 else
15 slot.put_into('error', _"Suggestion does not exist anymore")
16 end
17 return
18 end
21 app.html_title.title = suggestion.name
22 app.html_title.subtitle = _("Suggestion ##{id}", { id = suggestion.id })
24 slot.put_into("title", encode.html(_"Suggestion for initiative: '#{name}'":gsub("#{name}", suggestion.initiative.name) ))
26 slot.select("actions", function()
27 ui.link{
28 content = function()
29 ui.image{ static = "icons/16/resultset_previous.png" }
30 slot.put(_"Back")
31 end,
32 module = "initiative",
33 view = "show",
34 id = suggestion.initiative.id,
35 params = { tab = "suggestions" }
36 }
37 end)
39 execute.view{
40 module = "suggestion",
41 view = "show_tab",
42 params = {
43 suggestion = suggestion
44 }
45 }

Impressum / About Us