liquid_feedback_frontend
diff app/main/issue/_list.lua @ 11:77d58efe99fd
Version beta7
Important security fixes:
- Added missing HTML encoding to postal address of member
- Link to discussion URL only if it starts with http(s)://
Other bugfixes:
- Fixed wrong display of 2nd level delegating voters for an initiative
- Do not display invited initiators as initiators while voting
- Added missing translation
New features:
- Public message of the day
- Both direct and indirect supporter count is shown in tab heads
- Support shown in initiative lists
Language chooser at the login page has been added (again)
Important security fixes:
- Added missing HTML encoding to postal address of member
- Link to discussion URL only if it starts with http(s)://
Other bugfixes:
- Fixed wrong display of 2nd level delegating voters for an initiative
- Do not display invited initiators as initiators while voting
- Added missing translation
New features:
- Public message of the day
- Both direct and indirect supporter count is shown in tab heads
- Support shown in initiative lists
Language chooser at the login page has been added (again)
author | bsw |
---|---|
date | Fri Jan 22 12:00:00 2010 +0100 (2010-01-22) |
parents | 72c5e0ee7c98 |
children | 00d1004545f1 |
line diff
1.1 --- a/app/main/issue/_list.lua Sun Jan 10 12:00:00 2010 +0100 1.2 +++ b/app/main/issue/_list.lua Fri Jan 22 12:00:00 2010 +0100 1.3 @@ -1,5 +1,9 @@ 1.4 local issues_selector = param.get("issues_selector", "table") 1.5 1.6 +issues_selector 1.7 + :left_join("interest", "_interest", { "_interest.issue_id = issue.id AND _interest.member_id = ?", app.session.member.id} ) 1.8 + :add_field("(_interest.member_id NOTNULL)", "is_interested") 1.9 + 1.10 local ui_filter = ui.filter 1.11 if param.get("filter", atom.boolean) == false then 1.12 ui_filter = function(args) args.content() end 1.13 @@ -150,6 +154,36 @@ 1.14 end 1.15 end 1.16 }, 1.17 + { 1.18 + type = "boolean", 1.19 + name = "supported", 1.20 + label = _"Supported", 1.21 + selector_modifier = function(selector, value) 1.22 + if value then 1.23 + selector:add_where({ "EXISTS (SELECT 1 FROM initiative JOIN supporter ON supporter.initiative_id = initiative.id AND supporter.member_id = ? LEFT JOIN opinion ON opinion.initiative_id = initiative.id AND opinion.member_id = ? AND ((opinion.degree = 2 AND NOT fulfilled) OR (opinion.degree = -2 AND fulfilled)) WHERE initiative.issue_id = issue.id AND opinion.member_id ISNULL LIMIT 1)", app.session.member.id, app.session.member.id }) 1.24 + end 1.25 + end 1.26 + }, 1.27 + { 1.28 + type = "boolean", 1.29 + name = "potentially_supported", 1.30 + label = _"Potential supported", 1.31 + selector_modifier = function(selector, value) 1.32 + if value then 1.33 + selector:add_where({ "EXISTS (SELECT 1 FROM initiative JOIN supporter ON supporter.initiative_id = initiative.id AND supporter.member_id = ? JOIN opinion ON opinion.initiative_id = initiative.id AND opinion.member_id = ? AND ((opinion.degree = 2 AND NOT fulfilled) OR (opinion.degree = -2 AND fulfilled)) WHERE initiative.issue_id = issue.id LIMIT 1)", app.session.member.id, app.session.member.id }) 1.34 + end 1.35 + end 1.36 + }, 1.37 + { 1.38 + type = "boolean", 1.39 + name = "initiated", 1.40 + label = _"Initiated", 1.41 + selector_modifier = function(selector, value) 1.42 + if value then 1.43 + selector:add_where({ "EXISTS (SELECT 1 FROM initiative JOIN initiator ON initiator.initiative_id = initiative.id AND initiator.member_id = ? WHERE initiative.issue_id = issue.id)", app.session.member.id }) 1.44 + end 1.45 + end 1.46 + }, 1.47 }, 1.48 content = function() 1.49 local ui_order = ui.order 1.50 @@ -215,6 +249,14 @@ 1.51 } 1.52 slot.put("<br />") 1.53 end 1.54 + if record.is_interested then 1.55 + local label = _"You are interested in this issue", 1.56 + ui.image{ 1.57 + attr = { alt = label, title = label }, 1.58 + static = "icons/16/eye.png" 1.59 + } 1.60 + slot.put(" ") 1.61 + end 1.62 ui.link{ 1.63 text = _("Issue ##{id}", { id = tostring(record.id) }), 1.64 module = "issue", 1.65 @@ -265,7 +307,6 @@ 1.66 issue = record, 1.67 initiatives_selector = initiatives_selector, 1.68 highlight_string = highlight_string, 1.69 - limit = 3, 1.70 per_page = param.get("initiatives_per_page", atom.number), 1.71 no_sort = param.get("initiatives_no_sort", atom.boolean) 1.72 }