Skip to content

Commit

Permalink
added proposed citation and persistent url to footer
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Nov 20, 2013
1 parent 510e412 commit 1bd38be
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion webapp/css/main.css
Expand Up @@ -126,7 +126,7 @@ a:hover {
background-color:#E6E6E6;
}

#footer a {
#supportBadges a {
padding: 0 1em;
}

Expand Down
4 changes: 3 additions & 1 deletion webapp/xml/dictionary_de.xml
Expand Up @@ -151,7 +151,9 @@
<entry xml:id="help">Hilfe</entry>
<entry xml:id="redirect">Weitergeleitet von %1</entry>
<!-- footer -->
<entry xml:id="lastChangeDate">Letzte Änderung am %1 durch %2</entry>
<entry xml:id="lastChangeDateWithAuthor">Letzte Änderung dieses Dokuments am %1 durch %2</entry>
<entry xml:id="lastChangeDateWithoutAuthor">Letzte Änderung dieses Dokuments am %1</entry>
<entry xml:id="proposedCitation">Empfohlene Zitierweise: Carl-Maria-von-Weber-Gesamtausgabe. Digitale Edition</entry>
<!-- Search -->
<entry xml:id="advancedSearch">Erweiterte Suche</entry>
<entry xml:id="WeGA-Search">WeGA-Suche</entry>
Expand Down
4 changes: 3 additions & 1 deletion webapp/xml/dictionary_en.xml
Expand Up @@ -148,7 +148,9 @@
<entry xml:id="help">Help</entry>
<entry xml:id="redirect">Redirected from %1</entry>
<!-- footer -->
<entry xml:id="lastChangeDate">Last change by %2 on %1</entry>
<entry xml:id="lastChangeDateWithAuthor">Last change of this document by %2 on %1</entry>
<entry xml:id="lastChangeDateWithoutAuthor">Last change of this document on %1</entry>
<entry xml:id="proposedCitation">Proposed citation: Complete Works of Carl Maria von Weber. Digital Edition</entry>
<!-- Search -->
<entry xml:id="advancedSearch">Advanced Search</entry>
<entry xml:id="WeGA-Search">WeGA-Search</entry>
Expand Down
4 changes: 3 additions & 1 deletion webapp/xml/wegaOptions.xml
Expand Up @@ -23,7 +23,7 @@
<entry xml:id="writingsPredIndices">[not(*/tei:ref)]</entry>
<entry xml:id="diariesPredIndices">[./tei:ab]</entry>
<entry xml:id="personsPredIndices">[not(*/tei:ref)]</entry>
<entry xml:id="worksPredIndices"></entry>
<entry xml:id="worksPredIndices"/>
<entry xml:id="biblioPredIndices">[not(*/tei:ref)]</entry>
<!-- <entry xml:id="weberStudiesPredIndices">//tei:TEI[not(./tei:ref)]</entry>-->
</div>
Expand Down Expand Up @@ -83,6 +83,8 @@
<entry xml:id="maxNewsDays">120</entry>
<entry xml:id="googleWebsiteMetatag">EAO5d_GiQPkJeTGACYYOFahJm2HRNvJUWwIkyw4j0Ys</entry>
<entry xml:id="microsoftBingWebsiteMetatag">AE39DA5613844228642EE48196AAA94A</entry>
<entry xml:id="version">1.2</entry>
<entry xml:id="versionNews">A050140</entry>
</div>
<div xml:id="externalPNDResources">
<entry xml:id="wikipedia">http://toolserver.org/~authoritycontrol/redirect/gnd/</entry>
Expand Down
13 changes: 10 additions & 3 deletions webapp/xql/modules/xho.xqm
Expand Up @@ -80,6 +80,7 @@ declare function xho:createHeadContainer($lang as xs:string) as element()* {
:)

declare function xho:createFooter($lang as xs:string, $docPath as xs:string) as element(xhtml:div) {
let $docID := substring-before(functx:substring-after-last($docPath, '/'), '.')
let $docHash := util:hash($docPath, 'md5')
(: let $log := util:log-system-out($docPath):)
let $entry := doc(wega:getOption('svnChangeHistoryFile'))//id(concat('_',$docHash))
Expand All @@ -94,10 +95,16 @@ declare function xho:createFooter($lang as xs:string, $docPath as xs:string) as
then '%B %d, %Y'
else '%d. %B %Y'
let $encryptedBugEmail := wega:encryptString(wega:getOption('bugEmail'), ())
return if(exists($author) and exists($date))
then
let $version := concat(wega:getOption('version'), if(wega:getOption('environment') eq 'development') then 'dev' else '')
let $permalink := string-join((wega:getOption('baseHref'), $docID), '/')
return
if(exists($author) and exists($date)) then
<xhtml:div id="footer">
<xhtml:p>{wega:getLanguageString('lastChangeDate',(wega:strftime($dateFormat, $date, $lang),$author),$lang)}</xhtml:p>
<xhtml:p>{wega:getLanguageString('proposedCitation', $lang)}, {$permalink} (<xhtml:a href="{wega:createLinkToDoc(wega:doc(wega:getOption('versionNews')), $lang)}">Version: {$version}</xhtml:a>) </xhtml:p>
<xhtml:p>{
if(wega:getOption('environment') eq 'development') then wega:getLanguageString('lastChangeDateWithAuthor',(wega:strftime($dateFormat, $date, $lang),$author),$lang)
else wega:getLanguageString('lastChangeDateWithoutAuthor', wega:strftime($dateFormat, $date, $lang), $lang)
}</xhtml:p>
{if($lang eq 'en') then
<xhtml:p>If you've spotted some error or inaccurateness please do not hesitate to inform us via
<xhtml:span onclick="javascript:decEma('{$encryptedBugEmail}')" class="ema">{wega:obfuscateEmail(wega:getOption('bugEmail'))}</xhtml:span>
Expand Down

0 comments on commit 1bd38be

Please sign in to comment.