annotate app/main/admin/cancel_issue.lua @ 1010:1f5adfe11006
Fixed syntax error in admin cancel issue
 | author | 
 bsw | 
 | date | 
 Sun Aug 11 22:04:54 2013 +0200 (2013-08-11) | 
 | parents | 
 5496a25105ae  | 
 | children | 
 a0b6357f4421  | 
 
 | rev | 
   line source | 
| 
bsw@1007
 | 
     1 ui.title(_"Cancel issue")
 | 
| 
bsw@1007
 | 
     2 
 | 
| 
bsw@1007
 | 
     3 ui.actions()
 | 
| 
bsw@1007
 | 
     4 
 | 
| 
bsw@1007
 | 
     5 local id = param.get("id")
 | 
| 
bsw@1007
 | 
     6 
 | 
| 
bsw@1007
 | 
     7 if not id then
 | 
| 
bsw@1007
 | 
     8   ui.form{
 | 
| 
bsw@1007
 | 
     9     module = "admin",
 | 
| 
bsw@1009
 | 
    10     view = "cancel_issue",
 | 
| 
bsw@1007
 | 
    11     content = function()
 | 
| 
bsw@1008
 | 
    12       ui.field.text{ label = _"Issue ID", name = "id" }
 | 
| 
bsw@1007
 | 
    13       ui.submit{ text = _"Cancel issue" }
 | 
| 
bsw@1007
 | 
    14     end
 | 
| 
bsw@1007
 | 
    15   }
 | 
| 
bsw@1007
 | 
    16 else
 | 
| 
bsw@1007
 | 
    17 
 | 
| 
bsw@1010
 | 
    18   local issue = Issue:by_id(id)
 | 
| 
bsw@1007
 | 
    19   issue:load("initiatives")
 | 
| 
bsw@1007
 | 
    20     
 | 
| 
bsw@1007
 | 
    21   execute.view{ module = "initiative", view = "_list", params = {
 | 
| 
bsw@1007
 | 
    22     issue = issue, initiatives = issue.initiatives
 | 
| 
bsw@1007
 | 
    23   } }
 | 
| 
bsw@1007
 | 
    24 
 | 
| 
bsw@1007
 | 
    25   ui.form{
 | 
| 
bsw@1007
 | 
    26     module = "admin",
 | 
| 
bsw@1009
 | 
    27     action = "cancel_issue",
 | 
| 
bsw@1007
 | 
    28     id = id,
 | 
| 
bsw@1007
 | 
    29     content = function()
 | 
| 
bsw@1008
 | 
    30       ui.field.text{ label = _"Administraive notice", name = "id" }
 | 
| 
bsw@1007
 | 
    31       ui.submit{ text = _"Cancel issue now" }
 | 
| 
bsw@1007
 | 
    32     end
 | 
| 
bsw@1007
 | 
    33   }
 | 
| 
bsw@1007
 | 
    34 
 | 
| 
bsw@1007
 | 
    35 end
 |