Skip to content
Snippets Groups Projects
Select Git revision
  • caf2d7151fb6983f447147b4f3bb72c55cb349a0
  • master default protected
  • add-frequency-to-form
  • dev protected
  • ckan-2.11.0
  • add-package-custom-fields
  • fix-adding-datasets-for-users-and-editors
  • add-auth-subroute
  • 71-migrate-custom-fields-to-ckanext-scheming
  • add-author-maintainer-information
  • fix-inline-flex-btns
  • fix-known-spatial-uri-validation
  • py3
  • 47-aktuelle-resource-einer-collection-wird-nicht-mehr-gefunden
  • 10-eingabe-der-dct-accrualperiodicity-in-weboberflache
  • v1.3
  • 2.5.3
  • 2.5.2
  • 2.5.1
  • 2.5.0
  • 2.4.7
  • 2.4.6
  • 2.4.5
  • 2.4.4
  • 2.4.3
  • 2.4.2
  • 2.4.1
  • 2.4.0
  • 2.3.1
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • 2.0.0
  • 1.4.3
  • 1.4.2
  • 1.4.1
36 results

resource_item.html

Blame
  • user avatar
    Jesper Zedlitz authored
    caf2d715
    History
    resource_item.html 2.47 KiB
    {% set url_action = 'resource_edit' if url_is_edit and can_edit else 'resource_read' %}
    {% set url = h.url_for(controller='package', action=url_action, id=pkg.name, resource_id=res.id) %}
    
    {# hack for correcting slave url if resource was uploaded #}
    {% set download = h.odsh_public_resource_url(res) or url %}
    
    {% set rtitle=h.resource_display_name(res) if res.name else ' '%}
    {% set resource_size = h.tpsh_get_resource_size(res) %}
    {% set res_format =  res.format.replace('_SRVC','') %}
    
    <li class="resource-item" data-id="{{ res.id }}">
        <div class="resource-title-container">
            <div class="resource-title" title="{{ rtitle }}">
                {% if res.name %}
                <a href="{{ download }}">
                    {{ h.resource_display_name(res) }}
                </a>
                {% endif %}
                {% if resource_size %}
                <p>Dateigröße: {{ resource_size }}</p>  
                {% endif %}
                {% set number_of_pages = res.get('number_of_pages') %}
                {% if number_of_pages%}
                <p>Seitenanzahl: {{ number_of_pages }}</p>   
                {% endif %}
            </div>
            <div class="resource-icons">
                {% block resource_item_explore_links %}
                <a href="{{ download }}" aria-label="{{ _('download file') }}">
                    <div aria-hidden="true" class="icon icon-download"></div>
                </a>
                {% if can_edit %}
                <a href="{{ h.url_for(controller='package', action='resource_edit', id=pkg.name, resource_id=res.id) }}">
                    <div class="icon icon-edit"></div>
                </a>
                {% endif %}
                {% endblock %}
            </div>
                {% if res_format %}
                <a href="{{ download }}" >
                   <div class="dataformat-label resource-dataformat-label label" style='font-size:{{150/(res_format|length)}}px'>{{res_format}}</div>
                </a>
                {% endif %}
        </div>
    </li>
        
            <!-- </div>
            <div class="row resource-description-container">
            </div>
          <div class="resource-icons">
            <a href="{{ download }}" aria-label="{{ _('download file') }}">
              <div aria-hidden="true" class="icon icon-download"></div>
            </a>
            {% if can_edit %}
            <a href="{{ h.url_for(controller='package', action='resource_edit', id=pkg.name, resource_id=res.id) }}">
              <div class="icon icon-edit"></div>
            </a>
            {% endif %}
          </div>
          <div>
            
            
          </div>
          </div>
        </div>
      </div>
    
    </li> -->