liquid_feedback_frontend

view app/main/initiative/show_static.lua @ 271:d13b27a37ad5

Optical enhancements, some repositioning of ui elements
author bsw
date Tue Feb 07 22:30:48 2012 +0100 (2012-02-07)
parents 1f7b38584c0d
children 65a1f7a01e7b
line source
1 local initiative = param.get("initiative", "table")
3 if not initiative then
4 initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
5 end
7 execute.view{
8 module = "issue",
9 view = "_show_head",
10 params = { issue = initiative.issue,
11 initiative = initiative }
12 }
14 slot.select("actions", function()
15 ui.link{
16 content = function()
17 local count = Initiative:new_selector():add_where{ "issue_id = ?", initiative.issue.id}:count()-1
18 ui.image{ static = "icons/16/script.png" }
19 if count and count > 0 then
20 slot.put(_("Show alternative initiatives (#{count})", {count=count}))
21 else
22 slot.put(_"Show alternative initiatives")
23 end
24 end,
25 module = "issue",
26 view = "show",
27 id = initiative.issue.id
28 }
29 end)
31 --slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />')
33 if app.session.member_id then
34 slot.select("actions", function()
35 if not initiative.issue.fully_frozen and not initiative.issue.closed then
36 ui.link{
37 image = { static = "icons/16/script_add.png" },
38 attr = { class = "action" },
39 text = _"Create alternative initiative",
40 module = "initiative",
41 view = "new",
42 params = { issue_id = initiative.issue.id }
43 }
44 end
45 end)
46 end
48 slot.put_into("sub_title", encode.html(_("i#{id} #{name}", { id = initiative.id, name = initiative.name }) ))
50 execute.view{
51 module = "initiative",
52 view = "show_partial",
53 params = {
54 initiative = initiative,
55 expanded = true
56 }
57 }

Impressum / About Us