liquid_feedback_frontend

diff app/main/index/_sidebar_units.lua @ 1309:32cc544d5a5b

Cumulative patch for upcoming frontend version 4
author bsw/jbe
date Sun Jul 15 14:07:29 2018 +0200 (2018-07-15)
parents bb10f001443e
children
line diff
     1.1 --- a/app/main/index/_sidebar_units.lua	Thu Jun 23 03:30:57 2016 +0200
     1.2 +++ b/app/main/index/_sidebar_units.lua	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -1,3 +1,5 @@
     1.4 +if true then return end
     1.5 +
     1.6  local member = param.get ( "member", "table" )
     1.7  local units
     1.8  if member then
     1.9 @@ -30,14 +32,6 @@
    1.10        :add_where{ "area.active" }
    1.11        :add_order_by("area.name")
    1.12  
    1.13 -    if member then
    1.14 -      areas_selector:left_join ( 
    1.15 -        "membership", nil, 
    1.16 -        { "membership.area_id = area.id AND membership.member_id = ?", member.id } 
    1.17 -      )
    1.18 -      areas_selector:add_field("membership.member_id NOTNULL", "subscribed", { "grouped" })
    1.19 -    end
    1.20 -
    1.21      local areas = areas_selector:exec()
    1.22      if member then
    1.23        areas:load_delegation_info_once_for_member_id(member.id)
    1.24 @@ -78,21 +72,9 @@
    1.25        
    1.26        ui.tag { tag = "div", attr = { class = "areas areas-" .. unit.id }, content = function ()
    1.27        
    1.28 -        local any_subscribed = false
    1.29 -        local subscribed_count = 0
    1.30          for i, area in ipairs(areas) do
    1.31  
    1.32 -          local class = "sidebarRow"
    1.33 -          class = class .. (not area.subscribed and " disabled" or "")
    1.34 -          
    1.35 -          ui.tag { tag = "div", attr = { class = class }, content = function ()
    1.36 -            
    1.37 -            if area.subscribed then
    1.38 -              local text = _"subscribed"
    1.39 -              ui.image { attr = { class = "icon16 star", alt = text, title = text }, static = "icons/48/star.png" }
    1.40 -              any_subscribed = true
    1.41 -              subscribed_count = subscribed_count +1
    1.42 -            end
    1.43 +          ui.tag { tag = "div", attr = { class = "sidebarRow" }, content = function ()
    1.44              
    1.45              if member then
    1.46                local delegation = Delegation:by_pk(member.id, nil, area.id, nil)
    1.47 @@ -121,31 +103,6 @@
    1.48              
    1.49            end }
    1.50          end
    1.51 -        if subscribed_count < #areas then
    1.52 -          local text 
    1.53 -          if any_subscribed then
    1.54 -            text = _"show other subject areas"
    1.55 -          else
    1.56 -            text = _"show subject areas"
    1.57 -          end
    1.58 -          ui.script{ script = "$('.areas-" .. unit.id .. "').addClass('folded');" }
    1.59 -          ui.tag { tag = "div", attr = { class = "sidebarRow moreLink whenfolded" }, content = function ()
    1.60 -            ui.link {
    1.61 -              attr = { 
    1.62 -                onclick = "$('.areas-" .. unit.id .. "').removeClass('folded'); return false;"
    1.63 -              },
    1.64 -              text = text
    1.65 -            }
    1.66 -          end }
    1.67 -          ui.tag { tag = "div", attr = { class = "sidebarRow moreLink whenunfolded" }, content = function ()
    1.68 -            ui.link {
    1.69 -              attr = { 
    1.70 -                onclick = "$('.areas-" .. unit.id .. "').addClass('folded'); return false;"
    1.71 -              },
    1.72 -              text = _"collapse subject areas"
    1.73 -            }
    1.74 -          end }
    1.75 -        end
    1.76        end }
    1.77      end 
    1.78    end )

Impressum / About Us