annotate app/main/admin/cancel_issue.lua @ 1712:c14da47b2357
Changed order of sidebar elements
 | author | 
 bsw | 
 | date | 
 Mon Sep 27 12:17:27 2021 +0200 (2021-09-27) | 
 | parents | 
 701a5cf6b067  | 
 | children | 
 72f4947b8217  | 
 
 | rev | 
   line source | 
| 
bsw@1007
 | 
     1 local id = param.get("id")
 | 
| 
bsw@1007
 | 
     2 
 | 
| 
bsw@1007
 | 
     3 if not id then
 | 
| 
bsw@1045
 | 
     4   return
 | 
| 
bsw@1045
 | 
     5 end
 | 
| 
bsw@1045
 | 
     6 
 | 
| 
bsw@1045
 | 
     7 local issue = Issue:by_id(id)
 | 
| 
bsw@1045
 | 
     8 issue:load_everything_for_member_id ( app.session.member_id )
 | 
| 
bsw@1045
 | 
     9 issue.initiatives:load_everything_for_member_id ( app.session.member_id )
 | 
| 
bsw@1045
 | 
    10 
 | 
| 
bsw@1045
 | 
    11 ui.titleAdmin(_"Cancel issue")
 | 
| 
bsw@1020
 | 
    12 
 | 
| 
bsw@1045
 | 
    13 ui.form{
 | 
| 
bsw@1045
 | 
    14   module = "admin",
 | 
| 
bsw@1045
 | 
    15   action = "cancel_issue",
 | 
| 
bsw@1045
 | 
    16   id = id,
 | 
| 
bsw@1045
 | 
    17   attr = { class = "vertical section" },
 | 
| 
bsw@1045
 | 
    18   content = function()
 | 
| 
bsw@1007
 | 
    19     
 | 
| 
bsw@1045
 | 
    20     ui.sectionHead( function()
 | 
| 
bsw@1045
 | 
    21       ui.heading { level = 1, content = _("Cancel issue ##{id}", { id = issue.id }) }
 | 
| 
bsw@1045
 | 
    22     end )
 | 
| 
bsw@1007
 | 
    23 
 | 
| 
bsw@1045
 | 
    24     ui.sectionRow( function()
 | 
| 
bsw@1045
 | 
    25       execute.view{ module = "initiative", view = "_list", params = {
 | 
| 
bsw@1045
 | 
    26         issue = issue,
 | 
| 
bsw@1045
 | 
    27         initiatives = issue.initiatives
 | 
| 
bsw@1045
 | 
    28       } }
 | 
| 
bsw@1045
 | 
    29     end )
 | 
| 
bsw@1045
 | 
    30     
 | 
| 
bsw@1045
 | 
    31     ui.sectionRow( function()
 | 
| 
bsw@1045
 | 
    32       ui.field.text{ label = _"public administrative notice:", name = "admin_notice", multiline = true }
 | 
| 
bsw@1045
 | 
    33       ui.submit{ text = _"cancel issue now" }
 | 
| 
bsw@1045
 | 
    34       slot.put(" ")
 | 
| 
bsw@1045
 | 
    35       ui.link { module = "admin", view = "index", content = "go back to safety" }
 | 
| 
bsw@1045
 | 
    36     end )
 | 
| 
bsw@1045
 | 
    37   end
 | 
| 
bsw@1045
 | 
    38 }
 | 
| 
bsw@1007
 | 
    39 
 |