liquid_feedback_frontend
view app/main/area/show.lua @ 271:d13b27a37ad5
Optical enhancements, some repositioning of ui elements
| author | bsw | 
|---|---|
| date | Tue Feb 07 22:30:48 2012 +0100 (2012-02-07) | 
| parents | d37dce888225 | 
| children | bde068b37608 | 
 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
    69 execute.view{
    70   module = "area",
    71   view = "show_tab",
    72   params = { area = area }
    73 }
