liquid_feedback_frontend
diff app/main/interest/_show_box.lua @ 277:bde068b37608
Dropdown boxes except of delegation box removed, optical enhancements and repositioning of elements
| author | bsw |
|---|---|
| date | Mon Feb 13 00:16:42 2012 +0100 (2012-02-13) |
| parents | ec86db506312 |
| children | b77e6a17ca77 |
line diff
1.1 --- a/app/main/interest/_show_box.lua Sun Feb 12 20:03:26 2012 +0100 1.2 +++ b/app/main/interest/_show_box.lua Mon Feb 13 00:16:42 2012 +0100 1.3 @@ -4,16 +4,14 @@ 1.4 local interest = Interest:by_pk(issue.id, app.session.member.id) 1.5 local membership = Membership:by_pk(issue.area_id, app.session.member_id) 1.6 1.7 -if interest then 1.8 - slot.select("actions", function() 1.9 +slot.select("interest", function() 1.10 + if interest then 1.11 1.12 ui.container{ 1.13 - attr = { class = "interest vote_info"}, 1.14 content = function() 1.15 ui.container{ 1.16 attr = { 1.17 class = "head head_active", 1.18 - onclick = "document.getElementById('interest_content').style.display = 'block';" 1.19 }, 1.20 content = function() 1.21 ui.image{ 1.22 @@ -21,50 +19,31 @@ 1.23 } 1.24 slot.put(_"Your are interested") 1.25 1.26 - ui.image{ 1.27 - static = "icons/16/dropdown.png" 1.28 - } 1.29 end 1.30 } 1.31 - 1.32 - ui.container{ 1.33 - attr = { class = "content", id = "interest_content" }, 1.34 - content = function() 1.35 - ui.container{ 1.36 - attr = { 1.37 - class = "close", 1.38 - style = "cursor: pointer;", 1.39 - onclick = "document.getElementById('interest_content').style.display = 'none';" 1.40 - }, 1.41 - content = function() 1.42 - ui.image{ static = "icons/16/cross.png" } 1.43 - end 1.44 - } 1.45 - if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then 1.46 - ui.link{ 1.47 - text = _"Remove my interest", 1.48 - module = "interest", 1.49 - action = "update", 1.50 - params = { issue_id = issue.id, delete = true }, 1.51 - routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } 1.52 - } 1.53 - slot.put("<br />") 1.54 - slot.put("<br />") 1.55 - end 1.56 - end 1.57 - } 1.58 + 1.59 + if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then 1.60 + ui.link{ 1.61 + image = { static = "icons/16/cross.png" }, 1.62 + text = _"Withdraw interest", 1.63 + module = "interest", 1.64 + action = "update", 1.65 + params = { issue_id = issue.id, delete = true }, 1.66 + routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } 1.67 + } 1.68 + end 1.69 end 1.70 } 1.71 - end) 1.72 -else 1.73 - if not issue.closed and not issue.fully_frozen then 1.74 - ui.link{ 1.75 - image = { static = "icons/16/user_add.png" }, 1.76 - text = _"Add my interest", 1.77 - module = "interest", 1.78 - action = "update", 1.79 - params = { issue_id = issue.id }, 1.80 - routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } 1.81 - } 1.82 + else 1.83 + if not issue.closed and not issue.fully_frozen then 1.84 + ui.link{ 1.85 + image = { static = "icons/16/user_add.png" }, 1.86 + text = _"Add my interest", 1.87 + module = "interest", 1.88 + action = "update", 1.89 + params = { issue_id = issue.id }, 1.90 + routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } } 1.91 + } 1.92 + end 1.93 end 1.94 -end 1.95 +end)