liquid_feedback_frontend
diff app/main/initiative/_show.lua @ 280:808269b7f41c
More repositioning and optical enhancements
| author | bsw | 
|---|---|
| date | Thu Feb 16 14:08:55 2012 +0100 (2012-02-16) | 
| parents | fecd4c13054a | 
| children | c587d8762e62 | 
   line diff
1.1 --- a/app/main/initiative/_show.lua Thu Feb 16 14:08:43 2012 +0100 1.2 +++ b/app/main/initiative/_show.lua Thu Feb 16 14:08:55 2012 +0100 1.3 @@ -3,8 +3,10 @@ 1.4 1.5 local initiators_members_selector = initiative:get_reference_selector("initiating_members") 1.6 :add_field("initiator.accepted", "accepted") 1.7 - 1.8 -if not (initiator and initiator.accepted) then 1.9 + :add_order_by("member.name") 1.10 +if initiator and initiator.accepted then 1.11 + initiators_members_selector:add_where("initiator.accepted ISNULL OR initiator.accepted") 1.12 +else 1.13 initiators_members_selector:add_where("initiator.accepted") 1.14 end 1.15 1.16 @@ -34,18 +36,32 @@ 1.17 ui.tag{ 1.18 attr = { class = "initiator_names" }, 1.19 content = function() 1.20 - ui.tag{ content = _"by" } 1.21 - slot.put(" ") 1.22 for i, initiator in ipairs(initiators) do 1.23 - if i == #initiators and i > 1 then 1.24 - slot.put(" ", _"and", " ") 1.25 - elseif i > 1 then 1.26 - slot.put(", ") 1.27 - end 1.28 + slot.put(" ") 1.29 + ui.link{ 1.30 + content = function () 1.31 + execute.view{ 1.32 + module = "member_image", 1.33 + view = "_show", 1.34 + params = { 1.35 + member = initiator, 1.36 + image_type = "avatar", 1.37 + show_dummy = true, 1.38 + class = "micro_avatar", 1.39 + popup_text = text 1.40 + } 1.41 + } 1.42 + end, 1.43 + module = "member", view = "show", id = initiator.id 1.44 + } 1.45 + slot.put(" ") 1.46 ui.link{ 1.47 text = initiator.name, 1.48 module = "member", view = "show", id = initiator.id 1.49 } 1.50 + if not initiator.accepted then 1.51 + ui.tag{ attr = { title = _"Not accepted yet" }, content = "?" } 1.52 + end 1.53 end 1.54 end 1.55 } 1.56 @@ -219,6 +235,16 @@ 1.57 end 1.58 1.59 1.60 +if app.session.member_id then 1.61 + execute.view{ 1.62 + module = "supporter", 1.63 + view = "_show_box", 1.64 + params = { 1.65 + initiative = initiative 1.66 + } 1.67 + } 1.68 +end 1.69 + 1.70 local supporter 1.71 1.72 if app.session.member_id then 1.73 @@ -268,17 +294,6 @@ 1.74 end 1.75 end 1.76 1.77 - 1.78 -if app.session.member_id then 1.79 - execute.view{ 1.80 - module = "supporter", 1.81 - view = "_show_box", 1.82 - params = { 1.83 - initiative = initiative 1.84 - } 1.85 - } 1.86 -end 1.87 - 1.88 execute.view{ 1.89 module = "initiative", 1.90 view = "show_tab", 1.91 @@ -288,3 +303,8 @@ 1.92 } 1.93 } 1.94 1.95 +if initiative.issue.snapshot then 1.96 + ui.field.timestamp{ label = _"Last snapshot:", value = initiative.issue.snapshot } 1.97 +end 1.98 + 1.99 +