-
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.
Merge pull request #2154 from WikiWatershed/arr/tiny-compare-maps
Compare View Revamp: wire up maps and modification popovers
- Loading branch information
Showing
6 changed files
with
146 additions
and
9 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/mmw/js/src/compare/templates/compareDescriptionPopover.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% if is_pre_columbian %} | ||
<h3 class="compare-no-mod-title">{{name}}</h3> | ||
<p> | ||
Lorem ipsum this scenario shows the tr55 model results under pre columbian conditions... | ||
</p> | ||
{% elif is_current_conditions %} | ||
<h3 class="compare-no-mod-title">{{name}}</h3> | ||
<p> | ||
Lorem ipsum this is the model run under current conditions | ||
</p> | ||
{% else %} | ||
<h3 class="compare-no-mod-title">No modifications</h3> | ||
<p> | ||
To add modifications, close this modal and select "Land cover" or "Conservation practices" lorem ipsum dolor sit | ||
</p> | ||
{% endif %} |
23 changes: 23 additions & 0 deletions
23
src/mmw/js/src/compare/templates/compareModificationsPopover.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% macro modificationsTable(caption, modifications) %} | ||
<table class="compare-modifications-table"> | ||
{% if modifications.length > 0 %} | ||
<h5>{{ caption }}</h5> | ||
{% endif %} | ||
<tbody> | ||
{% for mod in modifications %} | ||
<tr> | ||
<td class="modification-value"> | ||
{{ modConfigUtils.getHumanReadableShortName(mod.get('value')) }} | ||
</td> | ||
<td class="modification-area"> | ||
+{{ mod.get('area').toFixed(1) }} {{ mod.get('units') }} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endmacro %} | ||
|
||
<h3>Modifications</h3> | ||
{{ modificationsTable('Land Cover', landCovers) }} | ||
{{ modificationsTable('Conservation Practices', conservationPractices) }} |
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,2 +1,2 @@ | ||
<div class="compare-mapplaceholder"></div> | ||
<h3><span class="scenario-badge"></span> {{ name }}</h3> | ||
<div class="compare-map-container" role="button" data-html="true" data-toggle="popover"></div> | ||
<div class="compare-scenario-title"><span class="scenario-badge"></span> {{ name }}</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
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