liquid_feedback_frontend

annotate app/main/interest/_show_box.lua @ 310:b520779a23c4

First part of editing privileges for members
author bsw
date Mon Feb 27 16:18:45 2012 +0100 (2012-02-27)
parents b77e6a17ca77
children f8481330f4c2
rev   line source
bsw/jbe@0 1
bsw/jbe@0 2 local issue = param.get("issue", "table")
bsw/jbe@0 3
bsw/jbe@4 4 local interest = Interest:by_pk(issue.id, app.session.member.id)
bsw@173 5 local membership = Membership:by_pk(issue.area_id, app.session.member_id)
bsw/jbe@0 6
bsw@277 7 slot.select("interest", function()
bsw@277 8 if interest then
bsw/jbe@0 9
bsw/jbe@0 10 ui.container{
bsw/jbe@0 11 content = function()
bsw/jbe@4 12 ui.container{
bsw/jbe@4 13 attr = {
bsw@243 14 class = "head head_active",
bsw/jbe@4 15 },
bsw/jbe@4 16 content = function()
bsw/jbe@5 17 ui.image{
bsw/jbe@5 18 static = "icons/16/eye.png"
bsw/jbe@5 19 }
bsw/jbe@4 20 slot.put(_"Your are interested")
bsw/jbe@19 21
bsw/jbe@4 22 end
bsw/jbe@0 23 }
bsw@277 24
bsw@277 25 if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then
bsw@277 26 ui.link{
bsw@277 27 image = { static = "icons/16/cross.png" },
bsw@277 28 text = _"Withdraw interest",
bsw@277 29 module = "interest",
bsw@277 30 action = "update",
bsw@277 31 params = { issue_id = issue.id, delete = true },
bsw@277 32 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
bsw@277 33 }
bsw@277 34 end
bsw/jbe@0 35 end
bsw/jbe@4 36 }
bsw@281 37 elseif app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then
bsw@277 38 if not issue.closed and not issue.fully_frozen then
bsw@277 39 ui.link{
bsw@277 40 image = { static = "icons/16/user_add.png" },
bsw@277 41 text = _"Add my interest",
bsw@277 42 module = "interest",
bsw@277 43 action = "update",
bsw@277 44 params = { issue_id = issue.id },
bsw@277 45 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
bsw@277 46 }
bsw@277 47 end
bsw@16 48 end
bsw@277 49 end)

Impressum / About Us