{# Embeds a organization within the sidebar of a page. organization - The organization dict. truncate - A max length for the organization description. If not provided the description will be full length. has_context_title - Boolean for whether to display a module-heading for when this snippet appears within a non-organization template (e.g. dataset page sidebar) Example: {% snippet 'snippets/organization, organization=c.group_dict %} #} {% set truncate = truncate or 0 %} {% block info %}
{% block heading %}

{{ organization.title or organization.name }} {% if organization.state == 'deleted' %} [{{ _('Deleted') }}] {% endif %}

{% endblock heading%}
{% block inner %} {% block image %}
{{ organization.name }}
{% set address = h.tpsh_get_address_org(organization) %} {% set street = address.get('street') %} {% set location = address.get('location') %} {% set mail = address.get('mail') %} {% set telephone = address.get('telephone') %} {% set web = address.get('web') %} {% if person %}

{{ person }}

{% endif %} {# person #} {% if street and location %}

{{ street }}

{{ location }}

{% endif %} {# street and location #} {% if mail %} {% if package %} {% set package_name = package.get('name') %} {% set betreff = "Transparenzportal Dokument: "+ package_name%} {% set body_mail = h.tpsh_get_body_mail(organization, package) %} {% else %} {% set betreff = "Transparenzportal" %} {% endif %} {# package #}

{{ mail }}

{% endif %} {# mail #} {% if telephone %}

{{ telephone }}

{% endif %} {# telephone #} {% if web %}

{{ address.web }}

{% endif %} {# web #}
{% endblock image%} {% if not hide_description %} {% block description %} {% if organization.description %}

{{ h.markdown_extract(organization.description, 180) }} {% link_for _('read more'), controller='organization', action='about', id=organization.name %}

{% else %}

{{ _('There is no description for this organization') }}

{% endif %} {% endblock description %} {% endif %} {% if show_nums %} {% block nums %}
{{ _('Followers') }}
{{ h.SI_number_span(organization.num_followers) }}
{{ _('Documents') }}
{{ h.SI_number_span(organization.package_count) }}
{% endblock nums%} {% block follow %} {% endblock follow %} {% endif %} {% endblock inner %}
{% endblock %}