liquid_feedback_frontend
view app/main/initiative/show_static.lua @ 107:eeb167cf9dc4
add comand line admin tool
started a command line admin tool to help development.
currently supports setting login passwords and list users
started a command line admin tool to help development.
currently supports setting login passwords and list users
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Sun Sep 19 01:33:23 2010 +0200 (2010-09-19) |
parents | 0849be391140 |
children | bf885faf3452 |
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 slot.select("actions", function()
8 ui.link{
9 content = function()
10 ui.image{ static = "icons/16/script.png" }
11 slot.put(_"Show alternative initiatives")
12 end,
13 module = "issue",
14 view = "show",
15 id = initiative.issue.id
16 }
17 end)
19 execute.view{
20 module = "issue",
21 view = "_show_head",
22 params = { issue = initiative.issue }
23 }
25 --slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />')
27 if app.session.member_id then
28 slot.select("actions", function()
29 if not initiative.issue.fully_frozen and not initiative.issue.closed then
30 ui.link{
31 image = { static = "icons/16/script_add.png" },
32 attr = { class = "action" },
33 text = _"Create alternative initiative",
34 module = "initiative",
35 view = "new",
36 params = { issue_id = initiative.issue.id }
37 }
38 end
39 end)
40 end
42 slot.put_into("sub_title", encode.html(_("Initiative: '#{name}'", { name = initiative.name }) ))
44 execute.view{
45 module = "initiative",
46 view = "show_partial",
47 params = {
48 initiative = initiative,
49 expanded = true
50 }
51 }