Skip to content
Snippets Groups Projects
Select Git revision
  • 6616a5cc11c80e4931f73ea4c725fc67ed950cf0
  • 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

__init__.py

Blame
  • info.html 2.74 KiB
    {#
    Displays a sidebard module with information for given package
    
    pkg - The package dict that owns the resources.
    
    Example:
    
    {% snippet "package/snippets/info.html", pkg=pkg %}
    
    #}
    {% block package_info %}
    {% if pkg %}
    <section class="module module-narrow">
        <div class="module context-info">
            <div class="module-content">
                {% block package_info_inner %}
                {% block heading %}
                {% endblock %}
    
                {% block groups %}
                <div class="groups-detail info-detail">
                    <div>{{ _('Kategorie') }}:</div>
                    {{ pkg.groups|map(attribute='display_name')|join('; ') }}
                    {% if h.check_access('package_update', {'id':pkg.id }) %}
                    <div>
                        {% link_for _('Edit Categories'), controller='package', action='groups', id=pkg.name,
                        class_='btn btn-edit-categories', icon='wrench' %}
                    </div>
                    {% endif %}
                </div>
                {% endblock %}
    
                {% block nums %}
                {% endblock %}
    
                {% block spatial %}
                <div class="spatial-detail info-detail">
                    <div>{{ _('Spatial uri') }}:</div>
                    {%set ext=pkg.spatial_uri if pkg.spatial_uri else '-'%}
                    <p>{{ ext }}</p>
                </div>
                {% endblock %}
    
                {% block tags %}
                <div class="tags-detail info-detail">
                    <div>{{ _('Tags') }}:</div>
                    <p>{{ pkg.tags|map(attribute='display_name')|join('; ') or '-'}}</p>
                </div>
                {% endblock %}
    
                {% block license %}
                <div class="license-detail info-detail">
                    <div>{{ _('License') }}:</div>
                    {%set lic=pkg.license_title if pkg.license_title else '-'%}
                    {%set name=' ('+pkg.access_constraints +')' if pkg.access_constraints else ''%}
                    <p>{{ lic }}{{ name }}</p>
                </div>
                {% endblock %}
    
                {% block timerange %}
                <div class="timerange-detail info-detail">
                    <div>{{ _('timerange') }}:</div>
                    {%set start=h.render_datetime(pkg.temporal_start,'%d.%m.%Y') if pkg.temporal_start else ''%}
                    {%set end=h.render_datetime(pkg.temporal_end,'%d.%m.%Y') if pkg.temporal_end else ''%}
                    <p>{{ start }} - {{ end }}</p>
                </div>
                {% endblock %}
    
                {% block last_change %}
                <div class="last-change-detail info-detail">
                    <div>{{ _('last change') }}:</div>
                    {{h.render_datetime(pkg.metadata_modified,'%d.%m.%Y') }}
                </div>
                {% endblock %}
    
                {% endblock %}
            </div>
        </div>
    </section>
    {% endif %}
    {% endblock %}