-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add routes, controller, and view template for dataset description
See #134
- Loading branch information
Showing
7 changed files
with
100 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@* Copyright 2014-2018 Fabian Steeg, hbz. Licensed under the GPLv2 *@ | ||
|
||
@(json: com.fasterxml.jackson.databind.JsonNode) | ||
|
||
@import helper._ | ||
|
||
@main("", "Dataset: lobid-gnd") { | ||
<h3>Datenbeschreibung<small><a title="Beschreibung als JSON-LD anzeigen" href='@routes.HomeController.dataset("json")'><img class='json-ld-icon' src='@routes.Assets.versioned("images/json-ld.png")'></a></small></h3> | ||
<table class="table table-striped"> | ||
<tr><th width="20%"/><th width="80%"/></tr> | ||
<tr> | ||
<td>Titel</td> | ||
<td><a href='@json.get("id").asText()'> | ||
@json.get("name").get("de").asText() — @json.get("alternateName").get("de").asText() | ||
</a></td> | ||
</tr> | ||
<tr><td>Beschreibung</td><td>@Html(json.get("description").get("de").asText())</td></tr> | ||
<tr> | ||
<td>Schlagwörter</td> | ||
<td>@json.get("keywords").toString().replaceAll("\",\"", ", ").replaceAll("[\"\\[\\]]", "")</td> | ||
</tr> | ||
@defining(json.get("publisher")) { pub => | ||
<tr> | ||
<td>Veröffentlicht von</td> | ||
<td><a href='@pub.get("id").asText()'> | ||
@pub.get("name").get("de").asText() — @pub.get("alternateName").elements().next().asText() | ||
</a></td> | ||
</tr> | ||
} | ||
<tr><td>Basiert auf</td><td><a href='@json.get("isBasedOn").get("url").asText()'>@json.get("isBasedOn").get("name").get("de").asText()</a></td></tr> | ||
<tr><td>Veröffentlicht am</td><td>@json.get("datePublished").asText()</td></tr> | ||
<tr><td>Sprache</td><td>@json.get("inLanguage").elements().next().asText()</td></tr> | ||
<tr><td>Ergänzungsfrequenz</td><td>@json.get("accrualPeriodicity").get("name").get("de").asText()</td></tr> | ||
<tr><td>Kontakt</td><td><a href='@json.get("contactPoint").asText()'>@json.get("contactPoint").asText()</a></td></tr> | ||
</table> | ||
<h3>Datendistribution</h3> | ||
@defining(json.get("distribution").elements().next()) { dist => | ||
<table class="table table-striped"> | ||
<tr><th width="20%"/><th width="80%"/></tr> | ||
<tr><td>Titel</td><td>@dist.get("name").get("de").asText()</td></tr> | ||
<tr><td>Beschreibung</td><td>@Html(dist.get("description").get("de").asText())</td></tr> | ||
<tr><td>URL</td><td><a href='@dist.get("url").asText()'>@dist.get("url").asText()</a></td></tr> | ||
<tr><td>Lizenz</td><td><a href='@dist.get("license").asText()'>@dist.get("license").asText()</a></td></tr> | ||
<tr><td>Medientypen</td><td>@dist.get("encodingFormat").toString().replaceAll("\",\"", ", ").replaceAll("[\"\\[\\]]", "")</td></tr> | ||
</table> | ||
} | ||
<script type="application/ld+json"> | ||
@Html(json.toString) | ||
</script> | ||
} |
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 |
---|---|---|
|
@@ -59,6 +59,9 @@ | |
<li @if(title=="lobid-gnd - API"){class="active"}> | ||
<a href="@routes.HomeController.api()" title="Programmierschnittstelle">Programmierschnittstelle (API)</a> | ||
</li> | ||
<li @if(title=="Dataset: lobid-gnd"){class="active"}> | ||
<a href='@routes.HomeController.dataset("")'>Datenbeschreibung</a> | ||
</li> | ||
<li class="divider"></li> | ||
<li class="dropdown-header">Kontakt</li> | ||
<li><a href="mailto:semweb@@hbz-nrw.de?subject=Feedback%20zu%20lobid-gnd,%20aktuelle%20URL%[email protected]()">Feedback zur aktuellen Seite</a></li> | ||
|
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
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