liquid_feedback_frontend

diff app/main/suggestion/_list.lua @ 5:afd9f769c7ae

Version beta1

Final voting with Schulze-Method is now possible

Many bug fixes and code cleanup

Registration with invite codes

More sort and filter options

Seperated display of "supporters" and "potential supporters"

Optical changes

Flood limit / initiative contigent is now checked by frontend

Neccessary changes to access core beta11
author bsw/jbe
date Fri Dec 25 12:00:00 2009 +0100 (2009-12-25)
parents 80c215dbf076
children 00d1004545f1
line diff
     1.1 --- a/app/main/suggestion/_list.lua	Thu Dec 10 12:00:00 2009 +0100
     1.2 +++ b/app/main/suggestion/_list.lua	Fri Dec 25 12:00:00 2009 +0100
     1.3 @@ -105,60 +105,69 @@
     1.4                  if opinion then
     1.5                    degree = opinion.degree
     1.6                  end
     1.7 -                ui.link{
     1.8 -                  attr = { class = "action" .. (degree == -2 and " active_red2" or "") },
     1.9 -                  text = _"must not",
    1.10 -                  module = "opinion",
    1.11 -                  action = "update",
    1.12 -                  routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
    1.13 -                  params = {
    1.14 -                    suggestion_id = record.id,
    1.15 -                    degree = -2
    1.16 -                  }
    1.17 -                }
    1.18 -                ui.link{
    1.19 -                  attr = { class = "action" .. (degree == -1 and " active_red1" or "") },
    1.20 -                  text = _"should not",
    1.21 -                  module = "opinion",
    1.22 -                  action = "update",
    1.23 -                  routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
    1.24 -                  params = {
    1.25 -                    suggestion_id = record.id,
    1.26 -                    degree = -1
    1.27 -                  }
    1.28 -                }
    1.29 -                ui.link{
    1.30 -                  attr = { class = "action" .. (degree == nil and " active" or "") },
    1.31 -                  text = _"neutral",
    1.32 -                  module = "opinion",
    1.33 -                  action = "update",
    1.34 -                  routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
    1.35 -                  params = {
    1.36 -                    suggestion_id = record.id,
    1.37 -                    delete = true
    1.38 -                  }
    1.39 -                }
    1.40 -                ui.link{
    1.41 -                  attr = { class = "action" .. (degree == 1 and " active_green1" or "") },
    1.42 -                  text = _"should",
    1.43 -                  module = "opinion",
    1.44 -                  action = "update",
    1.45 -                  routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
    1.46 -                  params = {
    1.47 -                    suggestion_id = record.id,
    1.48 -                    degree = 1
    1.49 -                  }
    1.50 -                }
    1.51 -                ui.link{
    1.52 -                  attr = { class = "action" .. (degree == 2 and " active_green2" or "") },
    1.53 -                  text = _"must",
    1.54 -                  module = "opinion",
    1.55 -                  action = "update",
    1.56 -                  routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
    1.57 -                  params = {
    1.58 -                    suggestion_id = record.id,
    1.59 -                    degree = 2
    1.60 -                  }
    1.61 +                ui.container{
    1.62 +                  attr = { class = "suggestion_my_opinion" },
    1.63 +                  content = function()
    1.64 +                    ui.link{
    1.65 +                      attr = { class = "action" .. (degree == -2 and " active_red2" or "") },
    1.66 +                      text = _"must not",
    1.67 +                      module = "opinion",
    1.68 +                      action = "update",
    1.69 +                      routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
    1.70 +                      params = {
    1.71 +                        suggestion_id = record.id,
    1.72 +                        degree = -2
    1.73 +                      }
    1.74 +                    }
    1.75 +                    slot.put(" ")
    1.76 +                    ui.link{
    1.77 +                      attr = { class = "action" .. (degree == -1 and " active_red1" or "") },
    1.78 +                      text = _"should not",
    1.79 +                      module = "opinion",
    1.80 +                      action = "update",
    1.81 +                      routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
    1.82 +                      params = {
    1.83 +                        suggestion_id = record.id,
    1.84 +                        degree = -1
    1.85 +                      }
    1.86 +                    }
    1.87 +                    slot.put(" ")
    1.88 +                    ui.link{
    1.89 +                      attr = { class = "action" .. (degree == nil and " active" or "") },
    1.90 +                      text = _"neutral",
    1.91 +                      module = "opinion",
    1.92 +                      action = "update",
    1.93 +                      routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
    1.94 +                      params = {
    1.95 +                        suggestion_id = record.id,
    1.96 +                        delete = true
    1.97 +                      }
    1.98 +                    }
    1.99 +                    slot.put(" ")
   1.100 +                    ui.link{
   1.101 +                      attr = { class = "action" .. (degree == 1 and " active_green1" or "") },
   1.102 +                      text = _"should",
   1.103 +                      module = "opinion",
   1.104 +                      action = "update",
   1.105 +                      routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
   1.106 +                      params = {
   1.107 +                        suggestion_id = record.id,
   1.108 +                        degree = 1
   1.109 +                      }
   1.110 +                    }
   1.111 +                    slot.put(" ")
   1.112 +                    ui.link{
   1.113 +                      attr = { class = "action" .. (degree == 2 and " active_green2" or "") },
   1.114 +                      text = _"must",
   1.115 +                      module = "opinion",
   1.116 +                      action = "update",
   1.117 +                      routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } },
   1.118 +                      params = {
   1.119 +                        suggestion_id = record.id,
   1.120 +                        degree = 2
   1.121 +                      }
   1.122 +                    }
   1.123 +                  end
   1.124                  }
   1.125                end
   1.126              },

Impressum / About Us