annotate app/main/issue/show.lua @ 526:18cd8595459b
Fixes for public access
 | author | 
 bsw | 
 | date | 
 Fri May 18 19:21:45 2012 +0200 (2012-05-18) | 
 | parents | 
 63d6549cc00b  | 
 | children | 
 4cee33ad5e16  | 
 
 | 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@526
 | 
     7 slot.select("head", function()
 | 
| 
bsw@526
 | 
     8   execute.view{ module = "area", view = "_head", params = { area = issue.area } }
 | 
| 
bsw@526
 | 
     9 end)
 | 
| 
bsw/jbe@0
 | 
    10 
 | 
| 
bsw/jbe@4
 | 
    11 util.help("issue.show")
 | 
| 
bsw@2
 | 
    12 
 | 
| 
bsw/jbe@19
 | 
    13 if issue.state == "cancelled" then
 | 
| 
bsw/jbe@19
 | 
    14   local policy = issue.policy
 | 
| 
bsw/jbe@19
 | 
    15   ui.container{
 | 
| 
bsw/jbe@19
 | 
    16     attr = { class = "not_admitted_info" },
 | 
| 
bsw/jbe@19
 | 
    17     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
 | 
    18   }
 | 
| 
bsw@16
 | 
    19 end
 | 
| 
bsw@16
 | 
    20 
 | 
| 
bsw@525
 | 
    21 slot.select("head", function()
 | 
| 
bsw@525
 | 
    22   execute.view{ module = "issue", view = "_show", params = { issue = issue } }
 | 
| 
bsw@525
 | 
    23 end )
 | 
| 
bsw@525
 | 
    24 
 | 
| 
bsw/jbe@0
 | 
    25 
 | 
| 
bsw/jbe@19
 | 
    26 execute.view{
 | 
| 
bsw/jbe@19
 | 
    27   module = "issue",
 | 
| 
bsw/jbe@19
 | 
    28   view = "show_tab",
 | 
| 
bsw/jbe@19
 | 
    29   params = { issue = issue }
 | 
| 
bsw/jbe@19
 | 
    30 }
 | 
| 
bsw/jbe@19
 | 
    31 
 | 
| 
bsw/jbe@19
 | 
    32 if issue.snapshot then
 | 
| 
bsw/jbe@19
 | 
    33   slot.put("<br />")
 | 
| 
bsw/jbe@19
 | 
    34   ui.field.timestamp{ label = _"Last snapshot:", value = issue.snapshot }
 | 
| 
bsw/jbe@19
 | 
    35 end
 | 
| 
bsw/jbe@19
 | 
    36 
 |