Skip to content
Snippets Groups Projects
Select Git revision
  • c38195ba4bc0d2e0183bc316769fabdd3cd4c2bc
  • main default protected
  • OZG-8314-Alfa-Vorgang-Bearbeiter-Zuweisung-entfernen
  • storybook-improvements
  • release-administration
  • release-info
  • release
  • OZG-7856_schadcode-scanner-e2e
  • OZG-7985-fix-sorting
  • OZG-8305-Create-webpack-sbom
  • tooltip-improvements
  • OZG-7714-UpgradeKeycloakDependencyTo25
  • OZG-8086-Admin-Datenanfrage-erstellen
  • OZG-8086-Datenanfrage-Umbenennung
  • mongodb-7-0-16-e2e
  • OZG-6220-Bescheid-speichern-ohne-Postfach
  • OZG-7922-KeycloakOperatorExceptions
  • OZG-8142-poc-cards
  • OZG-8086-E2E
  • OZG-8086-E2E2
  • OZG-8142-ProjectionStuff
  • 1.12.0-administration
  • 1.12.0-info
  • 2.27.0-alfa
  • 1.11.0-info
  • 1.11.0-administration
  • 2.26.0-alfa
  • 1.10.0-info
  • 1.10.0-administration
  • 2.25.0-alfa
  • 1.9.0-info
  • 1.9.0-administration
  • 2.24.0-alfa
  • 1.8.0-info
  • 1.8.0-administration
  • 2.23.0-alfa
  • 1.7.0-info
  • 1.7.0-administration
  • 2.22.0-alfa
  • 1.6.0-info
  • 1.6.0-administration
41 results

main.scss

  • facet_list.html 2.68 KiB
    {% ckan_extends %}
    
    {% block facet_list_heading %}
      {# {% set title = title or h.get_facet_title(name) %}
      {{ title }} #}
    {% endblock %}
    
    {% block facet_list_items %}
    {# {% with items = items or h.get_facet_items_dict(name,20) %} #}
    {% with items = items or h.odsh_get_facet_items_dict(name,20) %}
    {% if items %}
    <nav>
      {% set title = title or h.get_facet_title(name) %}
      <div class="nav-title">{{ title }}</div>
        <ul class="{{ nav_class or 'unstyled nav nav-simple nav-facet' }}">
            {% for item in items %}
            {% set href = h.remove_url_param(name, item.name, extras=extras, alternative_url=alternative_url) if
            item.active else h.add_url_param(new_params={name: item.name}, extras=extras, alternative_url=alternative_url)
            %}
            {% set label = label_function(item) if label_function else item.display_name %}
            {% set count = count_label(item['count']) if count_label else ('%d' % item['count']) %}
            {% set digits = max([label|string|length,2)] %}
            {% set label_truncated = h.truncate(label, 29-digits) if not label_function else label %}
            <li class="{{ nav_item_class or 'nav-item' }}">
    	  <div class="facet_label">
    	    {# TODO: checkbox-id vereinheitlichen (code-duplikation) und sicher gegen Titel mit Leerzeichen machen! #}
    	    <input type="checkbox" {% if item.active %} checked {% endif %} class="filter-checkbox" id="check-{{ title.lower() }}-{{ loop.index }}"/>
    	    <label class="mylabel" for="check-{{ title.lower() }}-{{ loop.index }}"></label>
    	    <a href="{{ href }}" title="{{ label if label != label_truncated else '' }}">
                    <span>{{ label_truncated }}</span>
                </a>
    	  </div>
    	  <div class="facet_count">
                <span class="facet_count">{{ count }}</span>
    	  </div>
            </li>
            {% endfor %}
        </ul>
    </nav>
    
    {# TODO: when there are more than N facets ('with items...' above), how many should be
    displayed and how should these links look? Pascal R. 12.10.2018 #}
    {#<p class="module-footer">
        {% if h.get_param_int('_%s_limit' % name) %}
        {% if h.has_more_facets(name) %}
        <a href="{{ h.remove_url_param('_%s_limit' % name, replace=0, extras=extras, alternative_url=alternative_url) }}"
            class="read-more">{{ _('Show More {facet_type}').format(facet_type=title) }}</a>
        {% endif %}
        {% else %}
        <a href="{{ h.remove_url_param('_%s_limit' % name, extras=extras, alternative_url=alternative_url) }}" class="read-more">{{
            _('Show Only Popular {facet_type}').format(facet_type=title) }}</a>
        {% endif %}
    </p>#}
    
    {% else %}
    <p class="module-content empty">{{ _('There are no {facet_type} that match this search').format(facet_type=title) }}</p>
    {% endif %}
    {% endwith %}
    {% endblock %}