liquid_feedback_frontend

diff app/main/unit/_sidebar_whatcanido.lua @ 1045:701a5cf6b067

Imported LiquidFeedback Frontend 3.0 branch
author bsw
date Thu Jul 10 01:19:48 2014 +0200 (2014-07-10)
parents
children 32cc544d5a5b
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/unit/_sidebar_whatcanido.lua	Thu Jul 10 01:19:48 2014 +0200
     1.3 @@ -0,0 +1,69 @@
     1.4 +local unit = param.get ( "unit", "table" )
     1.5 +
     1.6 +ui.sidebar ( "tab-whatcanido", function ()
     1.7 +
     1.8 +  ui.sidebarHeadWhatCanIDo()
     1.9 +  
    1.10 +  if app.session.member then
    1.11 +  
    1.12 +    if app.session.member:has_voting_right_for_unit_id ( unit.id ) then
    1.13 +      ui.sidebarSection( function ()
    1.14 +        
    1.15 +        if not unit.delegation_info.first_trustee_id then
    1.16 +          ui.heading{ level = 3, content = _"I want to delegate this organizational unit" }
    1.17 +          ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
    1.18 +            ui.tag { tag = "li", content = function ()
    1.19 +              ui.link {
    1.20 +                module = "delegation", view = "show", params = {
    1.21 +                  unit_id = unit.id,
    1.22 +                },
    1.23 +                content = _("choose delegatee", {
    1.24 +                  unit_name = unit.name
    1.25 +                })
    1.26 +              }
    1.27 +            end }
    1.28 +          end }
    1.29 +        else
    1.30 +          ui.container { attr = { class = "right" }, content = function()
    1.31 +            local member = Member:by_id(unit.delegation_info.first_trustee_id)
    1.32 +            execute.view{
    1.33 +              module = "member_image",
    1.34 +              view = "_show",
    1.35 +              params = {
    1.36 +                member = member,
    1.37 +                image_type = "avatar",
    1.38 +                show_dummy = true
    1.39 +              }
    1.40 +            }
    1.41 +          end }
    1.42 +          ui.heading{ level = 3, content = _"You delegated this unit" }
    1.43 +
    1.44 +          ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
    1.45 +            ui.tag { tag = "li", content = function ()
    1.46 +              ui.link {
    1.47 +                module = "delegation", view = "show", params = {
    1.48 +                  unit_id = unit.id,
    1.49 +                },
    1.50 +                content = _("change/revoke delegation", {
    1.51 +                  unit_name = unit.name
    1.52 +                })
    1.53 +              }
    1.54 +            end }
    1.55 +          end }
    1.56 +        end
    1.57 +      end )
    1.58 +
    1.59 +      ui.sidebarSection( function()
    1.60 +        ui.heading { level = 3, content = _"I want to start a new initiative" }
    1.61 +        ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
    1.62 +          ui.tag { tag = "li", content = _"Open the appropriate subject area where your issue fits in and follow the instruction on that page." }
    1.63 +        end } 
    1.64 +      end )
    1.65 +    
    1.66 +    else
    1.67 +      ui.sidebarSection( _"You are not entitled to vote in this unit" )
    1.68 +    end
    1.69 +
    1.70 +  end
    1.71 +  
    1.72 +end )
    1.73 \ No newline at end of file

Impressum / About Us