liquid_feedback_frontend
diff app/main/event/_list.lua @ 525:63d6549cc00b
Delegation chain preview improved, better visualisation of current context, code cleanup
| author | bsw |
|---|---|
| date | Fri May 18 19:07:07 2012 +0200 (2012-05-18) |
| parents | d97be0729c53 |
| children | 8b74069bc1b9 |
line diff
1.1 --- a/app/main/event/_list.lua Tue Apr 17 00:07:04 2012 +0200 1.2 +++ b/app/main/event/_list.lua Fri May 18 19:07:07 2012 +0200 1.3 @@ -65,6 +65,59 @@ 1.4 elseif event.is_interested_by_delegation_to_member_id then 1.5 class = class .. " interested_by_delegation" 1.6 end 1.7 + 1.8 + ui.container{ attr = { class = "issue_policy_info" }, content = function() 1.9 + if (app.session.member_id or config.public_access == "pseudonym") and event.member_id then 1.10 + if app.session.member_id then 1.11 + ui.link{ 1.12 + content = function() 1.13 + execute.view{ 1.14 + module = "member_image", 1.15 + view = "_show", 1.16 + params = { 1.17 + member = event.member, 1.18 + image_type = "avatar", 1.19 + show_dummy = true, 1.20 + class = "micro_avatar", 1.21 + popup_text = text 1.22 + } 1.23 + } 1.24 + end, 1.25 + module = "member", view = "show", id = event.member_id 1.26 + } 1.27 + slot.put(" ") 1.28 + end 1.29 + ui.link{ 1.30 + text = event.member.name, 1.31 + module = "member", view = "show", id = event.member_id 1.32 + } 1.33 + slot.put(" · ") 1.34 + end 1.35 + local event_name = event.event_name 1.36 + local event_image 1.37 + if event.event == "issue_state_changed" then 1.38 + if event.state == "discussion" then 1.39 + event_name = _"Discussion started" 1.40 + event_image = "comments.png" 1.41 + elseif event.state == "verification" then 1.42 + event_name = _"Verification started" 1.43 + event_image = "lock.png" 1.44 + elseif event.state == "voting" then 1.45 + event_name = _"Voting started" 1.46 + event_image = "email_open.png" 1.47 + else 1.48 + event_name = event.state_name 1.49 + end 1.50 + if event_image then 1.51 + ui.image{ static = "icons/16/" .. event_image } 1.52 + slot.put(" ") 1.53 + end 1.54 + end 1.55 + ui.tag{ attr = { class = "event_name" }, content = event_name } 1.56 + slot.put(" · ") 1.57 + ui.tag{ attr = { class = "time" }, content = format.time(event.occurrence) } 1.58 + end } 1.59 + 1.60 ui.container{ attr = { class = class }, content = function() 1.61 1.62 ui.container { attr = { class = "issue_info" }, content = function() 1.63 @@ -147,57 +200,6 @@ 1.64 ui.tag{ content = event.issue.area.unit.name } 1.65 end } 1.66 1.67 - ui.container{ attr = { class = "issue_policy_info" }, content = function() 1.68 - if (app.session.member_id or config.public_access == "pseudonym") and event.member_id then 1.69 - if app.session.member_id then 1.70 - ui.link{ 1.71 - content = function() 1.72 - execute.view{ 1.73 - module = "member_image", 1.74 - view = "_show", 1.75 - params = { 1.76 - member = event.member, 1.77 - image_type = "avatar", 1.78 - show_dummy = true, 1.79 - class = "micro_avatar", 1.80 - popup_text = text 1.81 - } 1.82 - } 1.83 - end, 1.84 - module = "member", view = "show", id = event.member_id 1.85 - } 1.86 - slot.put(" ") 1.87 - end 1.88 - ui.link{ 1.89 - text = event.member.name, 1.90 - module = "member", view = "show", id = event.member_id 1.91 - } 1.92 - slot.put(" · ") 1.93 - end 1.94 - local event_name = event.event_name 1.95 - local event_image 1.96 - if event.event == "issue_state_changed" then 1.97 - if event.state == "discussion" then 1.98 - event_name = _"Discussion started" 1.99 - event_image = "comments.png" 1.100 - elseif event.state == "verification" then 1.101 - event_name = _"Verification started" 1.102 - event_image = "lock.png" 1.103 - elseif event.state == "voting" then 1.104 - event_name = _"Voting started" 1.105 - event_image = "email_open.png" 1.106 - else 1.107 - event_name = event.state_name 1.108 - end 1.109 - if event_image then 1.110 - ui.image{ static = "icons/16/" .. event_image } 1.111 - slot.put(" ") 1.112 - end 1.113 - end 1.114 - ui.tag{ attr = { class = "event_name" }, content = event_name } 1.115 - slot.put(" · ") 1.116 - ui.tag{ attr = { class = "time" }, content = format.time(event.occurrence) } 1.117 - end } 1.118 1.119 end } 1.120