annotate app/main/issue/show.lua @ 306:a88f3ecb4606
Fixed redirect after setting unit delegation
 | author | 
 bsw | 
 | date | 
 Sun Feb 26 17:12:51 2012 +0100 (2012-02-26) | 
 | parents | 
 7196685f9dd7  | 
 | children | 
 63d6549cc00b  | 
 
 | rev | 
   line source | 
| 
bsw/jbe@0
 | 
     1 local issue = Issue:by_id(param.get_id())
 | 
| 
bsw/jbe@0
 | 
     2 
 | 
| 
jorges@106
 | 
     3 if not app.html_title.title then
 | 
| 
jorges@106
 | 
     4 	app.html_title.title = _("Issue ##{id}", { id = issue.id })
 | 
| 
jorges@106
 | 
     5 end
 | 
| 
jorges@103
 | 
     6 
 | 
| 
bsw/jbe@0
 | 
     7 execute.view{
 | 
| 
bsw/jbe@4
 | 
     8   module = "issue",
 | 
| 
bsw/jbe@4
 | 
     9   view = "_show_head",
 | 
| 
bsw/jbe@0
 | 
    10   params = { issue = issue }
 | 
| 
bsw/jbe@0
 | 
    11 }
 | 
| 
bsw/jbe@0
 | 
    12 
 | 
| 
bsw/jbe@19
 | 
    13 --[[
 | 
| 
bsw/jbe@19
 | 
    14 if not issue.fully_frozen and not issue.closed then
 | 
| 
bsw/jbe@19
 | 
    15   slot.select("actions", function()
 | 
| 
bsw/jbe@19
 | 
    16     ui.link{
 | 
| 
bsw/jbe@19
 | 
    17       content = function()
 | 
| 
bsw/jbe@19
 | 
    18         ui.image{ static = "icons/16/script_add.png" }
 | 
| 
bsw/jbe@19
 | 
    19         slot.put(_"Create alternative initiative")
 | 
| 
bsw/jbe@19
 | 
    20       end,
 | 
| 
bsw/jbe@19
 | 
    21       module = "initiative",
 | 
| 
bsw/jbe@19
 | 
    22       view = "new",
 | 
| 
bsw/jbe@19
 | 
    23       params = { issue_id = issue.id }
 | 
| 
bsw/jbe@19
 | 
    24     }
 | 
| 
bsw/jbe@19
 | 
    25   end)
 | 
| 
bsw/jbe@19
 | 
    26 end
 | 
| 
bsw/jbe@19
 | 
    27 --]]
 | 
| 
bsw/jbe@19
 | 
    28 
 | 
| 
bsw/jbe@4
 | 
    29 util.help("issue.show")
 | 
| 
bsw@2
 | 
    30 
 | 
| 
bsw/jbe@19
 | 
    31 if issue.state == "cancelled" then
 | 
| 
bsw/jbe@19
 | 
    32   local policy = issue.policy
 | 
| 
bsw/jbe@19
 | 
    33   ui.container{
 | 
| 
bsw/jbe@19
 | 
    34     attr = { class = "not_admitted_info" },
 | 
| 
bsw/jbe@19
 | 
    35     content = _("This issue has been cancelled. It failed the quorum of #{quorum}.", { quorum = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den) })
 | 
| 
bsw/jbe@19
 | 
    36   }
 | 
| 
bsw@16
 | 
    37 end
 | 
| 
bsw@16
 | 
    38 
 | 
| 
bsw/jbe@0
 | 
    39 
 | 
| 
bsw/jbe@19
 | 
    40 execute.view{
 | 
| 
bsw/jbe@19
 | 
    41   module = "issue",
 | 
| 
bsw/jbe@19
 | 
    42   view = "show_tab",
 | 
| 
bsw/jbe@19
 | 
    43   params = { issue = issue }
 | 
| 
bsw/jbe@19
 | 
    44 }
 | 
| 
bsw/jbe@19
 | 
    45 
 | 
| 
bsw/jbe@19
 | 
    46 if issue.snapshot then
 | 
| 
bsw/jbe@19
 | 
    47   slot.put("<br />")
 | 
| 
bsw/jbe@19
 | 
    48   ui.field.timestamp{ label = _"Last snapshot:", value = issue.snapshot }
 | 
| 
bsw/jbe@19
 | 
    49 end
 | 
| 
bsw/jbe@19
 | 
    50 
 |