liquid_feedback_frontend

annotate app/main/issue/_show_head.lua @ 122:c7954c3a5bb2

setting <title> tag. fallback: take class="title"-contents
author jorges
date Mon Sep 20 01:18:03 2010 +0200 (2010-09-20)
parents bf885faf3452
children 4fb486bce608
rev   line source
bsw/jbe@4 1 local issue = param.get("issue", "table")
poelzi@111 2 local initiative = param.get("initiative", "table")
bsw/jbe@4 3
bsw@51 4 local direct_voter
bsw@51 5
bsw@51 6 if app.session.member_id then
bsw@51 7 direct_voter = DirectVoter:by_pk(issue.id, app.session.member.id)
bsw@51 8 end
bsw/jbe@19 9
bsw/jbe@52 10 if config.feature_rss_enabled then
bsw/jbe@52 11 util.html_rss_head{ title = _"Initiatives in this issue (last created first)", module = "initiative", view = "list_rss", params = { issue_id = issue.id } }
bsw/jbe@52 12 util.html_rss_head{ title = _"Initiatives in this issue (last updated first)", module = "initiative", view = "list_rss", params = { issue_id = issue.id, order = "last_updated" } }
bsw/jbe@52 13 end
bsw/jbe@4 14
bsw/jbe@4 15 slot.select("path", function()
bsw/jbe@19 16 end)
bsw/jbe@19 17
bsw/jbe@19 18 slot.select("title", function()
bsw/jbe@4 19 ui.link{
bsw/jbe@19 20 content = issue.area.name,
bsw/jbe@4 21 module = "area",
bsw/jbe@4 22 view = "show",
bsw/jbe@4 23 id = issue.area.id
bsw/jbe@4 24 }
bsw/jbe@19 25 slot.put(" &middot; ")
bsw/jbe@5 26 ui.link{
bsw/jbe@19 27 content = _("Issue ##{id}", { id = issue.id }),
bsw/jbe@5 28 module = "issue",
bsw/jbe@5 29 view = "show",
bsw/jbe@5 30 id = issue.id
bsw/jbe@5 31 }
bsw/jbe@19 32 slot.put(" &middot; ")
bsw/jbe@19 33 ui.tag{
bsw/jbe@19 34 tag = "span",
bsw/jbe@19 35 content = issue.state_name,
bsw/jbe@19 36 }
bsw/jbe@5 37 end)
bsw/jbe@5 38
bsw/jbe@4 39
bsw/jbe@4 40 slot.select("actions", function()
bsw/jbe@5 41
bsw@51 42 if app.session.member_id then
bsw@51 43
bsw@51 44 if issue.state == 'voting' then
bsw@51 45 local text
bsw@51 46 if not direct_voter then
bsw@51 47 text = _"Vote now"
bsw@51 48 else
bsw@51 49 text = _"Change vote"
bsw@51 50 end
bsw@51 51 ui.link{
bsw@51 52 content = function()
bsw@51 53 ui.image{ static = "icons/16/email_open.png" }
bsw@51 54 slot.put(text)
bsw@51 55 end,
bsw@51 56 module = "vote",
bsw@51 57 view = "list",
bsw@51 58 params = { issue_id = issue.id }
bsw@51 59 }
bsw/jbe@19 60 end
bsw/jbe@5 61
bsw/jbe@5 62 execute.view{
bsw@51 63 module = "interest",
bsw/jbe@5 64 view = "_show_box",
bsw@51 65 params = { issue = issue }
bsw/jbe@5 66 }
bsw@7 67
bsw@51 68 if not issue.closed then
bsw@51 69 execute.view{
bsw@51 70 module = "delegation",
bsw@51 71 view = "_show_box",
poelzi@111 72 params = { issue_id = issue.id,
poelzi@111 73 initiative_id = initiative and initiative.id or nil}
bsw@51 74 }
bsw@51 75 end
bsw@51 76
bsw@51 77 execute.view{
bsw@51 78 module = "issue",
bsw@51 79 view = "_show_vote_later_box",
bsw@51 80 params = { issue = issue }
bsw@51 81 }
bsw@51 82
bsw@51 83 end
bsw/jbe@4 84
bsw@10 85 if config.issue_discussion_url_func then
bsw@10 86 local url = config.issue_discussion_url_func(issue)
bsw@10 87 ui.link{
bsw@10 88 attr = { target = "_blank" },
bsw@10 89 external = url,
bsw@10 90 content = function()
bsw@10 91 ui.image{ static = "icons/16/comments.png" }
bsw@10 92 slot.put(_"Discussion on issue")
bsw@10 93 end,
bsw@10 94 }
bsw@10 95 end
bsw/jbe@4 96 end)
bsw/jbe@4 97
bsw/jbe@4 98
bsw/jbe@4 99 execute.view{
bsw/jbe@4 100 module = "issue",
bsw/jbe@4 101 view = "_show_box",
bsw/jbe@4 102 params = { issue = issue }
bsw/jbe@4 103 }
bsw/jbe@4 104
bsw/jbe@4 105 -- ui.twitter("http://example.com/t" .. tostring(issue.id))
bsw/jbe@6 106
bsw@60 107 if config.public_access_issue_head and not app.session.member_id then
bsw@60 108 config.public_access_issue_head(issue)
bsw@60 109 end
bsw/jbe@6 110
bsw@60 111 if app.session.member_id and issue.state == 'voting' and not direct_voter then
bsw/jbe@6 112 ui.container{
bsw/jbe@6 113 attr = { class = "voting_active_info" },
bsw/jbe@6 114 content = function()
bsw/jbe@6 115 slot.put(_"Voting for this issue is currently running!")
bsw/jbe@6 116 slot.put(" ")
bsw@51 117 if app.session.member_id then
bsw@51 118 ui.link{
bsw@51 119 content = function()
bsw@51 120 slot.put(_"Vote now")
bsw@51 121 end,
bsw@51 122 module = "vote",
bsw@51 123 view = "list",
bsw@51 124 params = { issue_id = issue.id }
bsw@51 125 }
bsw@51 126 end
bsw/jbe@6 127 end
bsw/jbe@6 128 }
bsw/jbe@6 129 slot.put("<br />")
bsw/jbe@6 130 end
bsw/jbe@6 131

Impressum / About Us