Skip to content
Snippets Groups Projects
Commit 7c7cd3d7 authored by Becker, Benjamin's avatar Becker, Benjamin
Browse files

Pull request #71: Dev

Merge in TPSH/ckanext-odsh from dev to master

* commit '72df82d4':
  fixes bug in breadcrumbs
  fixes 2.4.5a (title for links in breadcrumbs)
  fixes 1.4.11a (contrast of blue buttons)
  fixes 1.4.11a (contrast of dots in pagination)
  fixes 1.3.1b (use <ul> and <li> for list of datasets)
  fixes 1.1.1b (aria-hidden for preview)
  fixes tests
  removes gray block from collection summary
  fixes bug in jinja block bodytag
  restores negative margin for search-form
  removes negative margin from odsh-dataset-heading
  removes gray box from smartphone layout
parents fa331d12 72df82d4
No related branches found
No related tags found
No related merge requests found
......@@ -148,9 +148,12 @@ h3{
.search-form, .odsh-dataset-heading {
border-bottom: none;
margin-bottom: 0px;
padding-bottom: 0;
}
.search-form {
margin-left: -15px;
margin-right: -15px;
padding-bottom: 0;
}
.search-form:after {
......@@ -326,6 +329,14 @@ section#dataset-collection .button-container img {
border-bottom: solid 3px #DBDBDB;
}
.site-collection-summary .page-header::before,
.site-collection-summary .page-header::after,
.site-package-base .page-header::before,
.site-package-base .page-header::after {
display: none;
}
.information-organisation {
margin-top: 20px;
font-size: 12px;
......@@ -1050,7 +1061,7 @@ input#field-username {
.slug-preview .btn.btn-mini,
.btn.btn-primary{
background-image: none;
background-color: #0089ca;
background-color: #003064;
border: none;
border-radius: 0;
font-size:18px;
......@@ -1822,7 +1833,7 @@ body {
.pagination ul > .disabled > a,
.pagination ul > .disabled > a:hover,
.pagination ul > .disabled > a:focus {
color: #999999;
color: black;
background-color: transparent;
cursor: default;
}
......
......@@ -2,6 +2,13 @@
{% set pkg = c.pkg_dict or pkg_dict %}
{% block bodytag %}
{{ super() }}
{% block bodyclass %}
class="site-package-base"
{% endblock bodyclass %}
{% endblock bodytag%}
{% block breadcrumb_content_selected %} class="active"{% endblock %}
{% block subtitle %}{{ _('Documents') }}{% endblock %}
......
{% extends "package/read.html" %}
{% block bodytag %} {{ super() }} class="site-collection-summary" {% endblock %}
{% block bodyclass %} class="site-collection-summary" {% endblock %}
{% block package_resources %}
{% endblock package_resources %}
......
......@@ -14,12 +14,19 @@
{% set dataset = h.dataset_display_name(pkg) %}
{% if pkg.organization %}
{% set organization = h.get_translated(pkg.organization, 'title') or pkg.organization.name %}
<li>{% link_for organization|truncate(30), controller='organization', action='read', id=pkg.organization.name %}</li>
<li>
<a href={% url_for controller='organization', action='read', id=pkg.organization.name %} title="{{ organization }}">
{{ organization|truncate(30) }}
</a>
</li>
{% else %}
<li>{% link_for _('Documents'), controller='package', action='search' %}</li>
{% endif %}
<li {{ self.breadcrumb_content_selected() }}>{% link_for dataset|truncate(30), controller='package', action='read',
id=pkg.name %}</li>
<li>
<a href={% url_for controller='package', action='read', id=pkg.name %} title="{{ dataset }}"">
{{ dataset|truncate(30) }}
</a>
</li>
{% else %}
<li>{% link_for _('Documents'), controller='package', action='search' %}</li>
<li class="active"><a href="">{{ _('Create Dataset') }}</a></li>
......
......@@ -32,16 +32,16 @@ Example:
{% set thumbnail = package.get('thumbnail') %}
{% block package_item %}
<div class="odsh-dataset-item">
<li class="odsh-dataset-item">
<div class="preview-image-container">
{% if thumbnail %}
<a href={{ h.url_for(controller='package', action='read', id=package.name) }}>
<img src= "/{{ thumbnail }}" alt= "Vorschau" />
<img src= "/{{ thumbnail }}" alt="Vorschau" aria-hidden="true" />
</a>
{% else %}
<a href={{ h.url_for(controller='package', action='read', id=package.name) }}>
<img src="/base/images/platzhalter.svg" alt= "keine Vorschau verfügbar" />
<img src="/base/images/platzhalter.svg" alt="keine Vorschau verfügbar" aria-hidden="true" />
</a>
{% endif%}
</div>
......@@ -124,5 +124,5 @@ Example:
{% endblock notes %}
</div>
{% endblock content %}
</div>
</li>
{% endblock package_item %}
......@@ -16,12 +16,12 @@ Example:
#}
{% block package_list %}
{% if packages %}
<div class="{{ list_class or 'dataset-list unstyled' }}">
<ul class="{{ list_class or 'dataset-list unstyled' }}">
{% block package_list_inner %}
{% for package in packages %}
{% snippet 'snippets/package_item.html', package=package, item_class=item_class, hide_resources=hide_resources, banner=banner, truncate=truncate, truncate_title=truncate_title %}
{% endfor %}
{% endblock %}
</div>
</ul>
{% endif %}
{% endblock %}
......@@ -21,6 +21,7 @@ class TestHelpersCollection(object):
self.collection_dict = {
'name': 'collection name',
'id': 'someid',
'title': 'collection title',
'relationships': [
{
......@@ -86,6 +87,7 @@ class TestHelpersCollection(object):
def test_get_collection_info_WITHOUT_dataset_dict(self):
collection_info = helpers_collection.get_collection_info('some_id')
collection_info_expected = {
'url': 'http://someid',
'first_member': {
'name': 'dataset 1',
'url': 'http://dataset 1'
......@@ -102,6 +104,7 @@ class TestHelpersCollection(object):
def test_get_collection_info_WITH_dataset_dict(self):
collection_info = helpers_collection.get_collection_info('some_id', {'name': 'dataset 2'})
collection_info_expected = {
'url': 'http://someid',
'first_member': {'name': 'dataset 1', 'url': 'http://dataset 1'},
'last_member': {'name': 'dataset 3', 'url': 'http://dataset 3'},
'members': [{'name': 'dataset 1'}, {'name': 'dataset 2'}, {'name': 'dataset 3'}],
......@@ -147,6 +150,7 @@ class TestHelpersCollection(object):
collection_info = helpers_collection.gather_collection_info(
self.collection_dict, self.datasets_in_collection, dataset_dict=None)
collection_info_expected = {
'url': 'http://someid',
'first_member': {'name': 'dataset 1', 'url': 'http://dataset 1'},
'last_member': {'name': 'dataset 3', 'url': 'http://dataset 3'},
'members': [
......@@ -164,6 +168,7 @@ class TestHelpersCollection(object):
collection_info = helpers_collection.gather_collection_info(
self.collection_dict, self.datasets_in_collection, dataset_dict={'name': 'dataset 1'})
collection_info_expected = {
'url': 'http://someid',
'first_member': {'name': 'dataset 1', 'url': 'http://dataset 1'},
'last_member': {'name': 'dataset 3', 'url': 'http://dataset 3'},
'members': [
......@@ -181,6 +186,7 @@ class TestHelpersCollection(object):
collection_info = helpers_collection.gather_collection_info(
self.collection_dict, self.datasets_in_collection, dataset_dict={'name': 'dataset 2'})
collection_info_expected = {
'url': 'http://someid',
'first_member': {'name': 'dataset 1', 'url': 'http://dataset 1'},
'last_member': {'name': 'dataset 3', 'url': 'http://dataset 3'},
'members': [
......@@ -198,6 +204,7 @@ class TestHelpersCollection(object):
collection_info = helpers_collection.gather_collection_info(
self.collection_dict, self.datasets_in_collection, dataset_dict={'name': 'dataset 3'})
collection_info_expected = {
'url': 'http://someid',
'first_member': {'name': 'dataset 1', 'url': 'http://dataset 1'},
'last_member': {'name': 'dataset 3', 'url': 'http://dataset 3'},
'members': [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment