liquid_feedback_frontend
view app/main/issue/show.lua @ 104:a9ea02807b94
voting result also with percent values
| author | jorges | 
|---|---|
| date | Mon Sep 20 01:43:19 2010 +0200 (2010-09-20) | 
| parents | 7d0f4721d2f3 | 
| children | 9f3f74e82a65 | 
 line source
     1 local issue = Issue:by_id(param.get_id())
     3 app.html_title.title = _("Issue ##{id}", { id = issue.id })
     5 execute.view{
     6   module = "issue",
     7   view = "_show_head",
     8   params = { issue = issue }
     9 }
    11 --[[
    12 if not issue.fully_frozen and not issue.closed then
    13   slot.select("actions", function()
    14     ui.link{
    15       content = function()
    16         ui.image{ static = "icons/16/script_add.png" }
    17         slot.put(_"Create alternative initiative")
    18       end,
    19       module = "initiative",
    20       view = "new",
    21       params = { issue_id = issue.id }
    22     }
    23   end)
    24 end
    25 --]]
    27 util.help("issue.show")
    29 if issue.state == "cancelled" then
    30   local policy = issue.policy
    31   ui.container{
    32     attr = { class = "not_admitted_info" },
    33     content = _("This issue has been cancelled. It failed the quorum of #{quorum}.", { quorum = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den) })
    34   }
    35 end
    37 ui.container{
    38   attr = { class = "issue_initiative_list" },
    39   content = function()
    40     execute.view{
    41       module = "initiative",
    42       view = "_list",
    43       params = {
    44         initiatives_selector = issue:get_reference_selector("initiatives"),
    45         issue = issue,
    46         expandable = true,
    47         for_initiative_id = param.get("for_initiative_id", atom.number),
    48         show_for_issue = true
    49       }
    50     }
    51   end
    52 }
    54 slot.put("<br />")
    56 execute.view{
    57   module = "issue",
    58   view = "show_tab",
    59   params = { issue = issue }
    60 }
    62 if issue.snapshot then
    63   slot.put("<br />")
    64   ui.field.timestamp{ label = _"Last snapshot:", value = issue.snapshot }
    65 end
