liquid_feedback_frontend

diff app/main/index/_head.lua @ 1843:b01d9920371b

merge
author jbe
date Thu Feb 03 15:57:22 2022 +0100 (2022-02-03)
parents 4a5a79a37db1
children
line diff
     1.1 --- a/app/main/index/_head.lua	Thu Feb 03 15:54:23 2022 +0100
     1.2 +++ b/app/main/index/_head.lua	Thu Feb 03 15:57:22 2022 +0100
     1.3 @@ -1,4 +1,4 @@
     1.4 -local unit_id = config.single_unit_id or request.get_param{ name = "unit" }
     1.5 +local unit_id = config.single_unit_id or request.get_param{ name = "unit" } or app.single_unit_id
     1.6  local area_id = config.single_area_id or request.get_param{ name = "area" }
     1.7  
     1.8  local initiative = param.get("initiative", "table")
     1.9 @@ -28,13 +28,17 @@
    1.10    ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
    1.11      ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
    1.12        ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = unit.name }
    1.13 -      if unit.description and #(unit.description) > 0 then
    1.14 -        ui.container{ attr = { class = "mdl-card__subtitle-text" }, content = unit.description }
    1.15 -      end
    1.16 -      if config.render_external_reference_unit then
    1.17 +    end }
    1.18 +    if unit.description and #(unit.description) > 0 then
    1.19 +      ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    1.20 +        slot.put(format.text_with_links(unit.description))
    1.21 +      end }
    1.22 +    end
    1.23 +    if config.render_external_reference_unit then
    1.24 +      ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    1.25          config.render_external_reference_unit(unit)
    1.26 -      end
    1.27 -    end }
    1.28 +      end }
    1.29 +    end
    1.30  
    1.31  
    1.32      if not (config.voting_only and config.disable_delegations) and app.session.member_id and (
    1.33 @@ -80,10 +84,12 @@
    1.34      if unit then
    1.35        ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
    1.36          ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = area.name }
    1.37 -        if area.description and #(area.description) > 0 then
    1.38 -          ui.container{ attr = { class = "mdl-card__subtitle-text" }, content = area.description }
    1.39 -        end
    1.40        end }
    1.41 +      if area.description and #(area.description) > 0 then
    1.42 +        ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    1.43 +          slot.put(format.text_with_links(area.description))
    1.44 +        end }
    1.45 +      end
    1.46      end
    1.47      if not (config.voting_only and config.disable_delegations) and app.session.member_id and (
    1.48        app.session.member:has_voting_right_for_unit_id(area.unit_id) 

Impressum / About Us