liquid_feedback_frontend
view app/main/admin/unit_list.lua @ 263:f42d16567c5d
Added admin section for units, added unit support to areas in admin section
author | bsw |
---|---|
date | Tue Feb 07 18:13:00 2012 +0100 (2012-02-07) |
parents | |
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 }