Skip to content

Commit

Permalink
Support an array (and string) for skos terms on website
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdesmet committed Oct 31, 2023
1 parent 1a38db5 commit bbc012d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions _layouts/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ <h2 id="{{ p1_id }}">
{{ p1.description | markdownify }}

{% if p1['skos:exactMatch'] %}
<p class="small text-muted">Same as <a href="{{ p1['skos:exactMatch'] }}">{{ p1['skos:exactMatch'] }}</a></p>
<p class="small text-muted">Same as {% for term in p1['skos:exactMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</p>
{% elsif p1['skos:narrowMatch'] %}
<p class="small text-muted">Broader than <a href="{{ p1['skos:narrowMatch'] }}">{{ p1['skos:narrowMatch'] }}</a></p>
<p class="small text-muted">Broader than {% for term in p1['skos:narrowMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</p>
{% elsif p1['skos:broadMatch'] %}
<p class="small text-muted">Narrower than <a href="{{ p1['skos:broadMatch'] }}">{{ p1['skos:broadMatch'] }}</a></p>
<p class="small text-muted">Narrower than {% for term in p1['skos:broadMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</p>
{% endif %}

{% if p1.properties %}
Expand Down Expand Up @@ -84,11 +84,11 @@ <h2 id="{{ p1_id }}">
</p>
{% endif %}
{% if p2['skos:exactMatch'] %}
<span class="small text-muted">Same as <a href="{{ p2['skos:exactMatch'] }}">{{ p2['skos:exactMatch'] }}</a></span>
<span class="small text-muted">Same as {% for term in p2['skos:exactMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</span>
{% elsif p2['skos:narrowMatch'] %}
<span class="small text-muted">Broader than <a href="{{ p2['skos:narrowMatch'] }}">{{ p2['skos:narrowMatch'] }}</a></span>
<span class="small text-muted">Broader than {% for term in p2['skos:narrowMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</span>
{% elsif p2['skos:broadMatch'] %}
<span class="small text-muted">Narrower than <a href="{{ p2['skos:broadMatch'] }}">{{ p2['skos:broadMatch'] }}</a></span>
<span class="small text-muted">Narrower than {% for term in p2['skos:broadMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</span>
{% endif %}
</td>
<td><span class="badge bg-secondary">{{ p2.type }}</span></td>
Expand Down
6 changes: 3 additions & 3 deletions _layouts/tables.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ <h2 id="{{ table_schema_id }}">{{ table_schema.title }}</h2>
{% endif %}
<ul class="list-unstyled mb-0">
{% if field['skos:exactMatch'] %}
<li class="small text-muted">Same as <a href="{{ field['skos:exactMatch'] }}">{{ field['skos:exactMatch'] }}</a></li>
<li class="small text-muted">Same as {% for term in field['skos:exactMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</li>
{% endif %}
{% if field['skos:narrowMatch'] %}
<li class="small text-muted">Broader than <a href="{{ field['skos:narrowMatch'] }}">{{ field['skos:narrowMatch'] }}</a></li>
<li class="small text-muted">Broader than {% for term in field['skos:narrowMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</a></li>
{% endif %}
{% if field['skos:broadMatch'] %}
<li class="small text-muted">Narrower than <a href="{{ field['skos:broadMatch'] }}">{{ field['skos:broadMatch'] }}</a></li>
<li class="small text-muted">Narrower than {% for term in field['skos:broadMatch'] %}<a href="{{ term }}">{{ term }}</a> {% endfor %}</a></li>
{% endif %}
</ul>
</td>
Expand Down

0 comments on commit bbc012d

Please sign in to comment.