liquid_feedback_frontend
changeset 1832:3f677f526f55
Show tree depth in unit parent selector
author | bsw |
---|---|
date | Thu Feb 03 12:42:29 2022 +0100 (2022-02-03) |
parents | 36e7c36da131 |
children | 72f4947b8217 |
files | app/main/admin/unit_edit.lua |
line diff
1.1 --- a/app/main/admin/unit_edit.lua Thu Feb 03 12:39:01 2022 +0100 1.2 +++ b/app/main/admin/unit_edit.lua Thu Feb 03 12:42:29 2022 +0100 1.3 @@ -11,7 +11,12 @@ 1.4 } 1.5 1.6 for i, unit in ipairs(Unit:get_flattened_tree()) do 1.7 - units[#units+1] = { id = unit.id, name = unit.name } 1.8 + local name = "" 1.9 + for j = 2, unit.depth do 1.10 + name = name .. utf8.char(160).. utf8.char(160).. utf8.char(160).. utf8.char(160) 1.11 + end 1.12 + local name = name .. unit.name 1.13 + units[#units+1] = { id = unit.id, name = name } 1.14 end 1.15 1.16 ui.grid{ content = function()