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

Pull request #70: Dev

Merge in TPSH/ckanext-odsh from dev to master

* commit 'd783500c':
  adjusts layout for collection overview
  adds link to collection overview
  fixes layout bug in navigation
parents 164257b3 d783500c
Branches
Tags
No related merge requests found
...@@ -75,6 +75,8 @@ def gather_collection_info(collection_dict, datasets_in_collection, dataset_dict ...@@ -75,6 +75,8 @@ def gather_collection_info(collection_dict, datasets_in_collection, dataset_dict
name_collection = collection_dict.get('name') name_collection = collection_dict.get('name')
persistent_link_last_member = url_last_member(name_collection) persistent_link_last_member = url_last_member(name_collection)
url_collection = url_from_id(collection_dict.get('id'))
if dataset_dict: if dataset_dict:
name_current_dataset = dataset_dict.get('name') name_current_dataset = dataset_dict.get('name')
dataset_names = [d.get('name') for d in datasets_in_collection] dataset_names = [d.get('name') for d in datasets_in_collection]
...@@ -107,6 +109,7 @@ def gather_collection_info(collection_dict, datasets_in_collection, dataset_dict ...@@ -107,6 +109,7 @@ def gather_collection_info(collection_dict, datasets_in_collection, dataset_dict
return { return {
'title': collection_dict.get('title'), 'title': collection_dict.get('title'),
'url': url_collection,
'members': datasets_in_collection, 'members': datasets_in_collection,
'first_member': { 'first_member': {
'name': name_first_dataset, 'name': name_first_dataset,
......
...@@ -140,6 +140,11 @@ h3{ ...@@ -140,6 +140,11 @@ h3{
} }
@media (min-width: 1024px){ @media (min-width: 1024px){
.site-collection-summary .odsh-dataset-heading {
margin-left: 0px;
margin-right: 0px;
}
.search-form, .odsh-dataset-heading { .search-form, .odsh-dataset-heading {
border-bottom: none; border-bottom: none;
margin-bottom: 0px; margin-bottom: 0px;
...@@ -402,6 +407,11 @@ input[type=radio], input[type=checkbox] { ...@@ -402,6 +407,11 @@ input[type=radio], input[type=checkbox] {
max-width: 300px; max-width: 300px;
padding: 40.66px 16px 0px; padding: 40.66px 16px 0px;
} }
.site-collection-summary .secondary.span3 {
display: none;
}
.secondary .module-narrow .module-content{ .secondary .module-narrow .module-content{
padding-left: 0px; padding-left: 0px;
padding-right: 0px; padding-right: 0px;
...@@ -411,6 +421,10 @@ input[type=radio], input[type=checkbox] { ...@@ -411,6 +421,10 @@ input[type=radio], input[type=checkbox] {
padding-left: 31px; padding-left: 31px;
} }
.site-collection-summary .primary {
padding-left: 0;
}
.primary.organization { .primary.organization {
padding-left: 0px; padding-left: 0px;
} }
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
} }
@media (min-width: 768px) { @media (min-width: 768px) {
.navbar.masthead .navigation .nav-pills li:not(:first-child) { .navbar.masthead .navigation .nav-pills li:not(:nth-child(2)) {
margin-left: 22px; margin-left: 22px;
} }
} }
......
{% extends "package/read.html" %} {% extends "package/read.html" %}
{% block bodytag %} {{ super() }} class="site-collection-summary" {% endblock %}
{% block package_resources %} {% block package_resources %}
{% endblock package_resources %} {% endblock package_resources %}
{% block secondary_content %}
{% endblock secondary_content %}
{% block collection %} {% block collection %}
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
{% set pkg = c.pkg_dict %} {% set pkg = c.pkg_dict %}
{% set collection = h.get_collection(pkg) %} {% set collection = h.get_collection(pkg) %}
{% set collection_title = collection['title'] if collection else None %} {% set collection_title = collection['title'] if collection else None %}
{% set collection_url = collection['url'] if collection else None %}
{% set successor_url = collection['successor']['url'] if collection else None %} {% set successor_url = collection['successor']['url'] if collection else None %}
{% set predecessor_url = collection['predecessor']['url'] if collection else None %} {% set predecessor_url = collection['predecessor']['url'] if collection else None %}
{% set latest_collection_member = collection['persistent_link_last_member'] if collection else None %} {% set latest_collection_member = collection['persistent_link_last_member'] if collection else None %}
...@@ -101,7 +102,7 @@ ...@@ -101,7 +102,7 @@
<section id="dataset-collection"> <section id="dataset-collection">
{% if collection_title %} {% if collection_title %}
<p> <p>
Dieses Dokument ist Bestandteil der Dokumentengruppe "{{ collection_title }}". Dieses Dokument ist Bestandteil der <a href={{ collection_url }}>Dokumentengruppe "{{ collection_title }}"</a>.
Sie können zu älteren und neueren Dokumenten blättern. Sie können zu älteren und neueren Dokumenten blättern.
</p> </p>
{% endif %} {# collection_title #} {% endif %} {# collection_title #}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment