-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Title now features location, which is extracted from the id * Source has service_org and service_title, with the description inside a popup * Instead of the calendar icon, we now use the text "Data collected on" or "Data collected between" based on if the end date is different from the beginning date * Sample mediums are listed * Source Data button is shown if details_url exists * Web Services button is shown pointing to the service url * Last collected value is shown in relative time, using a new toTimeAgo filter * A table of concept keywords is added - This currently only features the keyword name - Values and units will be pulled in the future, see #2238 * There is comment placeholder for adding charts, coming in #2238 * Citation in the bottom * Some style edits to make it all fit The popover() and bootstrapTable() functions will only execute if the template has any corresponding data-toggle elements. Thus, they noop for CINERGI and HydroShare.
- Loading branch information
Showing
4 changed files
with
103 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 58 additions & 8 deletions
66
src/mmw/js/src/data_catalog/templates/resultDetailsCuahsi.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,79 @@ | ||
<div class="result"> | ||
<div class="result-detail-header"> | ||
<h2> | ||
{{ title }} | ||
</h2> | ||
<button type="button" class="close" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
<a href="#"><i class="fa fa-search-plus"></i> Zoom to extent</a> | ||
<h2> | ||
Site: {{ location }} {{ title }} | ||
</h2> | ||
<p> | ||
Source: {{ service_org }} {{ service_title }} | ||
<a data-toggle="popover" tabindex="0" | ||
data-html="true" data-container="body" role="button" | ||
data-content="{{ description }}" | ||
data-template="<div class='popover'><div class='pull-right' id='popover-close-button'><i class='fa fa-times' /></div><div class='popover-content'></div><div class='arrow'></div></div>"> | ||
<i class="fa fa-info-circle black"></i> | ||
</a> | ||
</p> | ||
<p> | ||
<!-- TODO Make This Work --> | ||
<a class="zoom" href="#"> | ||
<i class="fa fa-search-plus"></i> Zoom to extent | ||
</a> | ||
</p> | ||
</div> | ||
<hr> | ||
{% if author %} | ||
<p> | ||
<i class="fa fa-user"></i>{{ author }} | ||
</p> | ||
{% endif %} | ||
{% if begin_date == end_date %} | ||
<p> | ||
<i class="fa fa-calendar"></i> {{ begin_date|toDateWithoutTime }} | ||
Data collected on: {{ begin_date|toDateWithoutTime }} | ||
</p> | ||
{% else %} | ||
<p> | ||
<i class="fa fa-calendar"></i> {{ begin_date|toDateWithoutTime }} - {{ end_date|toDateWithoutTime }} | ||
Data collected between: {{ begin_date|toDateWithoutTime }} - {{ end_date|toDateWithoutTime }} | ||
</p> | ||
{% endif %} | ||
<p> | ||
{{ description }} | ||
Medium: {{ sample_mediums|join(", ") }} | ||
</p> | ||
<p> | ||
{% if details_url %} | ||
<a class="btn btn-secondary" href="{{ details_url }}" | ||
target="_blank" rel="noreferrer noopener"> | ||
<i class="fa fa-external-link-square"></i> Source Data | ||
</a> | ||
{% endif %} | ||
<a class="btn btn-secondary" href="{{ service_url }}" | ||
target="_blank" rel="noreferrer noopener"> | ||
<i class="fa fa-globe"></i> Web Services | ||
</a> | ||
</p> | ||
<hr /> | ||
<p> | ||
Last collected value {{ end_date|toTimeAgo }}: | ||
</p> | ||
<table class="table custom-hover" data-toggle="table"> | ||
<thead> | ||
<tr> | ||
<th>Variable</th> | ||
<th class="text-right">Value</th> | ||
<th>Units</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for ck in concept_keywords %} | ||
<tr> | ||
<td>{{ ck }}</td> | ||
<td class="text-right"><!-- TODO Fetch Values --></td> | ||
<td><!-- TODO Fetch Units --></td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
<!-- TODO Insert Chart https://github.com/WikiWatershed/model-my-watershed/issues/2238 --> | ||
<hr /> | ||
<p>Citation: {{ service_citation }}</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters