liquid_feedback_frontend
diff app/main/issue/_show_head.lua @ 272:65a1f7a01e7b
More optical enhancements and repositioning of elements
author | bsw |
---|---|
date | Wed Feb 08 00:55:17 2012 +0100 (2012-02-08) |
parents | d13b27a37ad5 |
children | 7196685f9dd7 |
line diff
1.1 --- a/app/main/issue/_show_head.lua Tue Feb 07 22:30:48 2012 +0100 1.2 +++ b/app/main/issue/_show_head.lua Wed Feb 08 00:55:17 2012 +0100 1.3 @@ -45,16 +45,27 @@ 1.4 ui.tag{ 1.5 tag = "div", 1.6 content = function() 1.7 - ui.tag{ 1.8 - content = function() 1.9 - ui.link{ 1.10 - text = issue.policy.name, 1.11 - module = "policy", 1.12 - view = "show", 1.13 - id = issue.policy.id 1.14 - } 1.15 - end 1.16 + 1.17 + local initiative_count = issue:get_reference_selector("initiatives"):count() 1.18 + local text 1.19 + if initiative_count == 1 then 1.20 + text = _("1 initiative", { count = initiative_count }) 1.21 + else 1.22 + text = _("#{count} initiatives", { count = initiative_count }) 1.23 + end 1.24 + ui.link{ 1.25 + text = text, 1.26 + module = "issue", view = "show", id = issue.id 1.27 } 1.28 + 1.29 + slot.put(" · ") 1.30 + ui.link{ 1.31 + text = issue.policy.name, 1.32 + module = "policy", 1.33 + view = "show", 1.34 + id = issue.policy.id 1.35 + } 1.36 + 1.37 slot.put(" · ") 1.38 ui.tag{ content = issue.state_name } 1.39 1.40 @@ -250,6 +261,20 @@ 1.41 end 1.42 end) 1.43 1.44 +if app.session.member_id then 1.45 + slot.select("actions", function() 1.46 + if not issue.fully_frozen and not issue.closed then 1.47 + ui.link{ 1.48 + image = { static = "icons/16/script_add.png" }, 1.49 + attr = { class = "action" }, 1.50 + text = _"Create alternative initiative", 1.51 + module = "initiative", 1.52 + view = "new", 1.53 + params = { issue_id = issue.id } 1.54 + } 1.55 + end 1.56 + end) 1.57 +end 1.58 1.59 local issue = param.get("issue", "table") 1.60