liquid_feedback_frontend

changeset 1141:49a36575597e

Removed not used file
author bsw
date Sat Mar 21 14:26:04 2015 +0100 (2015-03-21)
parents b1b357fdb9df
children eb1786614c5f
files app/main/supporter/_show_box.lua
line diff
     1.1 --- a/app/main/supporter/_show_box.lua	Sat Mar 21 14:24:42 2015 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,124 +0,0 @@
     1.4 -local initiative = param.get("initiative", "table") or Initiative:by_id(param.get_id())
     1.5 -
     1.6 -
     1.7 -local initiative = param.get("initiative", "table")
     1.8 -local supporter = Supporter:by_pk(initiative.id, app.session.member.id)
     1.9 -
    1.10 -local partial = {
    1.11 -  routing = {
    1.12 -    default = {
    1.13 -      mode = "redirect",
    1.14 -      module = "initiative",
    1.15 -      view = "show_support",
    1.16 -      id = initiative.id
    1.17 -    }
    1.18 -  }
    1.19 -}
    1.20 -
    1.21 -local routing = {
    1.22 -  default = {
    1.23 -    mode = "redirect",
    1.24 -    module = request.get_module(),
    1.25 -    view = request.get_view(),
    1.26 -    id = param.get_id_cgi(),
    1.27 -    params = param.get_all_cgi()
    1.28 -  }
    1.29 -}
    1.30 -
    1.31 -if not initiative.issue.fully_frozen and not initiative.issue.closed then
    1.32 -  if supporter then
    1.33 -    if not supporter:has_critical_opinion() then
    1.34 -      ui.tag{ content = function()
    1.35 -        ui.image{
    1.36 -          static = "icons/16/thumb_up_green.png"
    1.37 -        }
    1.38 -        if initiative.issue.closed then
    1.39 -          slot.put(_"You were supporter")
    1.40 -        else
    1.41 -          slot.put(_"You are supporter")
    1.42 -        end
    1.43 -      end }
    1.44 -    else
    1.45 -      ui.tag{ attr = { class = "potential_supporter" }, content = function()
    1.46 -        ui.image{
    1.47 -          static = "icons/16/thumb_up.png"
    1.48 -        }
    1.49 -        if initiative.issue.closed then
    1.50 -          slot.put(_"You were potential supporter")
    1.51 -        else
    1.52 -          slot.put(_"You are potential supporter")
    1.53 -        end
    1.54 -      end }
    1.55 -    end
    1.56 -    slot.put(" (")
    1.57 -    ui.link{
    1.58 -      text    = _"Withdraw",
    1.59 -      module  = "initiative",
    1.60 -      action  = "remove_support",
    1.61 -      id      = initiative.id,
    1.62 -      routing = routing,
    1.63 -      partial = partial
    1.64 -    }
    1.65 -    slot.put(") ")
    1.66 -  elseif not initiative.revoked and app.session.member:has_voting_right_for_unit_id(initiative.issue.area.unit_id) then
    1.67 -    local params = param.get_all_cgi()
    1.68 -    params.dyn = nil
    1.69 -    ui.link{
    1.70 -      text    = _"Support this initiative",
    1.71 -      module  = "initiative",
    1.72 -      action  = "add_support",
    1.73 -      id      = initiative.id,
    1.74 -      routing = routing,
    1.75 -      partial = partial
    1.76 -    }
    1.77 -    slot.put(" ")
    1.78 -  end
    1.79 -end
    1.80 -
    1.81 -
    1.82 -
    1.83 -if not initiative.issue.closed then
    1.84 -  if not initiative.issue.fully_frozen and app.session.member:has_voting_right_for_unit_id(initiative.issue.area.unit_id) then
    1.85 -    slot.put(" · ")
    1.86 -  end
    1.87 -  local ignored_initiative = IgnoredInitiative:by_pk(app.session.member.id, initiative.id)
    1.88 -  if ignored_initiative then
    1.89 -    ui.tag{
    1.90 -      content = _"Ignore initiative"
    1.91 -    }
    1.92 -    slot.put(" (")
    1.93 -    ui.link{
    1.94 -      text   = _"Cancel [nullify]",
    1.95 -      module = "initiative",
    1.96 -      action = "update_ignore",
    1.97 -      id     = initiative.id,
    1.98 -      params = { delete = true },
    1.99 -      routing = {
   1.100 -        default = {
   1.101 -          mode = "redirect",
   1.102 -          module = request.get_module(),
   1.103 -          view = request.get_view(),
   1.104 -          id = param.get_id_cgi(),
   1.105 -          params = param.get_all_cgi()
   1.106 -        }
   1.107 -      }
   1.108 -    }
   1.109 -    slot.put(")")
   1.110 -  else
   1.111 -    ui.link{
   1.112 -      text    = _"Ignore initiative",
   1.113 -      module  = "initiative",
   1.114 -      action  = "update_ignore",
   1.115 -      id      = initiative.id,
   1.116 -      routing = {
   1.117 -        default = {
   1.118 -          mode = "redirect",
   1.119 -          module = request.get_module(),
   1.120 -          view = request.get_view(),
   1.121 -          id = param.get_id_cgi(),
   1.122 -          params = param.get_all_cgi()
   1.123 -        }
   1.124 -      }
   1.125 -    }
   1.126 -  end
   1.127 -end

Impressum / About Us