liquid_feedback_frontend
view app/main/area/show.lua @ 466:e15e8b15ccf5
Show all issues as default in issue list
| author | bsw | 
|---|---|
| date | Tue Mar 13 20:21:48 2012 +0100 (2012-03-13) | 
| parents | 22e4e26717ac | 
| children | 63d6549cc00b | 
 line source
     1 local area = Area:by_id(param.get_id())
     4 app.html_title.title = area.name
     5 app.html_title.subtitle = _("Area")
     7 util.help("area.show")
    10 if config.feature_rss_enabled then
    11   util.html_rss_head{ title = _"Initiatives in this area (last created first)", module = "initiative", view = "list_rss", params = { area_id = area.id } }
    12   util.html_rss_head{ title = _"Initiatives in this area (last updated first)", module = "initiative", view = "list_rss", params = { area_id = area.id } }
    13 end
    16 slot.select("title", function()
    17   ui.link{
    18     content =  area.name,
    19     module = "area", view = "show", id = area.id
    20   }
    22   if not config.single_unit_id then
    23     slot.put(" · ")
    24     ui.link{
    25       content = area.unit.name,
    26       module = "unit",
    27       view = "show",
    28       id = area.unit_id
    29     }
    30   end
    33 end)
    35 ui.container{
    36   attr = { class = "vertical"},
    37   content = function()
    38     ui.field.text{ value = area.description }
    39   end
    40 }
    43 if app.session.member_id then
    44   execute.view{
    45     module = "membership",
    46     view = "_show_box",
    47     params = { area = area }
    48   }
    50   execute.view{
    51     module = "delegation",
    52     view = "_show_box",
    53     params = { area_id = area.id }
    54   }
    56   if app.session.member:has_voting_right_for_unit_id(area.unit_id) then
    57     slot.select("actions", function()
    58       ui.link{
    59         content = function()
    60           ui.image{ static = "icons/16/folder_add.png" }
    61           slot.put(_"Create new issue")
    62         end,
    63         module = "initiative",
    64         view = "new",
    65         params = { area_id = area.id }
    66       }
    67     end)
    68   end
    71 end
    73 if app.session.member then
    74   execute.view{
    75     module = "area",
    76     view = "show_tab",
    77     params = { area = area }
    78   }
    79 else
    80   execute.view{
    81     module = "issue",
    82     view = "_list",
    83     params = {
    84       issues_selector = area:get_reference_selector("issues"),
    85       filter = cgi.params["filter"],
    86       filter_voting = param.get("filter_voting"),
    87       for_area_list = true
    88     }
    89   }
    90 end
