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@1833
|
13 ui.grid{ content = function()
|
bsw@1833
|
14
|
bsw@1833
|
15 ui.cell_main{ content = function()
|
bsw@1833
|
16 ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
|
bsw@1833
|
17 ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
|
bsw@1833
|
18 ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"public administrative notice:" }
|
bsw@1833
|
19 end }
|
bsw@1833
|
20 ui.container{ attr = { class = "mdl-card__content" }, content = function()
|
bsw@1007
|
21
|
bsw@1833
|
22 ui.form{
|
bsw@1833
|
23 module = "admin",
|
bsw@1833
|
24 action = "cancel_issue",
|
bsw@1833
|
25 id = id,
|
bsw@1833
|
26 attr = { class = "vertical section" },
|
bsw@1833
|
27 content = function()
|
bsw@1833
|
28
|
bsw@1833
|
29 ui.sectionRow( function()
|
bsw@1833
|
30 ui.field.text{ name = "admin_notice", multiline = true }
|
bsw@1833
|
31 ui.tag{
|
bsw@1833
|
32 tag = "input",
|
bsw@1833
|
33 attr = {
|
bsw@1833
|
34 type = "submit",
|
bsw@1833
|
35 class = "mdl-button mdl-js-button mdl-button--raised",
|
bsw@1833
|
36 value = _"cancel issue now"
|
bsw@1833
|
37 }
|
bsw@1833
|
38 }
|
bsw@1833
|
39 slot.put(" ")
|
bsw@1833
|
40 ui.link {
|
bsw@1833
|
41 attr = { class = "mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--underlined" },
|
bsw@1833
|
42 module = "admin", view = "index", content = _"do nothing"
|
bsw@1833
|
43 }
|
bsw@1833
|
44 end )
|
bsw@1833
|
45 end
|
bsw@1833
|
46 }
|
bsw@1833
|
47 end }
|
bsw@1833
|
48 end }
|
bsw@1833
|
49 end }
|
bsw@1833
|
50
|
bsw@1833
|
51 ui.cell_sidebar{ content = function()
|
bsw@1833
|
52
|
bsw@1833
|
53 ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
|
bsw@1833
|
54 ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
|
bsw@1833
|
55 ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _("Issue ##{id}", { id = issue.id }) }
|
bsw@1833
|
56 end }
|
bsw@1045
|
57 execute.view{ module = "initiative", view = "_list", params = {
|
bsw@1045
|
58 issue = issue,
|
bsw@1045
|
59 initiatives = issue.initiatives
|
bsw@1045
|
60 } }
|
bsw@1833
|
61 end }
|
bsw@1833
|
62 end }
|
bsw@1007
|
63
|
bsw@1833
|
64
|
bsw@1833
|
65 end }
|
bsw@1833
|
66
|