liquid_feedback_frontend
view app/main/area/list.lua @ 276:f460555c9896
Code cleanup
| author | bsw | 
|---|---|
| date | Sun Feb 12 20:03:26 2012 +0100 (2012-02-12) | 
| parents | 7196685f9dd7 | 
| children | fecd4c13054a | 
 line source
     1 local unit_id = config.single_unit_id or param.get("unit_id", atom.integer)
     3 local areas_selector = Area:build_selector{ active = true, unit_id = unit_id }
     4 areas_selector:add_order_by("member_weight DESC")
     6 local unit = Unit:by_id(unit_id)
     9 if not config.single_unit_id then
    10   slot.put_into("title", unit.name)
    11 else
    12   slot.put_into("title", encode.html(config.app_title))
    13 end
    16 if not app.session.member_id and config.motd_public then
    17   local help_text = config.motd_public
    18   ui.container{
    19     attr = { class = "wiki motd" },
    20     content = function()
    21       slot.put(format.wiki_text(help_text))
    22     end
    23   }
    24 end
    26 util.help("area.list", _"Area list")
    28 if app.session.member_id then
    29   execute.view{
    30     module = "delegation",
    31     view = "_show_box",
    32     params = { unit_id = unit_id }
    33   }
    34 end
    37 execute.view{
    38   module = "area",
    39   view = "_list",
    40   params = { areas_selector = areas_selector }
    41 }
