liquid_feedback_frontend
diff app/main/delegation/_list.lua @ 599:5dc5f923797b
Show link to unit in unit delegation entries in delegation list
author | bsw |
---|---|
date | Sun Jun 24 22:38:03 2012 +0200 (2012-06-24) |
parents | e3613831cd1e |
children | 701a5cf6b067 |
line diff
1.1 --- a/app/main/delegation/_list.lua Sun Jun 24 22:30:29 2012 +0200 1.2 +++ b/app/main/delegation/_list.lua Sun Jun 24 22:38:03 2012 +0200 1.3 @@ -7,13 +7,21 @@ 1.4 attr = { class = "delegation_scope" }, 1.5 content = function() 1.6 local area 1.7 + local unit 1.8 if delegation.issue then 1.9 area = delegation.issue.area 1.10 + elseif delegation.area then 1.11 + area = delegation.area 1.12 else 1.13 - area = delegation.area 1.14 + unit = delegation.unit 1.15 end 1.16 - if not area then 1.17 - ui.field.text{ value = _"Unit delegation" } 1.18 + if unit then 1.19 + ui.link{ 1.20 + content = _"Unit '#{name}'":gsub("#{name}", unit.name), 1.21 + module = "unit", 1.22 + view = "show", 1.23 + id = unit.id 1.24 + } 1.25 end 1.26 if area then 1.27 ui.link{