liquid_feedback_frontend
diff app/main/unit/_list.lua @ 1045:701a5cf6b067
Imported LiquidFeedback Frontend 3.0 branch
| author | bsw |
|---|---|
| date | Thu Jul 10 01:19:48 2014 +0200 (2014-07-10) |
| parents | ba310961ba34 |
| children | c18bee9e186e |
line diff
1.1 --- a/app/main/unit/_list.lua Thu Jul 10 01:02:43 2014 +0200 1.2 +++ b/app/main/unit/_list.lua Thu Jul 10 01:19:48 2014 +0200 1.3 @@ -1,3 +1,4 @@ 1.4 +local for_admin = param.get("for_admin", atom.boolean) 1.5 local units = Unit:get_flattened_tree{ active = true } 1.6 1.7 ui.container{ attr = { class = "box" }, content = function() 1.8 @@ -11,7 +12,11 @@ 1.9 for i = 1, unit.depth - 1 do 1.10 slot.put(" ") 1.11 end 1.12 - ui.link{ text = unit.name, module = "unit", view = "show", id = unit.id } 1.13 + if for_admin then 1.14 + ui.link{ text = unit.name, module = "admin", view = "unit_edit", id = unit.id } 1.15 + else 1.16 + ui.link{ text = unit.name, module = "unit", view = "show", id = unit.id } 1.17 + end 1.18 end 1.19 } 1.20 }