liquid_feedback_frontend

diff app/main/initiative/_initiators.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
author bsw/jbe
date Sat Feb 20 22:10:31 2010 +0100 (2010-02-20)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/initiative/_initiators.lua	Sat Feb 20 22:10:31 2010 +0100
     1.3 @@ -0,0 +1,58 @@
     1.4 +local initiative = param.get("initiative", "table")
     1.5 +local initiator = param.get("initiator", "table")
     1.6 +local initiators_members_selector = param.get("initiators_members_selector", "table")
     1.7 +
     1.8 +local initiator_count = initiators_members_selector:count()
     1.9 +
    1.10 +if initiator and initiator.accepted and not initiative.issue.fully_frozen and not initiative.issue.closed and not initiative.revoked then
    1.11 +  ui.link{
    1.12 +    attr = { class = "action" },
    1.13 +    content = function()
    1.14 +      ui.image{ static = "icons/16/user_add.png" }
    1.15 +      slot.put(_"Invite initiator")
    1.16 +    end,
    1.17 +    module = "initiative",
    1.18 +    view = "add_initiator",
    1.19 +    params = { initiative_id = initiative.id }
    1.20 +  }
    1.21 +  if initiator_count > 1 then
    1.22 +    ui.link{
    1.23 +      content = function()
    1.24 +        ui.image{ static = "icons/16/user_delete.png" }
    1.25 +        slot.put(_"Remove initiator")
    1.26 +      end,
    1.27 +      module = "initiative",
    1.28 +      view = "remove_initiator",
    1.29 +      params = { initiative_id = initiative.id }
    1.30 +    }
    1.31 +  end
    1.32 +end
    1.33 +if initiator and initiator.accepted == false then
    1.34 +    ui.link{
    1.35 +      image  = { static = "icons/16/user_delete.png" },
    1.36 +      text   = _"Cancel refuse of invitation",
    1.37 +      module = "initiative",
    1.38 +      action = "remove_initiator",
    1.39 +      params = {
    1.40 +        initiative_id = initiative.id,
    1.41 +        member_id = app.session.member.id
    1.42 +      },
    1.43 +      routing = {
    1.44 +        ok = {
    1.45 +          mode = "redirect",
    1.46 +          module = "initiative",
    1.47 +          view = "show",
    1.48 +          id = initiative.id
    1.49 +        }
    1.50 +      }
    1.51 +    }
    1.52 +end
    1.53 +
    1.54 +execute.view{
    1.55 +  module = "member",
    1.56 +  view = "_list",
    1.57 +  params = {
    1.58 +    members_selector = initiators_members_selector,
    1.59 +    initiator = initiator
    1.60 +  }
    1.61 +}

Impressum / About Us