liquid_feedback_frontend
diff app/main/issue/_show_head.lua @ 19:00d1004545f1
Dynamic interface using XMLHttpRequests, and many other changes
Bugfixes:
- Only allow voting on admitted initiatives
- Repaired issue search
- Don't display delegations for closed issues on member page
- Don't show revoke link in initiative, when issue is already half_frozen
- Localization for voting JavaScript
- Display author of suggestions
Disclosure of voting data after voting is finished:
- Possibility to inspect every ballot including preferences
- Show number of voters preferring one initiative to another initiative
Interface behaviour changes:
- Reversed default order of drafts
- Default order of suggestions changed
- Show new drafts of initiatives only once per day in timeline
Accessibility:
- Barrier-free voting implemented
- POST links are now accessible without JavaScript
- Changed gray for unsatisfied supporters in bar graph to a lighter gray
Other interface improvements:
- Optical enhancements
- Dynamic interface using XMLHttpRequests
- Show usage terms in about section
- Show own membership in area listing
- Show uninformed supporters greyed out and marked with yellow question mark
- Warning box in non-admitted initiatives
- When voted, don't display voting notice and change label of voting link
- Show object counts in more tabulator heads
- Enlarged member statement input field
Miscellaneous:
- Code cleanup
- Added README file containing installation instructions
- Use new WebMCP function ui.filters{...} instead of own ui.filter and ui.order functions
Bugfixes:
- Only allow voting on admitted initiatives
- Repaired issue search
- Don't display delegations for closed issues on member page
- Don't show revoke link in initiative, when issue is already half_frozen
- Localization for voting JavaScript
- Display author of suggestions
Disclosure of voting data after voting is finished:
- Possibility to inspect every ballot including preferences
- Show number of voters preferring one initiative to another initiative
Interface behaviour changes:
- Reversed default order of drafts
- Default order of suggestions changed
- Show new drafts of initiatives only once per day in timeline
Accessibility:
- Barrier-free voting implemented
- POST links are now accessible without JavaScript
- Changed gray for unsatisfied supporters in bar graph to a lighter gray
Other interface improvements:
- Optical enhancements
- Dynamic interface using XMLHttpRequests
- Show usage terms in about section
- Show own membership in area listing
- Show uninformed supporters greyed out and marked with yellow question mark
- Warning box in non-admitted initiatives
- When voted, don't display voting notice and change label of voting link
- Show object counts in more tabulator heads
- Enlarged member statement input field
Miscellaneous:
- Code cleanup
- Added README file containing installation instructions
- Use new WebMCP function ui.filters{...} instead of own ui.filter and ui.order functions
author | bsw/jbe |
---|---|
date | Sat Feb 20 22:10:31 2010 +0100 (2010-02-20) |
parents | 559c6be0e1e9 |
children | 0849be391140 |
line diff
1.1 --- a/app/main/issue/_show_head.lua Tue Feb 02 00:31:06 2010 +0100 1.2 +++ b/app/main/issue/_show_head.lua Sat Feb 20 22:10:31 2010 +0100 1.3 @@ -1,33 +1,47 @@ 1.4 local issue = param.get("issue", "table") 1.5 1.6 +local direct_voter = DirectVoter:by_pk(issue.id, app.session.member.id) 1.7 + 1.8 slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(issue.id) .. '.rss" />') 1.9 1.10 slot.select("path", function() 1.11 +end) 1.12 + 1.13 +slot.select("title", function() 1.14 ui.link{ 1.15 - content = _"Area '#{name}'":gsub("#{name}", issue.area.name), 1.16 + content = issue.area.name, 1.17 module = "area", 1.18 view = "show", 1.19 id = issue.area.id 1.20 } 1.21 -end) 1.22 - 1.23 -slot.select("title", function() 1.24 + slot.put(" · ") 1.25 ui.link{ 1.26 - content = _"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name), 1.27 + content = _("Issue ##{id}", { id = issue.id }), 1.28 module = "issue", 1.29 view = "show", 1.30 id = issue.id 1.31 } 1.32 + slot.put(" · ") 1.33 + ui.tag{ 1.34 + tag = "span", 1.35 + content = issue.state_name, 1.36 + } 1.37 end) 1.38 1.39 1.40 slot.select("actions", function() 1.41 1.42 if issue.state == 'voting' then 1.43 + local text 1.44 + if not direct_voter then 1.45 + text = _"Vote now" 1.46 + else 1.47 + text = _"Change vote" 1.48 + end 1.49 ui.link{ 1.50 content = function() 1.51 ui.image{ static = "icons/16/email_open.png" } 1.52 - slot.put(_"Vote now") 1.53 + slot.put(text) 1.54 end, 1.55 module = "vote", 1.56 view = "list", 1.57 @@ -78,7 +92,7 @@ 1.58 -- ui.twitter("http://example.com/t" .. tostring(issue.id)) 1.59 1.60 1.61 -if issue.state == 'voting' then 1.62 +if issue.state == 'voting' and not direct_voter then 1.63 ui.container{ 1.64 attr = { class = "voting_active_info" }, 1.65 content = function()