liquid_feedback_frontend

annotate 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
rev   line source
bsw/jbe@0 1 local suggestion = Suggestion:by_id(param.get_id())
bsw/jbe@0 2
poelzi@142 3 -- redirect to initiative if suggestion does not exist anymore
poelzi@142 4 if not suggestion then
poelzi@142 5 local initiative_id = param.get('initiative_id', atom.integer)
poelzi@142 6 if initiative_id then
poelzi@142 7 slot.reset_all{except={"notice", "error"}}
poelzi@142 8 request.redirect{
poelzi@142 9 module='initiative',
poelzi@142 10 view='show',
poelzi@142 11 id=initiative_id,
poelzi@142 12 params = { tab = "suggestions" }
poelzi@142 13 }
poelzi@142 14 else
poelzi@142 15 slot.put_into('error', _"Suggestion does not exist anymore")
poelzi@142 16 end
poelzi@142 17 return
poelzi@142 18 end
poelzi@142 19
poelzi@142 20
jorges@103 21 app.html_title.title = suggestion.name
jorges@103 22 app.html_title.subtitle = _("Suggestion ##{id}", { id = suggestion.id })
jorges@103 23
bsw/jbe@0 24 slot.put_into("title", encode.html(_"Suggestion for initiative: '#{name}'":gsub("#{name}", suggestion.initiative.name) ))
bsw/jbe@0 25
bsw/jbe@6 26 slot.select("actions", function()
bsw/jbe@6 27 ui.link{
bsw/jbe@6 28 content = function()
bsw/jbe@6 29 ui.image{ static = "icons/16/resultset_previous.png" }
bsw/jbe@6 30 slot.put(_"Back")
bsw/jbe@6 31 end,
bsw/jbe@6 32 module = "initiative",
bsw/jbe@6 33 view = "show",
bsw/jbe@6 34 id = suggestion.initiative.id,
bsw/jbe@19 35 params = { tab = "suggestions" }
bsw/jbe@6 36 }
bsw/jbe@6 37 end)
bsw/jbe@6 38
bsw/jbe@0 39 execute.view{
bsw/jbe@0 40 module = "suggestion",
bsw/jbe@19 41 view = "show_tab",
bsw/jbe@19 42 params = {
bsw/jbe@19 43 suggestion = suggestion
bsw/jbe@0 44 }
jorges@103 45 }

Impressum / About Us