nansencenter / django-geo-spaas

GeoDjango apps for satellite data management in Geo-Scientific Platform as a Service
GNU General Public License v3.0
20 stars 6 forks source link

Issue142 more information in viewer #144

Closed opsdep closed 3 years ago

opsdep commented 3 years ago

closes #142 New viewer has been pushed. @akorosov @aperrin66

opsdep commented 3 years ago

@akorosov @aperrin66 With the jquery code of @akorosov everything is in place for this PR and it is ready to review.

akorosov commented 3 years ago

Please add a block inside the table with results and define this block in another template file:

{% for url in ds.dataseturi_set.all %}
     <div class="attr_title">URL:</div> 
  {% if show_local_address or url.service != local_file_service %}
       <div class="attr_content">{{ url.uri|escape|urlize}} </div>
  {% else %}
       <div class="attr_content"> hidden local address of dataset </div>
  {% endif %}
{% endfor %}

A child app (adas-viewer) can then override this template for showing just one dataset. For example in this way:

  <div class="attr_title">Title: </div> <div class="attr_content">{{ ds.entry_id}} </div>
  <div class="attr_title">Data center: </div> <div class="attr_content">{{ ds.data_center}} </div>
  <div class="attr_title">Source: </div> <div class="attr_content">{{ ds.source}} </div>
  <div class="attr_title">Start time: </div> <div class="attr_content">{{ ds.time_coverage_start}} </div>
  <div class="attr_title">Title: </div> <div class="attr_content">{{ ds.entry_id}} </div>

Then css needs to define only two classes: .attr_title and .attr_content

opsdep commented 3 years ago

@aperrin66 @akorosov The complete third template file is pushed here https://github.com/nansencenter/django-geo-spaas-adas-viewer/pull/15/commits/c233db022f6cb95a2c1428520305d76d550a528b

In this pr you only see the empty version of it in a8a79fb