liquid_feedback_frontend
view env/util/help.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 | 80c215dbf076 |
children | 0849be391140 |
line source
1 function util.help(id, title)
2 local setting_key = "liquidfeedback_frontend_hidden_help_" .. id
3 local setting = Setting:by_pk(app.session.member.id, setting_key)
4 if not setting then
5 ui.container{
6 attr = { class = "help help_visible" },
7 content = function()
8 ui.image{
9 attr = { class = "help_icon" },
10 static = "icons/16/help.png"
11 }
12 ui.container{
13 attr = { class = "help_actions" },
14 content = function()
15 ui.link{
16 text = _"Hide this help message",
17 module = "help",
18 action = "update",
19 params = {
20 help_ident = id,
21 hide = true
22 },
23 routing = {
24 default = {
25 mode = "redirect",
26 module = request.get_module(),
27 view = request.get_view(),
28 id = param.get_id_cgi(),
29 params = param.get_all_cgi()
30 }
31 }
32 }
33 end
34 }
35 local lang = locale.get("lang")
36 local basepath = request.get_app_basepath()
37 local file_name = basepath .. "/locale/help/" .. id .. "." .. lang .. ".txt"
38 local file = io.open(file_name)
39 if file ~= nil then
40 local help_text = file:read("*a")
41 if #help_text > 0 then
42 ui.container{
43 attr = { class = "wiki" },
44 content = function()
45 slot.put(format.wiki_text(help_text))
46 end
47 }
48 else
49 ui.field.text{ value = _("Empty help text: #{id}.#{lang}.txt", { id = id, lang = lang }) }
50 end
51 else
52 ui.field.text{ value = _("Missing help text: #{id}.#{lang}.txt", { id = id, lang = lang }) }
53 end
54 end
55 }
56 else
57 if util._hidden_helps == nil then
58 util._hidden_helps = {}
59 end
60 util._hidden_helps[#util._hidden_helps+1] = {
61 id = id,
62 title = title
63 }
64 end
65 end