liquid_feedback_frontend
view app/main/unit/_list.lua @ 1530:94d6843fdc94
Add language chooser to profile page
author | bsw |
---|---|
date | Mon Sep 21 18:44:25 2020 +0200 (2020-09-21) |
parents | 2a0d86117d54 |
children |
line source
1 local for_admin = param.get("for_admin", atom.boolean)
2 local units = Unit:get_flattened_tree{}
4 ui.container{ attr = { class = "box" }, content = function()
6 ui.list{
7 attr = { class = "unit_list" },
8 records = units,
9 columns = {
10 {
11 content = function(unit)
12 for i = 1, unit.depth - 1 do
13 slot.put(" ")
14 end
15 if for_admin then
16 ui.link{ text = unit.name, module = "admin", view = "unit_edit", id = unit.id }
17 else
18 ui.link{ text = unit.name, module = "index", view = "index", params = { unit = unit.id } }
19 end
20 end
21 }
22 }
23 }
25 end }