Skip to content

Commit 289369e

Browse files
committed
Tweak UI details on index page, header, and footer (RPB-152)
1 parent a5830ba commit 289369e

File tree

8 files changed

+40
-35
lines changed

8 files changed

+40
-35
lines changed

app/controllers/HomeController.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,14 @@ public static String formatCount(long count) {
687687
return df.format(count);
688688
}
689689

690+
public static String formatName(String name) {
691+
String[] lastAndFirst = name.split(", ");
692+
if (lastAndFirst.length != 2) {
693+
return name;
694+
}
695+
return lastAndFirst[1] + " " + lastAndFirst[0];
696+
}
697+
690698
private String attribution(String url) {
691699
try {
692700
return requestInfo(httpClient, url).thenApply(info -> {

app/views/details.scala.html

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -223,22 +223,20 @@
223223
}
224224
} else {
225225
@main("", resource.preferredName, allHits) {
226-
<div class="page-header">
227-
<h1>
228-
@defining("Namen in die Zwischenablage kopieren") { title =>
229-
<a class="invisible-link" data-toggle="tooltip" data-placement="right" title="@title" href="#" onclick="copyToClipboard('@(resource.title)', $(this), '@title'); return false;">
230-
@resource.title
231-
</a>
232-
}
233-
<small>
234-
/ @resource.lifeDates
235-
<div class='pull-right'>
236-
<a title="JSON-LD-Indexdaten anzeigen" href='@routes.HomeController.authorityDotFormat(resource.getId, "json")'>
237-
<img class='json-ld-icon' src='@routes.Assets.versioned("images/json-ld.png")' alt='JSON'/></a>
238-
</div>
239-
</small>
240-
</h1>
241-
</div>
226+
<h1 style="margin-top:0px">
227+
@defining("Namen in die Zwischenablage kopieren") { title =>
228+
<a class="invisible-link" data-toggle="tooltip" data-placement="right" title="@title" href="#" onclick="copyToClipboard('@(resource.title)', $(this), '@title'); return false;">
229+
@resource.title
230+
</a>
231+
}
232+
<small>
233+
/ @resource.lifeDates
234+
<div class='pull-right'>
235+
<a title="JSON-LD-Indexdaten anzeigen" href='@routes.HomeController.authorityDotFormat(resource.getId, "json")'>
236+
<img class='json-ld-icon' src='@routes.Assets.versioned("images/json-ld.png")' alt='JSON'/></a>
237+
</div>
238+
</small>
239+
</h1>
242240
@*
243241
@if(resource.gndRelationEdges != "[]"){
244242
<ul class="nav nav-tabs" role="tablist">

app/views/index.scala.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44

55
@import helper._
66
@import controllers.HomeController.formatCount
7+
@import controllers.HomeController.formatName
78
@import controllers.HomeController.thisDay
89
@import play.api.libs.json._
910
@import controllers.HomeController.CONFIG
1011

1112
@main("", "RPPD", allHits) {
12-
<div class="page-header">
13-
<img class="media-object nrw-logo pull-right" src="@controllers.routes.Assets.versioned("images/wappen.png")" alt="NRW">
14-
<h1>@dataset.get("alternateName").get("de").asText()<br/><small>@formatCount(allHits) Personen aus allen Wissensgebieten <span class="badge">beta</span></small></h1>
15-
</div>
1613
<div class="row">
1714
<div class="col-md-3">
1815
<p><strong>Jubiläen</strong></p>
@@ -37,7 +34,7 @@ <h1>@dataset.get("alternateName").get("de").asText()<br/><small>@formatCount(all
3734
@if(entity!=null){<div class="col-md-3">
3835
<figure>
3936
<a href='@routes.HomeController.authority(entity.getId)'><img width="200px" id="index-image" src='https://lobid.org/[email protected]' alt="Darstellung von @entity.preferredName"/></a>
40-
<figcaption><a href='@routes.HomeController.authority(entity.getId)'>@entity.preferredName</a><br/>@if(entity.imageAttribution!=null){<small>(@Html(entity.imageAttribution))</small>}</figcaption>
37+
<figcaption><a href='@routes.HomeController.authority(entity.getId)'>@formatName(entity.preferredName)</a><br/>@if(entity.imageAttribution!=null){<small>(@Html(entity.imageAttribution))</small>}</figcaption>
4138
</figure>
4239
</div>}
4340
</div>

app/views/main.scala.html

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@
101101
</div><!--/.nav-collapse -->
102102
</div><!--/.container-fluid -->
103103
</div>
104+
<div class="page-header">
105+
<img class="media-object nrw-logo pull-right" src="@controllers.routes.Assets.versioned("images/wappen.png")" alt="RPB">
106+
<h1>Die Rheinland-Pfälzische Personendatenbank<br/><small>@formatCount(allHits) Personen aus allen Wissensgebieten</small></h1>
107+
</div>
104108
@if(!title.contains("API") && !title.contains("Reconcile")){
105109
@helper.form(action = controllers.routes.HomeController.search(q), 'id -> "search-form") {
106110
<div class="input-group" id="search-simple">
@@ -150,18 +154,12 @@
150154
</script>
151155
}
152156
}
153-
<br/>
154-
<div class="alert alert-warning">
155-
Aufgrund einer technischen Störung musste die Rheinland-Pfälzische Personendatenbank (RPPD) in ihrer bisherigen Form abgeschaltet
156-
werden und auf eine neue Oberfläche umziehen. Bitte beachten Sie, dass es sich hierbei um eine Version handelt, in der
157-
noch nicht alle Funktionen umgesetzt sind. Wir sind bestrebt, dies fortlaufend zu verbessern.
158-
</div>
159157
@content
160158
<div class="panel panel-default nwbib-footer">
161159
<div class="panel-body">
162-
<img class="media-object pull-left nrw-wappen" src="@controllers.routes.Assets.versioned("images/wappen.png")" alt="NRW-Wappen">
163-
<img class="media-object pull-right hbz-logo" src="@controllers.routes.Assets.versioned("images/hbz.png")" alt="hbz-Logo">
164-
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>
160+
<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>
161+
<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>
162+
Die RPPD enthält aktuell @formatCount(allHits) Personen
165163
</div>
166164
</div>
167165
</div>

conf/dataset.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"de":"Die Rheinland-Pfälzische Personendatenbank"
2828
},
2929
"description":{
30-
"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>"
30+
"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>"
3131
},
3232
"keywords":[
3333
"authority data",

public/stylesheets/bootstrap.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/stylesheets/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@gray": "lighten(#000, 33.5%)",
77
"@gray-light": "lighten(#000, 46.7%)",
88
"@gray-lighter": "lighten(#000, 93.5%)",
9-
"@brand-primary": "#E9301C",
9+
"@brand-primary": "#861a22",
1010
"@brand-success": "#5cb85c",
1111
"@brand-info": "lighten(@brand-primary, 25%)",
1212
"@brand-warning": "#f0ad4e",

public/stylesheets/main.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dd {
1212
}
1313

1414
#search-form {
15-
padding-bottom: 0em;
15+
padding-bottom: 3.5em;
1616
}
1717

1818
input#owner {
@@ -134,7 +134,7 @@ ul.facet li {
134134
}
135135

136136
#search-results {
137-
padding-top: 2em;
137+
padding-top: 0em;
138138
}
139139

140140
.nwbib-footer {
@@ -360,3 +360,7 @@ figcaption {
360360
.biogramme {
361361
column-width: 30em;
362362
}
363+
364+
.page-header {
365+
border: none;
366+
}

0 commit comments

Comments
 (0)