From 4e63dd6a586775c80fbafd4b72f45f22723b7ec0 Mon Sep 17 00:00:00 2001
From: anonymous <anonymous>
Date: Mon, 11 Mar 2019 13:21:38 +0100
Subject: [PATCH] ODPSH-273: change layout

---
 ckanext/odsh/public/odsh.css                  | 31 +++++++++++++++++--
 .../odsh/templates/snippets/package_item.html | 23 ++++++--------
 2 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/ckanext/odsh/public/odsh.css b/ckanext/odsh/public/odsh.css
index c92f37d2..363b6e12 100644
--- a/ckanext/odsh/public/odsh.css
+++ b/ckanext/odsh/public/odsh.css
@@ -402,6 +402,7 @@ label.rangesearch.disabled {
 .container-fluid.odsh-dataset-item {
     padding: 20px 0px 20px 0px;
     border-bottom: 2px solid #DBDBDB;
+    display: table;
 }
 .container-fluid.odsh-dataset-item:hover {
     background-color: rgb(246,247,249);
@@ -437,8 +438,9 @@ a:hover.organization-item ,a:focus.organization-item
 }
 
 .dataset-content {
-    float:left;
     width: 470px;
+    display: table-cell;
+    position: relative;
 }
 
 .dataset-heading {
@@ -446,6 +448,10 @@ a:hover.organization-item ,a:focus.organization-item
     font-weight: normal;
     font-size: 20px;
 }
+.dataset-content p{
+    font-size: 12px;
+    margin: 0 0 5px; 
+}
 .dataset-heading a{
     text-decoration: none;
 }
@@ -456,9 +462,11 @@ a:hover.organization-item ,a:focus.organization-item
 }
 
 .dataset-meta {
-    float:right;
     width: 225px;
     /* width: 30%; */
+    height: 100%;
+    display: table-cell;
+    position: relative;
 }
 
 ul.dataset-resources {
@@ -541,6 +549,11 @@ a.odsh-star:hover {
     white-space: nowrap;
 }
 
+.dataset-info.issued {
+    position: absolute;
+    bottom: 0px;
+}
+
 .toolbar .breadcrumb>li a {
     font-weight: normal !important;
     font-size: 15px;
@@ -1742,3 +1755,17 @@ span.clear {
     width: 225px;
 }
 
+.package-info-pill
+{
+    display: inline-block;
+    padding: 3px 10px;
+    background-color: #dbdbdb;
+    border-radius: 5px;
+    font-size: 12px;
+}
+
+p.package-info-categorie 
+{
+    margin-top: 15px;
+    margin-bottom: 0px;
+}
\ No newline at end of file
diff --git a/ckanext/odsh/templates/snippets/package_item.html b/ckanext/odsh/templates/snippets/package_item.html
index 4c6db17a..bd47bb08 100644
--- a/ckanext/odsh/templates/snippets/package_item.html
+++ b/ckanext/odsh/templates/snippets/package_item.html
@@ -40,6 +40,7 @@ Example:
   {% block content %}
   <div class="dataset-content">
     {% block heading %}
+    <p>{{org}}</p>
     <h3 class="dataset-heading">
       {% block heading_private %}
       {% if package.private %}
@@ -70,11 +71,13 @@ Example:
     {% endif %}
     {% endblock %}
     {% block notes %}
-    {% if notes %}
-    <div>{{ notes|urlize }}</div>
-    {% else %}
-    <p class="dataset-empty">{{ _("This dataset has no description") }}</p>
-    {% endif %}
+    <div class='package-info-pill'>
+        {{timerange}}
+    </div>
+    <div class='package-info-pill'>
+        {{h.odsh_get_spatial_text(package) }}
+    </div>
+    <p class='package-info-categorie'>{{ _('Kategorie') }}: {{ categories}} </p>
     {% endblock %}
   </div>
   <div class="dataset-meta">
@@ -97,20 +100,12 @@ Example:
       {% snippet "qa/stars.html", stars=stars %}
     </div>
 
-    <div class="dataset-info">
-      <p>{{ _('Kategorie') }}: {{ categories}} </p>
-      <p> {{_('Lizenz')}}: {{license}}</p>
-      <p> {{_('Herausgeber')}}: {{org}} </p>
-      <p> {{timerange_label}}: {{timerange}}</p>
+    <div class="dataset-info issued">
       <p>{{ _('issued') }}: {{issued}} </p>
     </div>
     {% endblock %}
     {% endblock %}
   </div>
-  {% block package_openness %}
-  <div class="module module-narrow module-shallow context-info">
-  </div>
-  {% endblock %}
   {% endblock %}
 </div>
 {% endblock %}
-- 
GitLab