liquid_feedback_frontend

view app/main/draft/show.lua @ 951:99852ec8ee37

Put actions to the correct slot
author bsw
date Sat Dec 01 23:50:18 2012 +0100 (2012-12-01)
parents cc7650c7053f
children 701a5cf6b067
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 = "draft",
6 view = "_head",
7 params = { draft = draft}
8 }
10 slot.put_into("title", " · " .. _"History")
12 if source then
13 ui.actions(function()
14 ui.link{
15 content = _"Rendered",
16 module = "draft",
17 view = "show",
18 id = param.get_id(),
19 params = { source = false }
20 }
21 end
22 )
23 else
24 ui.actions(function()
25 ui.link{
26 content = _"Source",
27 module = "draft",
28 view = "show",
29 id = param.get_id(),
30 params = { source = true }
31 }
32 end
33 )
34 end
36 execute.view{
37 module = "draft",
38 view = "_show",
39 params = { draft = draft, source = source }
40 }

Impressum / About Us