liquid_feedback_frontend
annotate app/main/member/settings.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 | 0849be391140 | 
| rev | line source | 
|---|---|
| bsw@9 | 1 | 
| bsw@9 | 2 slot.put_into("title", _"Settings") | 
| bsw@9 | 3 | 
| bsw@9 | 4 slot.select("actions", function() | 
| bsw@9 | 5 ui.link{ | 
| bsw@9 | 6 content = function() | 
| bsw@9 | 7 ui.image{ static = "icons/16/cancel.png" } | 
| bsw@9 | 8 slot.put(_"Cancel") | 
| bsw@9 | 9 end, | 
| bsw@9 | 10 module = "index", | 
| bsw@9 | 11 view = "index" | 
| bsw@9 | 12 } | 
| bsw@10 | 13 | 
| bsw@10 | 14 local setting_key = "liquidfeedback_frontend_developer_features" | 
| bsw@10 | 15 local setting = Setting:by_pk(app.session.member.id, setting_key) | 
| bsw@10 | 16 | 
| bsw@10 | 17 if setting then | 
| bsw@10 | 18 ui.link{ | 
| bsw@10 | 19 content = function() | 
| bsw@10 | 20 ui.image{ static = "icons/16/wrench.png" } | 
| bsw@10 | 21 slot.put(_"Developer features") | 
| bsw@10 | 22 end, | 
| bsw@10 | 23 module = "member", | 
| bsw@10 | 24 view = "developer_settings" | 
| bsw@10 | 25 } | 
| bsw@10 | 26 end | 
| bsw@9 | 27 end) | 
| bsw@9 | 28 | 
| bsw/jbe@19 | 29 ui.heading{ content = _"Display settings" } | 
| bsw/jbe@19 | 30 util.help("member.settings.display", _"Display settings") | 
| bsw/jbe@19 | 31 | 
| bsw/jbe@19 | 32 ui.form{ | 
| bsw/jbe@19 | 33 attr = { class = "vertical" }, | 
| bsw/jbe@19 | 34 module = "member", | 
| bsw/jbe@19 | 35 action = "update_display", | 
| bsw/jbe@19 | 36 routing = { | 
| bsw/jbe@19 | 37 ok = { | 
| bsw/jbe@19 | 38 mode = "redirect", | 
| bsw/jbe@19 | 39 module = "index", | 
| bsw/jbe@19 | 40 view = "index" | 
| bsw/jbe@19 | 41 } | 
| bsw/jbe@19 | 42 }, | 
| bsw/jbe@19 | 43 content = function() | 
| bsw/jbe@19 | 44 ui.field.select{ | 
| bsw/jbe@19 | 45 label = _"Type of tabs", | 
| bsw/jbe@19 | 46 foreign_records = { | 
| bsw/jbe@19 | 47 { id = "tabs", name = _"Tabs" }, | 
| bsw/jbe@19 | 48 { id = "accordeon", name = _"Accordion (none expanded)" .. " === " .. _"EXPERIMENTAL FEATURE" .. " ===" }, | 
| bsw/jbe@19 | 49 { id = "accordeon_first_expanded", name = _"Accordion (first expanded)" .. " === " .. _"EXPERIMENTAL FEATURE" .. " ===" }, | 
| bsw/jbe@19 | 50 -- { id = "accordeon_all_expanded", name = _"Accordion (all expanded)" } | 
| bsw/jbe@19 | 51 }, | 
| bsw/jbe@19 | 52 foreign_id = "id", | 
| bsw/jbe@19 | 53 foreign_name = "name", | 
| bsw/jbe@19 | 54 name = "tab_mode", | 
| bsw/jbe@19 | 55 value = app.session.member:get_setting_value("tab_mode") | 
| bsw/jbe@19 | 56 } | 
| bsw/jbe@19 | 57 ui.field.select{ | 
| bsw/jbe@19 | 58 label = _"Number of initiatives to preview", | 
| bsw/jbe@19 | 59 foreign_records = { | 
| bsw/jbe@19 | 60 { id = 3, name = "3" }, | 
| bsw/jbe@19 | 61 { id = 4, name = "4" }, | 
| bsw/jbe@19 | 62 { id = 5, name = "5" }, | 
| bsw/jbe@19 | 63 { id = 6, name = "6" }, | 
| bsw/jbe@19 | 64 { id = 7, name = "7" }, | 
| bsw/jbe@19 | 65 { id = 8, name = "8" }, | 
| bsw/jbe@19 | 66 { id = 9, name = "9" }, | 
| bsw/jbe@19 | 67 { id = 10, name = "10" }, | 
| bsw/jbe@19 | 68 }, | 
| bsw/jbe@19 | 69 foreign_id = "id", | 
| bsw/jbe@19 | 70 foreign_name = "name", | 
| bsw/jbe@19 | 71 name = "initiatives_preview_limit", | 
| bsw/jbe@19 | 72 value = app.session.member:get_setting_value("initiatives_preview_limit") | 
| bsw/jbe@19 | 73 } | 
| bsw/jbe@19 | 74 ui.submit{ value = _"Change display settings" } | 
| bsw/jbe@19 | 75 end | 
| bsw/jbe@19 | 76 } | 
| bsw/jbe@19 | 77 | 
| bsw@9 | 78 ui.heading{ content = _"Change your name" } | 
| bsw@9 | 79 util.help("member.settings.name", _"Change name") | 
| bsw@9 | 80 | 
| bsw@9 | 81 ui.form{ | 
| bsw@9 | 82 attr = { class = "vertical" }, | 
| bsw@9 | 83 module = "member", | 
| bsw@9 | 84 action = "update_name", | 
| bsw@9 | 85 routing = { | 
| bsw@9 | 86 ok = { | 
| bsw@9 | 87 mode = "redirect", | 
| bsw@9 | 88 module = "index", | 
| bsw@9 | 89 view = "index" | 
| bsw@9 | 90 } | 
| bsw@9 | 91 }, | 
| bsw@9 | 92 content = function() | 
| bsw@9 | 93 ui.field.text{ label = _"Name", name = "name", value = app.session.member.name } | 
| bsw@9 | 94 ui.submit{ value = _"Change name" } | 
| bsw@9 | 95 end | 
| bsw@9 | 96 } | 
| bsw@9 | 97 | 
| bsw@9 | 98 ui.heading{ content = _"Change your login" } | 
| bsw@9 | 99 util.help("member.settings.login", _"Change login") | 
| bsw@9 | 100 | 
| bsw@9 | 101 ui.form{ | 
| bsw@9 | 102 attr = { class = "vertical" }, | 
| bsw@9 | 103 module = "member", | 
| bsw@9 | 104 action = "update_login", | 
| bsw@9 | 105 routing = { | 
| bsw@9 | 106 ok = { | 
| bsw@9 | 107 mode = "redirect", | 
| bsw@9 | 108 module = "index", | 
| bsw@9 | 109 view = "index" | 
| bsw@9 | 110 } | 
| bsw@9 | 111 }, | 
| bsw@9 | 112 content = function() | 
| bsw@9 | 113 ui.field.text{ label = _"Login", name = "login", value = app.session.member.login } | 
| bsw@9 | 114 ui.submit{ value = _"Change login" } | 
| bsw@9 | 115 end | 
| bsw@9 | 116 } | 
| bsw@9 | 117 | 
| bsw@9 | 118 ui.heading{ content = _"Change your password" } | 
| bsw@9 | 119 util.help("member.settings.password", _"Change password") | 
| bsw@9 | 120 | 
| bsw@9 | 121 ui.form{ | 
| bsw@9 | 122 attr = { class = "vertical" }, | 
| bsw@9 | 123 module = "member", | 
| bsw@9 | 124 action = "update_password", | 
| bsw@9 | 125 routing = { | 
| bsw@9 | 126 ok = { | 
| bsw@9 | 127 mode = "redirect", | 
| bsw@9 | 128 module = "index", | 
| bsw@9 | 129 view = "index" | 
| bsw@9 | 130 } | 
| bsw@9 | 131 }, | 
| bsw@9 | 132 content = function() | 
| bsw@9 | 133 ui.field.password{ label = _"Old password", name = "old_password" } | 
| bsw@9 | 134 ui.field.password{ label = _"New password", name = "new_password1" } | 
| bsw@9 | 135 ui.field.password{ label = _"Repeat new password", name = "new_password2" } | 
| bsw@9 | 136 ui.submit{ value = _"Change password" } | 
| bsw@9 | 137 end | 
| bsw@10 | 138 } |