Skip to content

Commit

Permalink
Tweak UI details on index page, header, and footer (RPB-152)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Mar 21, 2024
1 parent a5830ba commit 289369e
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 35 deletions.
8 changes: 8 additions & 0 deletions app/controllers/HomeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,14 @@ public static String formatCount(long count) {
return df.format(count);
}

public static String formatName(String name) {
String[] lastAndFirst = name.split(", ");
if (lastAndFirst.length != 2) {
return name;
}
return lastAndFirst[1] + " " + lastAndFirst[0];
}

private String attribution(String url) {
try {
return requestInfo(httpClient, url).thenApply(info -> {
Expand Down
30 changes: 14 additions & 16 deletions app/views/details.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,20 @@
}
} else {
@main("", resource.preferredName, allHits) {
<div class="page-header">
<h1>
@defining("Namen in die Zwischenablage kopieren") { title =>
<a class="invisible-link" data-toggle="tooltip" data-placement="right" title="@title" href="#" onclick="copyToClipboard('@(resource.title)', $(this), '@title'); return false;">
@resource.title
</a>
}
<small>
/ @resource.lifeDates
<div class='pull-right'>
<a title="JSON-LD-Indexdaten anzeigen" href='@routes.HomeController.authorityDotFormat(resource.getId, "json")'>
<img class='json-ld-icon' src='@routes.Assets.versioned("images/json-ld.png")' alt='JSON'/></a>
</div>
</small>
</h1>
</div>
<h1 style="margin-top:0px">
@defining("Namen in die Zwischenablage kopieren") { title =>
<a class="invisible-link" data-toggle="tooltip" data-placement="right" title="@title" href="#" onclick="copyToClipboard('@(resource.title)', $(this), '@title'); return false;">
@resource.title
</a>
}
<small>
/ @resource.lifeDates
<div class='pull-right'>
<a title="JSON-LD-Indexdaten anzeigen" href='@routes.HomeController.authorityDotFormat(resource.getId, "json")'>
<img class='json-ld-icon' src='@routes.Assets.versioned("images/json-ld.png")' alt='JSON'/></a>
</div>
</small>
</h1>
@*
@if(resource.gndRelationEdges != "[]"){
<ul class="nav nav-tabs" role="tablist">
Expand Down
7 changes: 2 additions & 5 deletions app/views/index.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@

@import helper._
@import controllers.HomeController.formatCount
@import controllers.HomeController.formatName
@import controllers.HomeController.thisDay
@import play.api.libs.json._
@import controllers.HomeController.CONFIG

@main("", "RPPD", allHits) {
<div class="page-header">
<img class="media-object nrw-logo pull-right" src="@controllers.routes.Assets.versioned("images/wappen.png")" alt="NRW">
<h1>@dataset.get("alternateName").get("de").asText()<br/><small>@formatCount(allHits) Personen aus allen Wissensgebieten <span class="badge">beta</span></small></h1>
</div>
<div class="row">
<div class="col-md-3">
<p><strong>Jubiläen</strong></p>
Expand All @@ -37,7 +34,7 @@ <h1>@dataset.get("alternateName").get("de").asText()<br/><small>@formatCount(all
@if(entity!=null){<div class="col-md-3">
<figure>
<a href='@routes.HomeController.authority(entity.getId)'><img width="200px" id="index-image" src='https://lobid.org/imagesproxy?url=@entity.getImage.image' alt="Darstellung von @entity.preferredName"/></a>
<figcaption><a href='@routes.HomeController.authority(entity.getId)'>@entity.preferredName</a><br/>@if(entity.imageAttribution!=null){<small>(@Html(entity.imageAttribution))</small>}</figcaption>
<figcaption><a href='@routes.HomeController.authority(entity.getId)'>@formatName(entity.preferredName)</a><br/>@if(entity.imageAttribution!=null){<small>(@Html(entity.imageAttribution))</small>}</figcaption>
</figure>
</div>}
</div>
Expand Down
16 changes: 7 additions & 9 deletions app/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
</div>
<div class="page-header">
<img class="media-object nrw-logo pull-right" src="@controllers.routes.Assets.versioned("images/wappen.png")" alt="RPB">
<h1>Die Rheinland-Pfälzische Personendatenbank<br/><small>@formatCount(allHits) Personen aus allen Wissensgebieten</small></h1>
</div>
@if(!title.contains("API") && !title.contains("Reconcile")){
@helper.form(action = controllers.routes.HomeController.search(q), 'id -> "search-form") {
<div class="input-group" id="search-simple">
Expand Down Expand Up @@ -150,18 +154,12 @@
</script>
}
}
<br/>
<div class="alert alert-warning">
Aufgrund einer technischen Störung musste die Rheinland-Pfälzische Personendatenbank (RPPD) in ihrer bisherigen Form abgeschaltet
werden und auf eine neue Oberfläche umziehen. Bitte beachten Sie, dass es sich hierbei um eine Version handelt, in der
noch nicht alle Funktionen umgesetzt sind. Wir sind bestrebt, dies fortlaufend zu verbessern.
</div>
@content
<div class="panel panel-default nwbib-footer">
<div class="panel-body">
<img class="media-object pull-left nrw-wappen" src="@controllers.routes.Assets.versioned("images/wappen.png")" alt="NRW-Wappen">
<img class="media-object pull-right hbz-logo" src="@controllers.routes.Assets.versioned("images/hbz.png")" alt="hbz-Logo">
Die RPPD enthält aktuell @formatCount(allHits) Personen | Ein Entwicklungsprojekt von <a href="https://lbz.rlp.de/">lbz</a> &amp; <a href="http://www.hbz-nrw.de/">hbz</a>
<a href="https://lbz.rlp.de/"><img class="media-object pull-left nrw-wappen" src="@controllers.routes.Assets.versioned("images/wappen.png")" alt="RLP-Wappen"></a>
<a href="http://www.hbz-nrw.de/"><img class="media-object pull-right hbz-logo" src="@controllers.routes.Assets.versioned("images/hbz.png")" alt="hbz-Logo"></a>
Die RPPD enthält aktuell @formatCount(allHits) Personen
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion conf/dataset.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"de":"Die Rheinland-Pfälzische Personendatenbank"
},
"description":{
"de":"<p class='lead'>Die Rheinland-Pfälzische Personendatenbank (RPPD) ist eine regionale Dokumentation zu Personen aus dem Bundesland und seinen historischen Vorläufern. Verzeichnet werden Biogramme von Persönlichkeiten öffentlichen Interesses, ihre Lebensdaten, Berufe und Wirkungsorte.</p><p>Die RPPD dient so als stetig wachsendes biographisches Lexikon bedeutender Menschen aus Rheinland-Pfalz. Quellen sind Bücher, Aufsätze aus Zeitschriften, Jahrbüchern, Tages- und Wochenzeitungen sowie Einzelbeiträge aus Sammelwerken. Die Datenbank ist im Aufbau begriffen. Die RPPD wird von Mitarbeitern der Stadtbibliotheken Mainz und Trier sowie des Landesbibliothekszentrums an den Standorten Speyer und Koblenz gemeinsam erarbeitet. Das Landesbibliothekszentrums betreut mit dem hbz die für die Bereitstellung der Bibliographie erforderliche Datenverarbeitung.</p>"
"de":"<p class='lead'>Die Rheinland-Pfälzische Personendatenbank (RPPD) ist eine regionale Dokumentation zu Personen aus dem Bundesland und seinen historischen Vorläufern. Verzeichnet werden Biogramme von Persönlichkeiten öffentlichen Interesses, ihre Lebensdaten, Berufe und Wirkungsorte.</p>"
},
"keywords":[
"authority data",
Expand Down
2 changes: 1 addition & 1 deletion public/stylesheets/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/stylesheets/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 46.7%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#E9301C",
"@brand-primary": "#861a22",
"@brand-success": "#5cb85c",
"@brand-info": "lighten(@brand-primary, 25%)",
"@brand-warning": "#f0ad4e",
Expand Down
8 changes: 6 additions & 2 deletions public/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dd {
}

#search-form {
padding-bottom: 0em;
padding-bottom: 3.5em;
}

input#owner {
Expand Down Expand Up @@ -134,7 +134,7 @@ ul.facet li {
}

#search-results {
padding-top: 2em;
padding-top: 0em;
}

.nwbib-footer {
Expand Down Expand Up @@ -360,3 +360,7 @@ figcaption {
.biogramme {
column-width: 30em;
}

.page-header {
border: none;
}

0 comments on commit 289369e

Please sign in to comment.