liquid_feedback_frontend
view app/main/admin/unit_list.lua @ 276:f460555c9896
Code cleanup
| author | bsw | 
|---|---|
| date | Sun Feb 12 20:03:26 2012 +0100 (2012-02-12) | 
| parents | f42d16567c5d | 
| children | dbfde3c56790 | 
 line source
     1 local units = Unit:get_flattened_tree{ active = true }
     3 slot.put_into("title", _"Unit list")
     5 slot.select("actions", function()
     6   ui.link{
     7     attr = { class = { "admin_only" } },
     8     text = _"Create new unit",
     9     module = "admin",
    10     view = "unit_edit"
    11   }
    12 end)
    14 ui.list{
    15   records = units,
    16   columns = {
    17     {
    18       label = "name",
    19       content = function(unit)
    20         ui.link{ text = unit.name, module = "admin", view = "area_list", params = { unit_id = unit.id } }
    21       end 
    22     }
    23   }
    24 }
