liquid_feedback_frontend
view app/main/draft/show.lua @ 1248:c0fd12b97d65
Changes on notifications system, newsletter support added
author | bsw |
---|---|
date | Tue Apr 05 20:40:37 2016 +0200 (2016-04-05) |
parents | fede09736f2b |
children | 32cc544d5a5b |
line source
1 local draft = Draft:new_selector():add_where{ "id = ?", param.get_id() }:single_object_mode():exec()
2 local source = param.get("source", atom.boolean)
4 execute.view{
5 module = "issue",
6 view = "_head",
7 params = { issue = draft.initiative.issue }
8 }
10 ui.section( function()
12 ui.sectionHead( function()
13 ui.link{
14 module = "initiative", view = "show", id = draft.initiative.id,
15 content = function ()
16 ui.heading {
17 level = 1,
18 content = draft.initiative.display_name
19 }
20 end
21 }
22 ui.container { attr = { class = "right" }, content = function()
23 if source then
24 ui.link{
25 content = _"Rendered",
26 module = "draft",
27 view = "show",
28 id = param.get_id(),
29 params = { source = false }
30 }
31 else
32 ui.link{
33 content = _"Source",
34 module = "draft",
35 view = "show",
36 id = param.get_id(),
37 params = { source = true }
38 }
39 end
40 end }
41 ui.heading { level = 2, content = _("Draft revision #{id}", { id = draft.id } ) }
42 end)
44 if config.render_external_reference and config.render_external_reference.draft then
45 config.render_external_reference.draft(draft, function (callback)
46 ui.sectionRow(callback)
47 end)
48 end
50 ui.sectionRow( function()
52 execute.view{
53 module = "draft",
54 view = "_show",
55 params = { draft = draft, source = source }
56 }
57 end)
58 end)