liquid_feedback_frontend
diff app/main/lf2/_sidebar_issue.lua @ 218:7ea52c710503
Some little changes for next generation frontend
author | bsw |
---|---|
date | Sun Mar 13 16:53:33 2011 +0100 (2011-03-13) |
parents | 73dbc9e2bfd4 |
children |
line diff
1.1 --- a/app/main/lf2/_sidebar_issue.lua Sat Mar 12 19:22:50 2011 +0100 1.2 +++ b/app/main/lf2/_sidebar_issue.lua Sun Mar 13 16:53:33 2011 +0100 1.3 @@ -24,47 +24,40 @@ 1.4 ui.box{ class = "issue", content = function() 1.5 1.6 ui.box_row{ class = "issue_id head", content = function() ui.box_col{ class = "head", content = function() 1.7 - if interest then 1.8 - local text 1.9 - if issue.close then 1.10 - text = _"You were interested in this issue" 1.11 - else 1.12 - text = _"You are interested in this issue" 1.13 - end 1.14 - ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_star.png" } 1.15 - slot.put(" ") 1.16 - elseif delegating_interest then 1.17 - local text 1.18 - if issue.closed then 1.19 - text = _"Someone in your delegation chain was interested" 1.20 - else 1.21 - text = _"Someone in your delegation chain is interested" 1.22 - end 1.23 - ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_delegated_star.png" } 1.24 - slot.put(" ") 1.25 - end 1.26 ui.link{ 1.27 module = "lf2", view = "issue", id = issue.id, 1.28 content = _("Issue ##{id}", { id = issue.id }) 1.29 } 1.30 end } end } 1.31 1.32 - if #trustees > 1 then 1.33 - ui.box_row{ class = "delegation", content = function() ui.box_col{ content = function() 1.34 - execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 1.35 - end } end } 1.36 - end 1.37 - 1.38 if not issue.closed then 1.39 ui.box_row{ class = "interest", content = function() ui.box_col{ content = function() 1.40 if interest then 1.41 + local text 1.42 + if issue.close then 1.43 + text = _"You were interested" 1.44 + else 1.45 + text = _"You are interested" 1.46 + end 1.47 + ui.image{ static = "lf2/icon_star.png" } 1.48 + slot.put(" ") 1.49 + ui.tag{ content = text } 1.50 + slot.put(" · ") 1.51 ui.link{ 1.52 module = "interest", action = "update", params = { issue_id = issue.id, delete = true }, 1.53 routing = { default = { 1.54 mode = "redirect", module = "lf2", view = initiative_id and "initiative" or "issue", id = initiative_id or issue.id, 1.55 } }, 1.56 - content = _"Remove my interest" 1.57 + content = _"remove" 1.58 } 1.59 + elseif delegating_interest then 1.60 + local text 1.61 + if issue.closed then 1.62 + text = _"Someone in your delegation chain was interested" 1.63 + else 1.64 + text = _"Someone in your delegation chain is interested" 1.65 + end 1.66 + ui.image{ attr = { title = text, alt = text}, static = "lf2/icon_delegated_star.png" } 1.67 else 1.68 ui.link{ 1.69 module = "interest", action = "update", params = { issue_id = issue.id }, 1.70 @@ -77,18 +70,24 @@ 1.71 end } end } 1.72 end 1.73 1.74 + if #trustees > 1 then 1.75 + ui.box_row{ class = "delegation", content = function() ui.box_col{ content = function() 1.76 + execute.view{ module = "lf2", view = "_avatars", params = { members = trustees, arrows = true, size = "small", issue_id = issue.id } } 1.77 + end } end } 1.78 + end 1.79 + 1.80 if not issue.closed then 1.81 ui.box_row{ class = "interest", content = function() ui.box_col{ content = function() 1.82 if #trustees > 1 and trustees[1].scope_out == "issue" then 1.83 ui.link{ 1.84 module = "lf2", view = "delegation", params = { issue_id = issue.id, initiative_id = initiative_id }, 1.85 - content = _"Set issue delegation" 1.86 - } 1.87 + content = _"Change or remove delegation" 1.88 + } 1.89 else 1.90 ui.link{ 1.91 module = "lf2", view = "delegation", params = { issue_id = issue.id, initiative_id = initiative_id }, 1.92 - content = _"Change or remove delegation" 1.93 - } 1.94 + content = _"Set issue delegation" 1.95 + } 1.96 end 1.97 1.98 end } end }