liquid_feedback_frontend

changeset 1713:58e1e8d6f596

Changed order of sidebar elements
author bsw
date Mon Sep 27 12:20:33 2021 +0200 (2021-09-27)
parents c14da47b2357
children 11cb89cd2a92
files app/main/area/_sidebar_whatcanido.lua app/main/unit/_sidebar_whatcanido.lua
line diff
     1.1 --- a/app/main/area/_sidebar_whatcanido.lua	Mon Sep 27 12:17:27 2021 +0200
     1.2 +++ b/app/main/area/_sidebar_whatcanido.lua	Mon Sep 27 12:20:33 2021 +0200
     1.3 @@ -84,19 +84,6 @@
     1.4          end }
     1.5        end
     1.6        
     1.7 -      if app.session.member:has_voting_right_for_unit_id ( area.unit_id ) then
     1.8 -        ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
     1.9 -          ui.tag{ content = _"I want to vote" }
    1.10 -          ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
    1.11 -            ui.tag { tag = "li", content = _"check the issues on the right, and click on 'Vote now' to vote on an issue which is in voting phase." }
    1.12 -          end }
    1.13 -        end }
    1.14 -      end
    1.15 -      
    1.16 -      if app.session.member and not app.session.member:has_voting_right_for_unit_id(area.unit_id) then
    1.17 -        ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = _"You are not entitled to vote in this unit" }
    1.18 -      end
    1.19 -      
    1.20        if app.session.member and app.session.member:has_voting_right_for_unit_id(area.unit_id) then
    1.21  
    1.22          if not config.disable_delegations then
    1.23 @@ -175,7 +162,14 @@
    1.24              end }
    1.25            end }
    1.26          end
    1.27 -            
    1.28 +      end
    1.29 +      if app.session.member:has_voting_right_for_unit_id ( area.unit_id ) then
    1.30 +        ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    1.31 +          ui.tag{ content = _"I want to vote" }
    1.32 +          ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
    1.33 +            ui.tag { tag = "li", content = _"check the issues on the right, and click on 'Vote now' to vote on an issue which is in voting phase." }
    1.34 +          end }
    1.35 +        end }
    1.36        end
    1.37      else
    1.38        ui.container { attr = { class = "mdl-card__content mdl-card--border" }, content = function ()
     2.1 --- a/app/main/unit/_sidebar_whatcanido.lua	Mon Sep 27 12:17:27 2021 +0200
     2.2 +++ b/app/main/unit/_sidebar_whatcanido.lua	Mon Sep 27 12:20:33 2021 +0200
     2.3 @@ -61,7 +61,14 @@
     2.4            end
     2.5          end }
     2.6        end
     2.7 -      
     2.8 +      if not config.voting_only and app.session.member_id and app.session.member:has_initiative_right_for_unit_id ( unit.id ) then
     2.9 +        ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    2.10 +          ui.tag{ content = _"I want to start a new initiative" }
    2.11 +          ui.tag{ tag = "ul", attr = { class = "ul" }, content = function ()
    2.12 +            ui.tag { tag = "li", content = _"open the appropriate subject area for your issue and follow the instruction on that page." }
    2.13 +          end } 
    2.14 +        end }
    2.15 +      end
    2.16        ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    2.17          ui.tag{
    2.18            content = _"I want to vote" 
    2.19 @@ -83,16 +90,5 @@
    2.20          end
    2.21        end }
    2.22      end
    2.23 -    
    2.24 -    if not config.voting_only and app.session.member_id and app.session.member:has_initiative_right_for_unit_id ( unit.id ) then
    2.25 -      ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    2.26 -        ui.tag{ content = _"I want to start a new initiative" }
    2.27 -        ui.tag{ tag = "ul", attr = { class = "ul" }, content = function ()
    2.28 -          ui.tag { tag = "li", content = _"open the appropriate subject area for your issue and follow the instruction on that page." }
    2.29 -        end } 
    2.30 -      end }
    2.31 -    end
    2.32 -   
    2.33    end }
    2.34 -  
    2.35  end }

Impressum / About Us