{# 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. Example: {% snippet 'snippets/organization, organization=c.group_dict %} #} {% set exists = [] %} {% if pkg %} {% for extra in pkg.extras if extra.key == 'bureauCode' %} {% do exists.append(h.get_bureau_info(extra.value)) %} {% endfor %} {% elif bureau_codes and bureau_codes|length == 1 %} {% for bureau_code in bureau_codes %} {% do exists.append(h.get_bureau_info(bureau_code)) %} {% endfor %} {% endif %} {% if exists and exists[0] and exists[0]['logo'] %} {% set bureau_title = exists[0]['title'] %} {% set bureau_logo= exists[0]['logo'] %} {% set bureau_url = exists[0]['url'] %} {% endif %} {% with truncate=truncate or 0, url=h.url_for(controller='organization', action='read', id=organization.name) %}
{% set organization_type = organization.organization_type|replace(' Government', '') %} {% if organization_type %} {{ organization_type }} {% endif %}
{% if exists and exists[0] and exists[0]['logo']%} {{ bureau_title }} {% else %} {{ organization.name }} {% endif %}

{% if exists and exists[0] %} {{ bureau_title }} {% else %} {{ organization.title or organization.name }} {% endif %}

{% if not (exists and exists[0]) %} {% if organization.description %}

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

{% endif %} {% endif %} {% if show_nums %}
{#
{{ _('Followers') }}
{{ h.SI_number_span(organization.num_followers) }}
{{ _('Members') }}
{{ h.SI_number_span(organization.users|length) }}
#}
{{ _('Datasets') }}
{{ h.SI_number_span(organization.package_count) }}
{% endif %}
{% set organization_terms = organization.terms_of_use %} {% if organization_terms %}

{{ _('Terms of Use') }}

Terms of Use

{% endif %} {% endwith %}