liquid_feedback_frontend
view app/main/interest/_show_box.lua @ 273:7196685f9dd7
More optical enhancements, more repositioning
| author | bsw | 
|---|---|
| date | Wed Feb 08 18:49:22 2012 +0100 (2012-02-08) | 
| parents | ec86db506312 | 
| children | bde068b37608 | 
 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 if interest then
     8   slot.select("actions", function()
    10   ui.container{
    11     attr = { class = "interest vote_info"},
    12     content = function()
    13         ui.container{
    14           attr = { 
    15             class = "head head_active",
    16             onclick = "document.getElementById('interest_content').style.display = 'block';"
    17           },
    18           content = function()
    19             ui.image{
    20               static = "icons/16/eye.png"
    21             }
    22             slot.put(_"Your are interested")
    24             ui.image{
    25               static = "icons/16/dropdown.png"
    26             }
    27           end
    28         }
    30         ui.container{
    31           attr = { class = "content", id = "interest_content" },
    32           content = function()
    33             ui.container{
    34               attr = {
    35                 class = "close",
    36                 style = "cursor: pointer;",
    37                 onclick = "document.getElementById('interest_content').style.display = 'none';"
    38               },
    39               content = function()
    40                 ui.image{ static = "icons/16/cross.png" }
    41               end
    42             }
    43             if issue.state ~= "finished" and issue.state ~= "cancelled" and issue.state ~= "voting" then
    44               ui.link{
    45                 text    = _"Remove my interest",
    46                 module  = "interest",
    47                 action  = "update",
    48                 params  = { issue_id = issue.id, delete = true },
    49                 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
    50               }
    51               slot.put("<br />")
    52               slot.put("<br />")
    53             end
    54           end
    55         }
    56       end
    57     }
    58   end)
    59 else
    60   if not issue.closed and not issue.fully_frozen then
    61     ui.link{
    62       image   = { static = "icons/16/user_add.png" },
    63       text    = _"Add my interest",
    64       module  = "interest",
    65       action  = "update",
    66       params  = { issue_id = issue.id },
    67       routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
    68     }
    69   end
    70 end
