Skip to content
Snippets Groups Projects
Select Git revision
  • 13ef6d9460e4a636a1ffd30ede43dfa804a7cb9f
  • main default protected
  • release
  • OZG-7378_fix_missing_userid
  • 0.7.0
  • 0.6.0
  • 0.5.0
  • 0.4.0
  • 0.3.0
  • 0.2.0
  • 0.1.1
  • 0.1.0
12 results

Jenkinsfile

Blame
  • facet_list.html 2.50 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)|selectattr('count')|list %}
    {% 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 %}
            {% if title=='Open-Data-Eigenschaften'%}
            {% set label = _(label)%}
            {% endif%}
            {% set count = count_label(item['count']) if count_label else ('%d' % item['count']) %}
            {% set label_truncated = h.truncate(label, 25) 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}}</span>
                </a>
    	  </div>
    	  <div class="facet_count">
                <span class="facet_count">{{ count }}</span>
    	  </div>
            </li>
            {% endfor %}
        </ul>
    </nav>
    
    <div 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') }}</a>
        {% endif %}
        {% else %}
        <a href="{{ h.remove_url_param('_%s_limit' % name, extras=extras, alternative_url=alternative_url) }}" class="read-more">> {{
            _('Show Less')}}</a>
        {% endif %}
    </div>
    
    {% else %}
    <p class="module-content empty">{{ _('There are no {facet_type} that match this search').format(facet_type=title) }}</p>
    {% endif %}
    {% endwith %}
    {% endblock %}