-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding schema template and bug fixes to main
- Loading branch information
leah
committed
Mar 25, 2024
1 parent
302690d
commit bcfbe24
Showing
3 changed files
with
87 additions
and
20 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{% if config['server']['templates']['base'] %} | ||
{% extends config['server']['templates']['base'] %} | ||
{% else %} | ||
{% extends "_base.html" %} | ||
{% endif %} | ||
{% block title %}{{ super() }} {{ data['title'] }} {% endblock %} | ||
{% block crumbs %}{{ super() }} | ||
<li><a href="../../collections?lang={{ (locale|lower)[:2] }}">{% trans %}Collections{% endtrans %}</a></li> | ||
<li><a href="{{ data['$id']|replace('/schema', '') }}?lang={{ (locale|lower)[:2] }}">{{ data['title'] }}</a></li> | ||
<li><a href="./{{ data['id'] }}schema?lang={{ (locale|lower)[:2] }}">{% trans %}Schema{% endtrans %}</a></a></li> | ||
{% endblock %} | ||
{% block body %} | ||
<section id="collection-schema"> | ||
<h1>{{ data['title'] }}</h1> | ||
<p>{{ data['description'] }}</p> | ||
<p> | ||
{% for kw in data['keywords'] %} | ||
<span class="badge text-bg-primary bg-primary">{{ kw }}</span> | ||
{% endfor %} | ||
</p> | ||
<h3>{% trans %}Schema{% endtrans %}</h3> | ||
<table class="table table-striped table-bordered"> | ||
<th>Name</th> | ||
<th>Title</th> | ||
<th>Type</th> | ||
<th>Units</th> | ||
<th>Values</th> | ||
<ul> | ||
{% for qname, qinfo in data['properties'].items() %} | ||
<tr> | ||
<td>{{ qname }}</td> | ||
<td>{{ qinfo['title'] }}</td> | ||
{% if qname == 'geometry' %} | ||
<td><a href="{{ qinfo['$ref'] }}">{{ qname }} </a></td> | ||
{% else %} | ||
<td><code>{{ qinfo['type'] }}</code></td> | ||
{% endif %} | ||
<td>{{ qinfo['x-ogc-unit'] }}</td> | ||
<td> | ||
<ul> | ||
{% for value in qinfo['enum'] %} | ||
<li><i>{{ value }}</i></li> | ||
{% endfor %} | ||
</ul> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</section> | ||
{% endblock %} |