liquid_feedback_frontend
annotate app/main/initiative/new.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 | 72c5e0ee7c98 |
children | 88ac7798b562 |
rev | line source |
---|---|
bsw/jbe@0 | 1 local issue |
bsw/jbe@0 | 2 local area |
bsw/jbe@0 | 3 |
bsw/jbe@0 | 4 local issue_id = param.get("issue_id", atom.integer) |
bsw/jbe@0 | 5 if issue_id then |
bsw/jbe@0 | 6 issue = Issue:new_selector():add_where{"id=?",issue_id}:single_object_mode():exec() |
bsw/jbe@0 | 7 area = issue.area |
bsw/jbe@0 | 8 |
bsw/jbe@0 | 9 else |
bsw/jbe@0 | 10 local area_id = param.get("area_id", atom.integer) |
bsw/jbe@0 | 11 area = Area:new_selector():add_where{"id=?",area_id}:single_object_mode():exec() |
bsw/jbe@0 | 12 end |
bsw/jbe@0 | 13 |
bsw/jbe@0 | 14 if issue_id then |
bsw/jbe@19 | 15 slot.put_into("title", _"Add alternative initiative to issue") |
bsw/jbe@0 | 16 else |
bsw/jbe@0 | 17 slot.put_into("title", _"Create new issue") |
bsw/jbe@0 | 18 end |
bsw/jbe@0 | 19 |
bsw/jbe@0 | 20 ui.form{ |
bsw/jbe@0 | 21 module = "initiative", |
bsw/jbe@0 | 22 action = "create", |
bsw/jbe@0 | 23 params = { |
bsw/jbe@0 | 24 area_id = area.id, |
bsw/jbe@0 | 25 issue_id = issue and issue.id or nil |
bsw/jbe@0 | 26 }, |
bsw/jbe@0 | 27 attr = { class = "vertical" }, |
bsw/jbe@0 | 28 content = function() |
bsw/jbe@0 | 29 ui.field.text{ label = _"Area", value = area.name } |
bsw/jbe@0 | 30 if issue_id then |
bsw/jbe@0 | 31 ui.field.text{ label = _"Issue", value = issue_id } |
bsw/jbe@0 | 32 else |
bsw@10 | 33 tmp = { { id = -1, name = _"Please choose a policy" } } |
bsw@10 | 34 for i, allowed_policy in ipairs(area.allowed_policies) do |
bsw@10 | 35 tmp[#tmp+1] = allowed_policy |
bsw@10 | 36 end |
bsw/jbe@0 | 37 ui.field.select{ |
bsw/jbe@0 | 38 label = _"Policy", |
bsw/jbe@0 | 39 name = "policy_id", |
bsw@10 | 40 foreign_records = tmp, |
bsw/jbe@0 | 41 foreign_id = "id", |
bsw@7 | 42 foreign_name = "name", |
bsw@10 | 43 value = (area.default_policy or {}).id |
bsw/jbe@0 | 44 } |
bsw/jbe@0 | 45 end |
bsw/jbe@4 | 46 ui.field.text{ label = _"Name", name = "name" } |
bsw/jbe@4 | 47 ui.field.text{ label = _"Discussion URL", name = "discussion_url" } |
bsw/jbe@4 | 48 ui.field.select{ |
bsw/jbe@4 | 49 label = _"Wiki engine", |
bsw/jbe@4 | 50 name = "formatting_engine", |
bsw/jbe@4 | 51 foreign_records = { |
bsw/jbe@4 | 52 { id = "rocketwiki", name = "RocketWiki" }, |
bsw/jbe@4 | 53 { id = "compat", name = _"Traditional wiki syntax" } |
bsw/jbe@4 | 54 }, |
bsw/jbe@4 | 55 foreign_id = "id", |
bsw/jbe@4 | 56 foreign_name = "name" |
bsw/jbe@4 | 57 } |
bsw@2 | 58 ui.field.text{ label = _"Draft", name = "draft", multiline = true, attr = { style = "height: 50ex;" } } |
bsw/jbe@0 | 59 ui.submit{ text = _"Save" } |
bsw/jbe@0 | 60 end |
bsw/jbe@0 | 61 } |