liquid_feedback_frontend

diff app/main/suggestion/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
author bsw/jbe
date Sat Feb 20 22:10:31 2010 +0100 (2010-02-20)
parents
children 02e24b4dd21c
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/suggestion/new.lua	Sat Feb 20 22:10:31 2010 +0100
     1.3 @@ -0,0 +1,54 @@
     1.4 +local initiative_id = param.get("initiative_id")
     1.5 +
     1.6 +slot.put_into("title", _"Add new suggestion")
     1.7 +
     1.8 +slot.select("actions", function()
     1.9 +  ui.link{
    1.10 +    content = function()
    1.11 +        ui.image{ static = "icons/16/cancel.png" }
    1.12 +        slot.put(_"Cancel")
    1.13 +    end,
    1.14 +    module = "initiative",
    1.15 +    view = "show",
    1.16 +    id = initiative_id,
    1.17 +    params = { tab = "suggestions" }
    1.18 +  }
    1.19 +end)
    1.20 +
    1.21 +ui.form{
    1.22 +  module = "suggestion",
    1.23 +  action = "add",
    1.24 +  params = { initiative_id = initiative_id },
    1.25 +  routing = {
    1.26 +    default = {
    1.27 +      mode = "redirect",
    1.28 +      module = "initiative",
    1.29 +      view = "show",
    1.30 +      id = initiative_id,
    1.31 +      params = { tab = "suggestions" }
    1.32 +    }
    1.33 +  },
    1.34 +  attr = { class = "vertical" },
    1.35 +  content = function()
    1.36 +    local supported = Supporter:by_pk(initiative_id, app.session.member.id) and true or false
    1.37 +    if not supported then
    1.38 +      ui.field.text{
    1.39 +        attr = { class = "warning" },
    1.40 +        value = _"You are currently not supporting this initiative. By adding suggestions to this initiative you will automatically become a potential supporter."
    1.41 +      }
    1.42 +    end
    1.43 +    ui.field.text{ label = _"Title (80 chars max)",        name = "name" }
    1.44 +    ui.field.text{ label = _"Description", name = "description", multiline = true }
    1.45 +    ui.field.select{
    1.46 +      label = _"Degree",
    1.47 +      name = "degree",
    1.48 +      foreign_records = {
    1.49 +        { id =  1, name = _"should"},
    1.50 +        { id =  2, name = _"must"},
    1.51 +      },
    1.52 +      foreign_id = "id",
    1.53 +      foreign_name = "name"
    1.54 +    }
    1.55 +    ui.submit{ text = _"Commit suggestion" }
    1.56 +  end
    1.57 +}

Impressum / About Us