liquid_feedback_frontend
annotate app/main/initiative/show.lua @ 127:4fb486bce608
add pageinator to issue view.
this "paginator" shows links to the prev/area/next issues that have the same
state then the current one. This helps a lot when inspecting new issues or voting.
The voting filter works a little bit different, as he also activtes the not_voted subfilter
because it is most likely only not voted issues are interessting to the user
this "paginator" shows links to the prev/area/next issues that have the same
state then the current one. This helps a lot when inspecting new issues or voting.
The voting filter works a little bit different, as he also activtes the not_voted subfilter
because it is most likely only not voted issues are interessting to the user
| author | Daniel Poelzleithner <poelzi@poelzi.org> | 
|---|---|
| date | Tue Oct 05 04:44:06 2010 +0200 (2010-10-05) | 
| parents | e0b091e2a0f3 | 
| children | fecd4c13054a | 
| rev | line source | 
|---|---|
| bsw/jbe@19 | 1 local initiative = param.get("initiative", "table") | 
| bsw/jbe@4 | 2 | 
| bsw/jbe@19 | 3 if not initiative then | 
| bsw/jbe@19 | 4 initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec() | 
| bsw@10 | 5 end | 
| bsw/jbe@0 | 6 | 
| jorges@113 | 7 app.html_title.title = initiative.name | 
| jorges@113 | 8 app.html_title.subtitle = _("Initiative ##{id}", { id = initiative.id }) | 
| jorges@113 | 9 | 
| jorges@113 | 10 | 
| bsw/jbe@19 | 11 if request.get_json_request_slots() then | 
| bsw/jbe@19 | 12 execute.view{ | 
| bsw/jbe@19 | 13 module = "initiative", | 
| bsw/jbe@19 | 14 view = "show_partial", | 
| bsw/jbe@19 | 15 params = { | 
| bsw/jbe@19 | 16 initiative = initiative | 
| bsw/jbe@6 | 17 } | 
| bsw/jbe@19 | 18 } | 
| bsw/jbe@19 | 19 elseif | 
| bsw/jbe@19 | 20 config.user_tab_mode == "accordeon" or | 
| bsw/jbe@19 | 21 config.user_tab_mode == "accordeon_first_expanded" or | 
| bsw/jbe@19 | 22 config.user_tab_mode == "accordeon_all_expanded" | 
| bsw/jbe@19 | 23 then | 
| bsw/jbe@19 | 24 execute.view{ | 
| bsw/jbe@19 | 25 module = "issue", | 
| bsw/jbe@19 | 26 view = "show", | 
| bsw/jbe@19 | 27 id = initiative.issue_id, | 
| bsw/jbe@19 | 28 params = { | 
| bsw/jbe@19 | 29 for_initiative_id = initiative.id | 
| bsw/jbe@6 | 30 } | 
| bsw/jbe@19 | 31 } | 
| bsw/jbe@19 | 32 else | 
| bsw/jbe@19 | 33 execute.view{ | 
| bsw/jbe@19 | 34 module = "initiative", | 
| bsw/jbe@19 | 35 view = "show_static", | 
| bsw/jbe@19 | 36 params = { | 
| bsw/jbe@19 | 37 initiative = initiative | 
| bsw/jbe@6 | 38 } | 
| bsw/jbe@19 | 39 } | 
| jorges@113 | 40 end |