Commit 60b3b11f authored by barth23's avatar barth23
Browse files

Merge branch 'staging' into 'feature/register-list-view'

# Conflicts:
#   templates/register.html
parents a0fb26d7 72c3a5d5
......@@ -449,97 +449,97 @@
<word key="publicRegisterLink">
<lang key="de">Öffentliches Verzeichnis: </lang>
<lang key="en">Public Register Link: </lang>
<lang key="fr">Référentiel: </lang>
<lang key="fr">Référentiel : </lang>
</word>
<word key="registerNationality">
<lang key="de">Nationalität: </lang>
<lang key="en">Nationality: </lang>
<lang key="fr">Nationalité: </lang>
<lang key="fr">Nationalité : </lang>
</word>
<word key="registerFunction">
<lang key="de">Funktionen: </lang>
<lang key="en">Function: </lang>
<lang key="fr">Fonction(s): </lang>
<lang key="fr">Fonction(s) : </lang>
</word>
<word key="registerBirthdate">
<lang key="de">Geburtsdatum: </lang>
<lang key="en">Birthdate: </lang>
<lang key="fr">Date de naissance: </lang>
<lang key="fr">Date de naissance : </lang>
</word>
<word key="registerBirthplace">
<lang key="de">Geburtsort: </lang>
<lang key="en">Birthplace: </lang>
<lang key="fr">Lieu de naissance: </lang>
<lang key="fr">Lieu de naissance : </lang>
</word>
<word key="registerDeathdate">
<lang key="de">Sterbedatum: </lang>
<lang key="en">Deathdate: </lang>
<lang key="fr">Date de décès: </lang>
<lang key="fr">Date de décès : </lang>
</word>
<word key="registerDeathplace">
<lang key="de">Sterbeort: </lang>
<lang key="en">Deathplace: </lang>
<lang key="fr">Lieu de décès: </lang>
<lang key="fr">Lieu de décès : </lang>
</word>
<word key="registerType">
<lang key="de">Kategorie: </lang>
<lang key="en">Type: </lang>
<lang key="fr">Catégorie: </lang>
<lang key="fr">Catégorie : </lang>
</word>
<word key="registerPlaceNameCurrent">
<lang key="de">Aktueller Ortsname: </lang>
<lang key="en">PlaceName (current): </lang>
<lang key="fr">Nom actuel: </lang>
<lang key="fr">Nom actuel : </lang>
</word>
<word key="registerPlaceNameHistorical">
<lang key="de">Historischer Ortsname: </lang>
<lang key="en">PlaceName (historical): </lang>
<lang key="fr">Nom historique: </lang>
<lang key="fr">Nom historique : </lang>
</word>
<word key="registerState">
<lang key="de">Zustand: </lang>
<lang key="en">State: </lang>
<lang key="fr">État actuel: </lang>
<lang key="fr">État actuel : </lang>
</word>
<word key="registerArtist">
<lang key="de">Künstler/Autor(en): </lang>
<lang key="en">Artist: </lang>
<lang key="fr">Artiste(s)/Auteur(s): </lang>
<lang key="fr">Artiste(s)/Auteur(s) : </lang>
</word>
<word key="registerConstruction">
<lang key="de">Chronologie: </lang>
<lang key="en">Construction: </lang>
<lang key="fr">Chronologie: </lang>
<lang key="fr">Chronologie : </lang>
</word>
<word key="registerLocation">
<lang key="de">Geolokalisation: </lang>
<lang key="en">Location: </lang>
<lang key="fr">Géolocalisation: </lang>
<lang key="fr">Géolocalisation : </lang>
</word>
<word key="registerDate">
<lang key="de">Datum: </lang>
<lang key="en">Date: </lang>
<lang key="fr">Date(s): </lang>
<lang key="fr">Date(s) : </lang>
</word>
<word key="registerMaterial">
<lang key="de">Material und Technik: </lang>
<lang key="en">Material: </lang>
<lang key="fr">Matières et techniques: </lang>
<lang key="fr">Matières et techniques : </lang>
</word>
<word key="registerDimensions">
<lang key="de">Maße: </lang>
<lang key="en">Dimensions: </lang>
<lang key="fr">Dimensions: </lang>
<lang key="fr">Dimensions : </lang>
</word>
<word key="registerLocationCurrent">
<lang key="de">Aktueller Aufbewahrungsort: </lang>
<lang key="en">Dimensions: </lang>
<lang key="fr">Localisation actuelle: </lang>
<lang key="fr">Localisation actuelle : </lang>
</word>
<word key="registerLocationFormer">
<lang key="de">Ehemaliger Aufbewahrungsort: </lang>
<lang key="en">Dimensions: </lang>
<lang key="fr">Localisation ancienne: </lang>
<lang key="fr">Localisation ancienne : </lang>
</word>
<word key="citationRecommendation">
<lang key="de">Zitationsempfehlung für diese Edition</lang>
......
......@@ -105,7 +105,7 @@ declare
%output:method("json")
function registerapi:get-persons-in-works($id as xs:string*) as element(response) {
let $doc := doc("/db/apps/sade-architrave/templates/register/works.xml")
let $persons := $doc//tei:text//tei:persName[@ref='textgrid:'||$id]
let $persons := $doc//tei:text//tei:persName[@ref='psn:textgrid:'||$id]
return <resp>
{for $node in $persons return
element tei:persName {
......
......@@ -379,17 +379,24 @@ return
<span id="page{string($node/@n)}" class="pb" facs="{ string($node/@facs) }">{ string($node/@n) }</span>
case element ( tei:fw ) return
if (string($node/@place) = 'top-right') then (
<div class="tei-fw" style="text-align:left"><span class="fw {string($node/@place)}">{ string($node) }</span></div>
<div class="tei-fw" style="text-align:right"><span class="fw {string($node/@place)}">{ local:magic($node/node()) }</span></div>
)
else (
<div class="tei-fw" style="text-align:left"><span class="fw {string($node/@place)}">{ string($node) }</span></div>
<div class="tei-fw" style="text-align:left"><span class="fw {string($node/@place)}">{ local:magic($node/node()) }</span></div>
)
case element ( tei:choice ) return
if (string('') = string('')) then (
if ($node/tei:abbr) then (
<abbr class="abbr-yes" style="display:inline" title="{$node/tei:expan}">{ local:magic($node/tei:abbr) }</abbr>,
<abbr class="abbr-no" style="display:none" title="{$node/tei:abbr}">{ local:magic($node/tei:expan) }</abbr>
)
else ()
else if ($node/tei:sic) then (
<abbr class="corr-yes" style="display:inline" title="{$node/tei:corr}">{ local:magic($node/tei:sic) }</abbr>,
<abbr class="corr-no" style="display:none" title="{$node/tei:sic}">{ local:magic($node/tei:corr) }</abbr>
)
else
()
case element (tei:date) return
<span class="tei-date" data-toggle="tooltip" data-placement="bottom" title="{local:castDate(string($node/@when))}">{local:magic($node/node())}<i class="far fa-calendar-alt"></i></span>(: put a span around! is this ok? :)
case element ( tei:lb ) return
......@@ -398,54 +405,71 @@ return
<span class="hi {string($node/@rend)}" rend="{string($node/@rend)}">{ local:magic($node/node()) }</span>
case element ( tei:supplied ) return
<span class="tei-add"><span class="tei-add-bracket">⟨</span>{string($node)}<span class="tei-add-bracket">⟩</span></span>
case element ( tei:placeName ) return
if (($node/@subtype) = 'rooms') then (
<span class="placeName">{local:magic($node/node())}</span>,
<a class="placeName" href="#" onclick="openPlaceName('{substring-before(string($node/@ref),' ')}')" textgridURI="{substring-before(string($node/@ref),' ')}">
<i class="fas fa-map-marker-alt"></i>
</a>,
<a class="placeName" href="#" onclick="openPlaceName('{substring-after(string($node/@ref),' ')}')" textgridURI="{substring-after(string($node/@ref),' ')}">
<i class="fas fa-map-marker-alt"></i>
</a>
)
else (
<a class="placeName" href="#" onclick="openPlaceName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="placeName">{local:magic($node/node())}</span>
<i class="fas fa-map-marker-alt"></i>
</a>
)
let $refs := tokenize($node/@ref, " ")
return
if ( count($refs) gt 1) then
(<span class="placeName">{local:magic($node/node())}</span>,
for $ref in $refs return
<a class="placeName" href="#" onclick="openPlaceName('{$ref}')" textgridURI="{$ref}">
<i class="fas fa-map-marker-alt"></i>
</a>
)
else
<a class="placeName" href="#" onclick="openPlaceName('{$refs}')" textgridURI="{$refs}">
<span class="placeName">{local:magic($node/node())}</span>
<i class="fas fa-map-marker-alt"></i>
</a>
case element ( tei:geogName ) return
<a class="placeName" href="#" onclick="openPlaceName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="placeName">{local:magic($node/node())}</span>
<i class="fas fa-map-marker-alt"></i>
</a>
let $refs := tokenize($node/@ref, " ")
return
if ( count($refs) gt 1 ) then
(<span class="placeName">{local:magic($node/node())}</span>,
for $ref in $refs return
<a class="placeName" href="#" onclick="openPlaceName('{$ref}')" textgridURI="{$ref}">
<i class="fas fa-map-marker-alt"></i>
</a>)
else
<a class="placeName" href="#" onclick="openPlaceName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="placeName">{local:magic($node/node())}</span>
<i class="fas fa-map-marker-alt"></i>
</a>
case element ( tei:persName ) return
if (($node/@subtype) = 'persons') then (
<span class="persName">{local:magic($node/node())}</span>,
<a class="persName" href="#" onclick="openPersName('{substring-before(string($node/@ref),' ')}')" textgridURI="{substring-before(string($node/@ref),' ')}">
<i class="fas fa-user"></i>
</a>,
<a class="persName" href="#" onclick="openPersName('{substring-after(string($node/@ref),' ')}')" textgridURI="{substring-after(string($node/@ref),' ')}">
<i class="fas fa-user"></i>
</a>
)
else if (($node/@subtype) = 'family') then (
<a class="persName" href="#" onclick="openPersName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="persName">{local:magic($node/node())}</span>
<i class="fas fa-users"></i>
</a>
)
else (
<a class="persName" href="#" onclick="openPersName('{string($node/@ref)}')" textgridURI="{$node/@ref}">
<span class="persName">{local:magic($node/node())}</span>
<i class="fas fa-user"></i>
</a>
)
let $refs := tokenize($node/@ref, " ")
return
if ( count($refs) gt 1) then
(<span class="persName">{local:magic($node/node())}</span>,
for $ref in $refs return
<a class="persName" href="#" onclick="openPersName('{$ref}')" textgridURI="{$ref}">
<i class="fas fa-user"></i>
</a>)
else
<a class="persName" href="#" onclick="openPersName('{$refs}')" textgridURI="{$refs}">
<span class="persName">{local:magic($node/node())}</span>
{if ( $node/@subtype = "family" ) then
<i class="fas fa-users"></i>
else
<i class="fas fa-user"></i>}
</a>
case element ( tei:rs ) return
<a class="ArtWork" href="#" onclick="openArtWork('{string($node/@ref)}')" textgridURI="{$node/@ref}" type="{string($node/@type)}">
<span class="ArtWork">{local:magic($node/node())}</span>
<i class="far fa-gem"></i>
</a>
let $refs := tokenize($node/@ref, " ")
return
if ( count($refs) gt 1 ) then
(<span class="ArtWork">{local:magic($node/node())}</span>,
for $ref in $refs return
<a class="ArtWork" href="#" onclick="openArtWork('{$ref}')" textgridURI="{$ref}" type="{string($node/@type)}">
<i class="far fa-gem"></i>
</a>)
else
<a class="ArtWork" href="#" onclick="openArtWork('{$refs}')" textgridURI="{$node/@ref}" type="{string($node/@type)}">
<span class="ArtWork">{local:magic($node/node())}</span>
<i class="far fa-gem"></i>
</a>
case element ( tei:del ) return
<span class="del"><strike>{string($node)}</strike></span>
case element ( tei:unclear ) return
......@@ -558,6 +582,44 @@ return
)
else (local:magic($node/node()))
case element ( tei:table ) return
local:parse-table($node)
case element ( tei:metamark ) return
element div {
attribute class {"horizontalRule"}
}
case element ( tei:list ) return
element div {
attribute class {"list"},
local:magic($node/node())
}
case element ( tei:item ) return
element span {
attribute class {"tei-item"},
local:magic($node/node())
}
case element ( tei:label ) return
element span {
if ( $node[@rend="center"] ) then
attribute class { "centeredText" }
else
(),
local:magic($node/node())
}
case element ( tei:head ) return
element span {
if ( $node[@rend="center"] ) then
attribute class { "centeredText" }
else
(),
local:magic($node/node())
}
default return
local:magic($node/node())}
......@@ -568,3 +630,27 @@ return
}
}
};
declare function local:parse-table($table as element(tei:table)) as element(div) {
let $head := $table/tei:head
let $foot := $table/tei:trailer
return
element div {
attribute class { "table-container" },
element table {
if ( $head ) then element caption { local:magic($head/node()) } else (),
element tbody {
let $rows := $table/tei:row
for $row in $rows
let $cells := $row/tei:cell
return
element tr {
for $cell in $cells return
element td { local:magic($cell/node()) }
}
}
},
if ( $foot ) then local:magic($foot/node()) else ()
}
};
\ No newline at end of file
......@@ -70,3 +70,50 @@ button:focus {
filter: gray; /* Internet Explorer IE6-9 */
-webkit-filter: grayscale(1); /* Old WebKit Browsers */
}
.latin {
font-family: "ModernAntiqua", sans-serif;
font-size: 0.85em;
}
.italic {
font-style: italic;
}
.underline {
text-decoration: underline;
}
table {
width: 100%;
}
caption {
caption-side: top;
color: inherit;
padding: 0;
}
.horizontalRule {
border-bottom: 1px solid black;
display: inline-block;
top: -0.5rem;
position: relative;
width: 20%;
}
.tei-item {
display: list-item;
list-style: none;
margin-left: 1rem;
}
.topRight {
float: right;
}
.centeredText {
display: flow-root;
margin: auto;
width: 50%;
}
\ No newline at end of file
......@@ -414,9 +414,9 @@ function getRegArtist(arrayArtists, regElementID) {
} else if ((arrayArtists[i].length > 0) && !(arrayArtists[i].includes('http'))) {
//Artist without link
newArtistLinkIcon = '';
newArtistLink = '';
newArtistLinkBoolean = false;
newArtistID = '';
newArtistText = arrayArtists[i]['#text'].toString();
newArtistText = arrayArtists[i].toString().replace("<", "").replace(">", "");
} else {
console.log("ERROR: getRegArtist(): unknown artist")
}
......@@ -1649,7 +1649,6 @@ function getRestAPIPlaces(textGridURI) {
console.log(data.place.location.geo);
if (typeof output === 'string') {
console.log("output=string");
setRegElement('#regPlaceLocation', output)
var result = output;
result = result.trim();
result = "http://www.google.com/maps/place/" + result;
......@@ -1735,6 +1734,15 @@ function getRestAPIWorks(textGridURI) {
hideRegElement('#regWorkIDNOType');
}
try {
output = data.item.idno['xml:base'];
if (typeof output === 'string') {
setRegElementLink('#regWorkIDNOLink', output)
} else {
hideRegElement('#regWorkIDNOLink')
}
} catch (e) {
hideRegElement('#regWorkIDNOLink');
}try {
output = data.item.subtype;
if (typeof output === 'string') {
setRegElement('#regWorkType', translateTypeWork(output))
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment