liquid_feedback_frontend

diff app/main/delegation/show.lua @ 1696:446d2798f424

Automatically switch to single unit mode for users having only one unit
author bsw
date Thu Sep 23 17:47:58 2021 +0200 (2021-09-23)
parents dcbe505ddf24
children
line diff
     1.1 --- a/app/main/delegation/show.lua	Thu Sep 23 14:30:18 2021 +0200
     1.2 +++ b/app/main/delegation/show.lua	Thu Sep 23 17:47:58 2021 +0200
     1.3 @@ -156,12 +156,12 @@
     1.4                  local unit_delegation = Delegation:by_pk(app.session.member_id, issue.area.unit_id)
     1.5                  if unit_delegation then
     1.6                    delegate_name = unit_delegation.trustee.name
     1.7 -                  scope = config.single_unit_id and _"global" or _"unit"
     1.8 +                  scope = app.single_unit_id and _"global" or _"unit"
     1.9                  end
    1.10                end
    1.11                local text_apply
    1.12                local text_abandon
    1.13 -              if config.single_unit_id then
    1.14 +              if app.single_unit_id then
    1.15                  text_apply = _("Apply global or area delegation for this issue (Currently: #{delegate_name} [#{scope}])", { delegate_name = delegate_name, scope = scope })
    1.16                  text_abandon = _"Abandon unit and area delegations for this issue"
    1.17                else
    1.18 @@ -179,11 +179,11 @@
    1.19                local unit_delegation = Delegation:by_pk(app.session.member_id, area.unit_id)
    1.20                if unit_delegation then
    1.21                  delegate_name = unit_delegation.trustee.name
    1.22 -                scope = config.single_unit_id and _"global" or _"unit"
    1.23 +                scope = app.single_unit_id and _"global" or _"unit"
    1.24                end
    1.25                local text_apply
    1.26                local text_abandon
    1.27 -              if config.single_unit_id then
    1.28 +              if app.single_unit_id then
    1.29                  text_apply = _("Apply global delegation for this area (Currently: #{delegate_name} [#{scope}])", { delegate_name = delegate_name, scope = scope })
    1.30                  text_abandon = _"Abandon global delegation for this area"
    1.31                else

Impressum / About Us