liquid_feedback_frontend

annotate 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
author Daniel Poelzleithner <poelzi@poelzi.org>
date Sun Sep 19 01:33:23 2010 +0200 (2010-09-19)
parents 0849be391140
children bf885faf3452
rev   line source
bsw/jbe@19 1 local initiative = param.get("initiative", "table")
bsw/jbe@19 2
bsw/jbe@19 3 if not initiative then
bsw/jbe@19 4 initiative = Initiative:new_selector():add_where{ "id = ?", param.get_id()}:single_object_mode():exec()
bsw/jbe@19 5 end
bsw/jbe@19 6
bsw/jbe@19 7 slot.select("actions", function()
bsw/jbe@19 8 ui.link{
bsw/jbe@19 9 content = function()
bsw/jbe@19 10 ui.image{ static = "icons/16/script.png" }
bsw/jbe@19 11 slot.put(_"Show alternative initiatives")
bsw/jbe@19 12 end,
bsw/jbe@19 13 module = "issue",
bsw/jbe@19 14 view = "show",
bsw/jbe@19 15 id = initiative.issue.id
bsw/jbe@19 16 }
bsw/jbe@19 17 end)
bsw/jbe@19 18
bsw/jbe@19 19 execute.view{
bsw/jbe@19 20 module = "issue",
bsw/jbe@19 21 view = "_show_head",
bsw/jbe@19 22 params = { issue = initiative.issue }
bsw/jbe@19 23 }
bsw/jbe@19 24
bsw/jbe@19 25 --slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(initiative.id) .. '.rss" />')
bsw/jbe@19 26
bsw@51 27 if app.session.member_id then
bsw@51 28 slot.select("actions", function()
bsw@51 29 if not initiative.issue.fully_frozen and not initiative.issue.closed then
bsw@51 30 ui.link{
bsw@51 31 image = { static = "icons/16/script_add.png" },
bsw@51 32 attr = { class = "action" },
bsw@51 33 text = _"Create alternative initiative",
bsw@51 34 module = "initiative",
bsw@51 35 view = "new",
bsw@51 36 params = { issue_id = initiative.issue.id }
bsw@51 37 }
bsw@51 38 end
bsw@51 39 end)
bsw@51 40 end
bsw/jbe@19 41
bsw@35 42 slot.put_into("sub_title", encode.html(_("Initiative: '#{name}'", { name = initiative.name }) ))
bsw/jbe@19 43
bsw/jbe@19 44 execute.view{
bsw/jbe@19 45 module = "initiative",
bsw/jbe@19 46 view = "show_partial",
bsw/jbe@19 47 params = {
bsw@23 48 initiative = initiative,
bsw@23 49 expanded = true
bsw/jbe@19 50 }
bsw@31 51 }

Impressum / About Us