Skip to content
Snippets Groups Projects
Commit a52c8f24 authored by anonymous's avatar anonymous
Browse files

ODPSH-45: Adds layout modifications

parent bdd8fa66
No related branches found
No related tags found
No related merge requests found
......@@ -20,45 +20,64 @@ msgstr ""
"Generated-By: Babel 2.3.4\n"
#: ckanext/odsh/templates/header.html:10
msgid "Start"
msgstr "Startseite"
#: ckanext/odsh/templates/header.html:11
msgid "Datasets"
msgstr "Daten"
#: ckanext/odsh/templates/header.html:12
#: ckanext/odsh/templates/header.html:11
msgid "Organizations"
msgstr "Herausgeber"
#: ckanext/odsh/templates/header.html:12
msgid "Groups"
msgstr ""
#: ckanext/odsh/templates/header.html:13
msgid "About"
msgstr ""
#: ckanext/odsh/templates/header.html:14
msgid "Info"
msgstr "Infos"
#: ckan/templates/header.html:117 ckan/templates/home/snippets/search.html:11
#: ckan/templates/snippets/simple_search.html:5
#: ckan/templates/user/snippets/user_search.html:6
msgid "Search"
msgstr "Suchbegriff"
#: ckanext/odsh/templates/snippets/package_item.html:31
msgid "Private"
msgstr ""
#: ckanext/odsh/templates/snippets/package_item.html:40
msgid "Draft"
msgstr ""
#: ckanext/odsh/templates/snippets/package_item.html:42
msgid "Deleted"
msgstr ""
#: ckanext/odsh/templates/snippets/package_item.html:50
msgid "Popular"
msgstr ""
#: ckanext/odsh/templates/snippets/package_item.html:57
msgid "This dataset has no description"
msgstr ""
#~ msgid "Start"
#~ msgstr "Startseite"
#: ckan/templates/snippets/search_result_text.html:15
msgid "{number} dataset found for \"{query}\""
msgid_plural "{number} datasets found for \"{query}\""
msgstr[0] "{number} Ergebnis für \"{query}\""
msgstr[1] "{number} Ergebnisse für \"{query}\""
#~ msgid "Search"
#~ msgstr "Suchbegriff"
#: ckan/templates/snippets/search_result_text.html:16
msgid "No datasets found for \"{query}\""
msgstr "Keine Ergebnisse für \"{query}\""
#~ msgid "{number} dataset found for \"{query}\""
#~ msgid_plural "{number} datasets found for \"{query}\""
#~ msgstr[0] "{number} Ergebnis für \"{query}\""
#~ msgstr[1] "{number} Ergebnisse für \"{query}\""
#: ckan/templates/snippets/search_result_text.html:17
msgid "{number} dataset found"
msgid_plural "{number} datasets found"
msgstr[0] "{number} Ergebnis"
msgstr[1] "{number} Ergebnisse"
#~ msgid "No datasets found for \"{query}\""
#~ msgstr "Keine Ergebnisse für \"{query}\""
#: ckan/templates/snippets/search_result_text.html:18
msgid "No datasets found"
msgstr "Keine Ergebnisse"
#~ msgid "{number} dataset found"
#~ msgid_plural "{number} datasets found"
#~ msgstr[0] "{number} Ergebnis"
#~ msgstr[1] "{number} Ergebnisse"
#~ msgid "No datasets found"
#~ msgstr "Keine Ergebnisse"
.search-form .control-order-by select {
width: 225px;
margin: 0;
}
\ No newline at end of file
{% ckan_extends %}
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="/odsh.css" />
{% endblock %}
\ No newline at end of file
{% ckan_extends %}
{% block facet_list_items %}
{% with items = items or h.get_facet_items_dict(name) %}
{% if items %}
<nav>
<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 label_truncated = h.truncate(label, 22) if not label_function else label %}
<li class="{{ nav_item_class or 'nav-item' }}{% if item.active %} active{% endif %}">
<a href="{{ href }}" title="{{ label if label != label_truncated else '' }}">
<span>{{ label_truncated }}</span>
</a>
</li>
{% endfor %}
</ul>
</nav>
<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 %}
\ No newline at end of file
{% set current_lang = request.environ.CKAN_LANG %}
<form class="form-inline form-select lang-select" action="{% url_for controller='util', action='redirect' %}"
data-module="select-switch" method="POST">
<select id="field-lang-select" name="url" data-module="autocomplete" data-module-dropdown-class="lang-dropdown"
data-module-container-class="lang-container">
{% for locale in h.get_available_locales() %}
<option value="{% url_for h.current_url(), locale=locale.short_name %}" {% if locale.identifier==current_lang
%}selected="selected" {% endif %}>
{{ locale.short_name }}
</option>
{% endfor %}
</select>
<button class="btn js-hide" type="submit">{{ _('Go') }}</button>
</form>
\ No newline at end of file
......@@ -17,6 +17,12 @@ Example:
{% set truncate_title = truncate_title or 80 %}
{% set title = package.title or package.name %}
{% set notes = h.markdown_extract(package.notes, extract_length=truncate) %}
{% set license = package.license or '-' %}
{% set timerange = '-' %}
{% set org = package.organization.title or package.organization.name or '-' %}
{% set access_count=(package.tracking_summary.total if package.tracking_summary) or '-' %}
{% set timerange_label ='Zeitraum' %}
{% set access_count_label ='Zugriffe' %}
{% block package_item %}
<li class="{{ item_class or "dataset-item" }}">
......@@ -33,7 +39,8 @@ Example:
{% endif %}
{% endblock %}
{% block heading_title %}
{{ h.link_to(h.truncate(title, truncate_title), h.url_for(controller='package', action='read', id=package.name)) }}
{{ h.link_to(h.truncate(title, truncate_title), h.url_for(controller='package', action='read', id=package.name))
}}
{% endblock %}
{% block heading_meta %}
{% if package.get('state', '').startswith('draft') %}
......@@ -42,6 +49,7 @@ Example:
<span class="label label-important">{{ _('Deleted') }}</span>
{% endif %}
{{ h.popular('recent views', package.tracking_summary.recent, min=10) if package.tracking_summary }}
</span>
{% endblock %}
</h3>
{% endblock %}
......@@ -65,11 +73,16 @@ Example:
{% block resources_inner %}
{% for resource in h.dict_list_reduce(package.resources, 'format') %}
<li>
<a href="{{ h.url_for(controller='package', action='read', id=package.name) }}" class="label" data-format="{{ resource.lower() }}">{{ resource }}</a>
<a href="{{ h.url_for(controller='package', action='read', id=package.name) }}" class="label" data-format="{{ resource.lower() }}">{{
resource }}</a>
</li>
{% endfor %}
{% endblock %}
</ul>
<span> {{_('Organizations')}}: {{org}}</span>
<span> {{_('License')}}: {{license}}</span>
<span> {{timerange_label}}: {{timerange}}</span>
<span> {{access_count_label}}: {{access_count}}</span>
{% endblock %}
{% endif %}
{% endblock %}
......
{% import 'macros/form.html' as form %}
{% set placeholder = placeholder if placeholder else _('Search datasets...') %}
{% set sorting_label_prefix = _('Order by') %}
{% set sorting = sorting if sorting else [(_('Name Ascending'), 'name asc'), (_('Name Descending'), 'name desc')] %}
{% set search_class = search_class if search_class else 'search-giant' %}
{% set no_bottom_border = no_bottom_border if no_bottom_border else false %}
......@@ -21,11 +22,11 @@
{% block search_sortby %}
{% if sorting %}
<div class="form-select control-group control-order-by">
<label for="field-order-by">{{ _('Order by') }}</label>
<select id="field-order-by" name="sort">
{% for label, value in sorting %}
{% if label and value %}
<option value="{{ value }}" {% if sorting_selected==value %} selected="selected" {% endif %}>{{ label }}</option>
<option value="{{ value }}" {% if sorting_selected==value %} selected="selected" {% endif %}>
{{sorting_label_prefix}} {{ label }}</option>
{% endif %}
{% endfor %}
</select>
......@@ -49,7 +50,6 @@
<p class="filter-list">
{% for field in facets.fields %}
{% set search_facets_items = facets.search.get(field)['items'] %}
<span class="facet">{{ facets.titles.get(field) }}:</span>
{% for value in facets.fields[field] %}
<span class="filtered pill">
{%- if facets.translated_fields and facets.translated_fields.has_key((field,value)) -%}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment