liquid_feedback_frontend
view 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 | 
 line source
     1 local initiative = param.get("initiative", "table")
     3 if not initiative then
     4   initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
     5 end
     7 app.html_title.title = initiative.name
     8 app.html_title.subtitle = _("Initiative ##{id}", { id = initiative.id })
    11 if request.get_json_request_slots() then
    12   execute.view{
    13     module = "initiative",
    14     view   = "show_partial",
    15     params = {
    16       initiative = initiative
    17     }
    18   }
    19 elseif
    20   config.user_tab_mode == "accordeon" or
    21   config.user_tab_mode == "accordeon_first_expanded" or
    22   config.user_tab_mode == "accordeon_all_expanded"
    23 then
    24   execute.view{
    25     module = "issue",
    26     view   = "show",
    27     id     = initiative.issue_id,
    28     params = {
    29       for_initiative_id = initiative.id
    30     }
    31   }
    32 else
    33   execute.view{
    34     module = "initiative",
    35     view   = "show_static",
    36     params = {
    37       initiative = initiative
    38     }
    39   }
    40 end
