liquid_feedback_frontend

diff app/main/member/_show_thumb.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 72c5e0ee7c98
children 0849be391140
line diff
     1.1 --- a/app/main/member/_show_thumb.lua	Tue Feb 02 00:31:06 2010 +0100
     1.2 +++ b/app/main/member/_show_thumb.lua	Sat Feb 20 22:10:31 2010 +0100
     1.3 @@ -17,12 +17,55 @@
     1.4    container_class = container_class .. " not_accepted"
     1.5  end
     1.6  
     1.7 +if member.is_informed == false then
     1.8 +  container_class = container_class .. " not_informed"
     1.9 +end
    1.10 +
    1.11  ui.container{
    1.12    attr = { class = container_class },
    1.13    content = function()
    1.14      ui.container{
    1.15        attr = { class = "flags" },
    1.16        content = function()
    1.17 +
    1.18 +        if member.grade then
    1.19 +          ui.link{
    1.20 +            module = "vote",
    1.21 +            view = "list",
    1.22 +            params = {
    1.23 +              issue_id = initiative.issue.id,
    1.24 +              member_id = member.id,
    1.25 +            },
    1.26 +            content = function()
    1.27 +              if member.grade > 0 then
    1.28 +                ui.image{
    1.29 +                  attr = { 
    1.30 +                    alt   = _"Voted yes",
    1.31 +                    title = _"Voted yes"
    1.32 +                  },
    1.33 +                  static = "icons/16/thumb_up_green.png"
    1.34 +                }
    1.35 +              elseif member.grade < 0 then
    1.36 +                ui.image{
    1.37 +                  attr = { 
    1.38 +                    alt   = _"Voted no",
    1.39 +                    title = _"Voted no"
    1.40 +                  },
    1.41 +                  static = "icons/16/thumb_down_red.png"
    1.42 +                }
    1.43 +              else
    1.44 +                ui.image{
    1.45 +                  attr = { 
    1.46 +                    alt   = _"Abstention",
    1.47 +                    title = _"Abstention"
    1.48 +                  },
    1.49 +                  static = "icons/16/bullet_yellow.png"
    1.50 +                }
    1.51 +              end
    1.52 +            end
    1.53 +          }
    1.54 +        end
    1.55 +
    1.56          local weight = 0
    1.57          if member.weight then
    1.58            weight = member.weight
    1.59 @@ -52,9 +95,8 @@
    1.60                issue_id = issue and issue.id or nil
    1.61              }
    1.62            }
    1.63 -        else
    1.64 -          slot.put("&nbsp;")
    1.65          end
    1.66 +
    1.67          if initiator and initiator.accepted then
    1.68            if member.accepted == nil then
    1.69              slot.put(_"Invited")
    1.70 @@ -62,37 +104,15 @@
    1.71              slot.put(_"Rejected")
    1.72            end
    1.73          end
    1.74 -        if member.grade then
    1.75 -          ui.container{
    1.76 -            content = function()
    1.77 -              if member.grade > 0 then
    1.78 -                ui.image{
    1.79 -                  attr = { 
    1.80 -                    alt   = _"Voted yes",
    1.81 -                    title = _"Voted yes"
    1.82 -                  },
    1.83 -                  static = "icons/16/thumb_up_green.png"
    1.84 -                }
    1.85 -              elseif member.grade < 0 then
    1.86 -                ui.image{
    1.87 -                  attr = { 
    1.88 -                    alt   = _"Voted no",
    1.89 -                    title = _"Voted no"
    1.90 -                  },
    1.91 -                  static = "icons/16/thumb_down_red.png"
    1.92 -                }
    1.93 -              else
    1.94 -                ui.image{
    1.95 -                  attr = { 
    1.96 -                    alt   = _"Abstention",
    1.97 -                    title = _"Abstention"
    1.98 -                  },
    1.99 -                  static = "icons/16/bullet_yellow.png"
   1.100 -                }
   1.101 -              end
   1.102 -            end
   1.103 +
   1.104 +        if member.is_informed == false then
   1.105 +          local text = _"Member has not approved latest draft"
   1.106 +          ui.image{
   1.107 +            attr = { alt = text, title = text },
   1.108 +            static = "icons/16/help_yellow.png"
   1.109            }
   1.110          end
   1.111 +
   1.112          if member.admin then
   1.113            ui.image{
   1.114              attr = { 
   1.115 @@ -102,6 +122,7 @@
   1.116              static = "icons/16/cog.png"
   1.117            }
   1.118          end
   1.119 +
   1.120          -- TODO performance
   1.121          local contact = Contact:by_pk(app.session.member.id, member.id)
   1.122          if contact then

Impressum / About Us