liquid_feedback_frontend
view app/main/area/show.lua @ 277:bde068b37608
Dropdown boxes except of delegation box removed, optical enhancements and repositioning of elements
| author | bsw | 
|---|---|
| date | Mon Feb 13 00:16:42 2012 +0100 (2012-02-13) | 
| parents | d13b27a37ad5 | 
| children | b77e6a17ca77 | 
 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.tag{ content =  area.name }
    19   if not config.single_unit_id then
    20     slot.put(" · ")
    21     ui.link{
    22       content = area.unit.name,
    23       module = "area",
    24       view = "list",
    25       params = { unit_id = area.unit_id }
    26     }
    27   end
    30 end)
    32 ui.container{
    33   attr = { class = "vertical"},
    34   content = function()
    35     ui.field.text{ value = area.description }
    36   end
    37 }
    40 if app.session.member_id then
    41   execute.view{
    42     module = "membership",
    43     view = "_show_box",
    44     params = { area = area }
    45   }
    47   execute.view{
    48     module = "delegation",
    49     view = "_show_box",
    50     params = { area_id = area.id }
    51   }
    53   slot.select("actions", function()
    54     ui.link{
    55       content = function()
    56         ui.image{ static = "icons/16/folder_add.png" }
    57         slot.put(_"Create new issue")
    58       end,
    59       module = "initiative",
    60       view = "new",
    61       params = { area_id = area.id }
    62     }
    63   end)
    66 end
    68 if app.session.member then
    69   execute.view{
    70     module = "area",
    71     view = "show_tab",
    72     params = { area = area }
    73   }
    74 else
    75   execute.view{
    76     module = "issue",
    77     view = "_list",
    78     params = {
    79       issues_selector = area:get_reference_selector("issues"),
    80       filter = cgi.params["filter"],
    81       filter_voting = param.get("filter_voting"),
    82       for_area_list = true
    83     }
    84   }
    85 end
