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