liquid_feedback_frontend
view app/main/suggestion/show.lua @ 300:cb9ccdd024f2
Do not check voting rights for virtual delegation target 'abandon'
author | bsw |
---|---|
date | Sat Feb 25 22:29:33 2012 +0100 (2012-02-25) |
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 }