Skip to content

Commit

Permalink
Merge remote-tracking branch 'slub/master' into 6.x-ocr-devel
Browse files Browse the repository at this point in the history
Signed-off-by: Christos Sidiropoulos <[email protected]>
  • Loading branch information
csidirop committed Feb 9, 2024
2 parents d2663ea + 1373a6e commit 5250f31
Show file tree
Hide file tree
Showing 13 changed files with 382 additions and 490 deletions.
12 changes: 6 additions & 6 deletions Build/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions Configuration/TypoScript/Plugins/kitodo.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ plugin.tx_dlf_fulltexttool {
settings {
tools = fulltexttool
activateFullTextInitially = 0
fullTextScrollElement = html, body
fullTextScrollElement = #tx-dlf-fulltextselection
}
}

Expand Down Expand Up @@ -227,10 +227,3 @@ page.10.variables {
isNewspaper.value = newspaper_issue
}
[END]

[getDocumentType({$config.storagePid}) == "object"]
page.10.variables {
isObject3D = TEXT
isObject3D.value = object
}
[END]
18 changes: 17 additions & 1 deletion Resources/Private/Less/modules/gridview.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}


.tx-dlf-pagegrid .f3-widget-paginator {
.tx-dlf-pagegrid .pagination {
position: absolute;
bottom: 15px;
height: 1px;
Expand Down Expand Up @@ -139,6 +139,14 @@
display: none;
}
}
li.next, li.previous {
a,
a:first-child,
a:last-child {
width: 60px;
height: 30px;
}
}
}
@media screen and (min-width: @desktopViewportWidth) {
font-size: 18px;
Expand All @@ -149,6 +157,14 @@
width: 40px;
height: 40px;
}
li.next, li.previous {
a,
a:first-child,
a:last-child {
width: 90px;
height: 40px;
}
}
}
}

Expand Down
397 changes: 70 additions & 327 deletions Resources/Private/Partials/PageView.html

Large diffs are not rendered by default.

72 changes: 72 additions & 0 deletions Resources/Private/Partials/Provider.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:dv="http://typo3.org/ns/Slub/Dfgviewer/ViewHelpers"
xmlns:dc="http://typo3.org/ns/Slub/SlubDigitalcollections/ViewHelpers" data-namespace-typo3-fluid="true" lang="en">

<div class="provider">
<f:if condition="{settings.showProviderLogo}">
<ul>
<f:alias map="{logoUrl: '{dc:xpath(xpath:\'(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"
DVRIGHTS\"]/mets:xmlData/dv:rights/dv:ownerLogo)[1]\')}', logoTitle: '{dc:xpath(xpath:\'
(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"DVRIGHTS\"]/mets:xmlData/dv:rights/dv:owner)[1]\')}',
logoUri: '{dc:xpath(xpath:\'
(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"DVRIGHTS\"]/mets:xmlData/dv:rights/dv:ownerSiteURL)[1]\',
htmlspecialchars:\'FALSE\')}'}">
<f:if condition="{dc:providerLogoCached(logo:'{logoUrl}')}">
<li>
<f:link.external uri="{logoUri}" title="{logoTitle}">
<img src="/typo3temp/assets/images/{dc:providerLogoCached(logo:'{logoUrl}')}"
title="{logoTitle}" alt="Logo von {logoTitle}" />
</f:link.external>
</li>
</f:if>
</f:alias>
<f:alias map="{logoUrl: '{dc:xpath(xpath:\'(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"
DVRIGHTS\"]/mets:xmlData/dv:rights/dv:aggregatorLogo)[1]\')}', logoTitle: '{dc:xpath(xpath:\'
(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"DVRIGHTS\"]/mets:xmlData/dv:rights/dv:aggregator)[1]\')}',
logoUri: '{dc:xpath(xpath:\'
(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"DVRIGHTS\"]/mets:xmlData/dv:rights/dv:aggregatorSiteURL)[1]\',
htmlspecialchars:\'FALSE\')}'}">
<f:if condition="{dc:providerLogoCached(logo:'{logoUrl}')}">
<li>
<f:link.external uri="{logoUri}" title="{logoTitle}">
<img src="/typo3temp/assets/images/{dc:providerLogoCached(logo:'{logoUrl}')}"
title="{logoTitle}" alt="Logo von {logoTitle}" />
</f:link.external>
</li>
</f:if>
</f:alias>
<f:alias map="{logoUrl: '{dc:xpath(xpath:\'(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"
DVRIGHTS\"]/mets:xmlData/dv:rights/dv:sponsorLogo)[1]\')}', logoTitle: '{dc:xpath(xpath:\'
(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"DVRIGHTS\"]/mets:xmlData/dv:rights/dv:sponsor)[1]\')}',
logoUri: '{dc:xpath(xpath:\'
(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\"DVRIGHTS\"]/mets:xmlData/dv:rights/dv:sponsorSiteURL)[1]\',
htmlspecialchars:\'FALSE\')}'}">
<f:if condition="{dc:providerLogoCached(logo:'{logoUrl}')}">
<li>
<f:link.external uri="{logoUri}" title="{logoTitle}">
<img src="/typo3temp/assets/images/{dc:providerLogoCached(logo:'{logoUrl}')}"
title="{logoTitle}" alt="Logo von {logoTitle}" />
</f:link.external>
</li>
</f:if>
</f:alias>
</ul>
</f:if>

<dl class="mobile-meta">
<dt class="tx-dlf-title">Titel</dt>
<dd class="tx-dlf-title">
<a href="#">
<dc:xpath
xpath='(//mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:titleInfo[not(@type="alternative")]/mods:nonSort | //mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:titleInfo[not(@type="alternative")]/mods:title | //mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:titleInfo[not(@type="alternative")]/mods:partNumber | //mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:titleInfo[not(@type="alternative")]/mods:partName)' />
</a>
</dd>
<dt>Autor</dt>
<dd>
<dc:xpath
xpath='(//mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:relatedItem[@type="host"]/mods:name[//mets:dmdSec/mets:mdWrap/mets:xmlData/mods:mods/mods:name/mods:role/mods:roleTerm[@authority="marcrelator"][@type="code"]="aut"]/mods:displayForm)[1]' />
</dd>
</dl>
</div>

</html>
212 changes: 212 additions & 0 deletions Resources/Private/Partials/Submenu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
xmlns:dv="http://typo3.org/ns/Slub/Dfgviewer/ViewHelpers"
xmlns:dc="http://typo3.org/ns/Slub/SlubDigitalcollections/ViewHelpers" data-namespace-typo3-fluid="true" lang="en">

<ul>
<li class="submenu links">
<a href="#" title="Links">Links</a>
<ul>
<li>
<f:if
condition="{dc:xpath(xpath:'(//mets:amdSec/mets:digiprovMD/mets:mdWrap[@OTHERMDTYPE=\'DVLINKS\']/mets:xmlData/dv:links/dv:presentation)[1]')}">
<f:then>
<f:link.external
uri="{dc:xpath(xpath:'(//mets:amdSec/mets:digiprovMD/mets:mdWrap[@OTHERMDTYPE=\'DVLINKS\']/mets:xmlData/dv:links/dv:presentation)[1]', htmlspecialchars:'FALSE')}"
class="local-presentation"
title="{f:translate(key:'provider.local_presentation', extensionName:'dfgviewer')}">
<f:translate key='provider.local_presentation' extensionName='dfgviewer' />
</f:link.external>
</f:then>
<f:else>
<span class="local-presentation"
title="{f:translate(key:'provider.no_local_presentation', extensionName:'dfgviewer')}">
<f:translate key='provider.no_local_presentation' extensionName='dfgviewer' />
</span>
</f:else>
</f:if>
</li>
<f:for each="{0: '1', 1: '2', 2: '3'}" as="index">
<f:if
condition="{dc:xpath(xpath:'(//mets:amdSec/mets:digiprovMD/mets:mdWrap[@OTHERMDTYPE=\'DVLINKS\']/mets:xmlData/dv:links/dv:reference)[{index}]')}">
<li>
<f:if
condition="{dc:xpath(xpath:'(//mets:amdSec/mets:digiprovMD/mets:mdWrap[@OTHERMDTYPE=\'DVLINKS\']/mets:xmlData/dv:links/dv:reference/@linktext)[{index}]')}">
<f:then>
<f:link.external
uri="{dc:xpath(xpath:'(//mets:amdSec/mets:digiprovMD/mets:mdWrap[@OTHERMDTYPE=\'DVLINKS\']/mets:xmlData/dv:links/dv:reference)[{index}]', htmlspecialchars:'FALSE')}"
class="local-catalog"
title="{f:translate(key:'provider.local_catalogue', extensionName:'dfgviewer')}">
<dc:xpath
xpath='(//mets:amdSec/mets:digiprovMD/mets:mdWrap[@OTHERMDTYPE="DVLINKS"]/mets:xmlData/dv:links/dv:reference/@linktext)[{index}]' />
</f:link.external>
</f:then>
<f:else>
<f:link.external
uri="{dc:xpath(xpath:'(//mets:amdSec/mets:digiprovMD/mets:mdWrap[@OTHERMDTYPE=\'DVLINKS\']/mets:xmlData/dv:links/dv:reference)[{index}]', htmlspecialchars:'FALSE')}"
class="local-catalog"
title="{f:translate(key:'provider.local_catalogue', extensionName:'dfgviewer')}">
<f:translate key='provider.local_catalogue' extensionName='dfgviewer' />
</f:link.external>
</f:else>
</f:if>
</li>
</f:if>
</f:for>
<f:if
condition="{dc:xpath(xpath:'(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\'DVRIGHTS\']/mets:xmlData/dv:rights/dv:ownerContact)[1]', htmlspecialchars:'FALSE')}">
<f:then>
<li>
<f:link.external
uri="{dc:xpath(xpath:'(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\'DVRIGHTS\']/mets:xmlData/dv:rights/dv:ownerContact)[1]', htmlspecialchars: 'FALSE')}"
class="local-contact"
title="{f:translate(key:'provider.email_provider', extensionName:'dfgviewer')} ({dc:xpath(xpath:'(//mets:amdSec/mets:rightsMD/mets:mdWrap[@OTHERMDTYPE=\'DVRIGHTS\']/mets:xmlData/dv:rights/dv:owner)[1]')})">
<f:translate key='provider.email_provider' extensionName='dfgviewer' />
</f:link.external>
</li>
</f:then>
<f:else>
<li>
<span class="local-contact"
title="{f:translate(key:'provider.no_local_presentation', extensionName:'dfgviewer')}">
<f:translate key='provider.no_local_presentation' extensionName='dfgviewer' />
</span>
</li>
</f:else>
</f:if>
<f:cObject typoscriptObjectPath="plugin.tx_dfgviewer_uri" />
</ul>
</li>
<li class="submenu downloads">
<a href="#" id="tab-downloads" title="Downloads">Downloads</a>
<ul>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_pdfdownloadtool" />
</ul>
</li>
<li class="doublepage">
<f:if condition="{gp-double} == 1">
<f:then>
<f:link.page pageUid="{kitodoPageView}"
additionalParams="{tx_dlf:{page:'{gp-page}', double:'0', id:'{gp-id}', pagegrid:'0'}}"
class="tx-dlf-navigation-doubleOff"
title="{f:translate(key:'double.singlePageView', extensionName:'dfgviewer')}">
<f:translate key="double.singlePageView" extensionName="dfgviewer" />
</f:link.page>
<f:link.page pageUid="{kitodoPageView}"
additionalParams="{tx_dlf:{page:'{dc:calc(val1:\'{gp-page}\', val2:\'1\', operator:\'+\')}', double:'1', id:'{gp-id}', pagegrid:'0'}}"
class="tx-dlf-navigation-doublePlusOne"
title="{f:translate(key:'double.RectoVerso', extensionName:'dfgviewer')}"><span>
<f:translate key="double.RectoVerso" extensionName="dfgviewer" />
</span></f:link.page>
</f:then>
<f:else>
<f:link.page pageUid="{kitodoPageView}"
additionalParams="{tx_dlf:{page:'{gp-page}', double:'1', id:'{gp-id}', pagegrid:'0'}}"
class="tx-dlf-navigation-doubleOn"
title="{f:translate(key:'double.doublePageView', extensionName:'dfgviewer')}">
<f:translate key="double.doublePageView" extensionName="dfgviewer" />
</f:link.page>
</f:else>
</f:if>
</li>
<!-- Pagegrid -->
<li class="grid">
<f:if
condition="{dc:xpath(xpath:'(//mets:fileSec/mets:fileGrp[@USE=\'THUMBS\']/mets:file[1]/mets:FLocat/@xlink:href)[1]')}">
<f:then>
<f:if condition="{gp-pagegrid} == 1">
<f:then>
<f:link.page pageUid="{kitodoPageView}"
additionalParams="{tx_dlf:{page:'{gp-page}', double:'0', id:'{gp-id}', pagegrid:'0'}}"
class="active"
title="{f:translate(key:'double.singlePageView', extensionName:'dfgviewer')}">
<f:translate key='double.singlePageView' extensionName='dfgviewer' />
</f:link.page>
</f:then>
<f:else>
<f:link.page pageUid="{kitodoPageView}"
additionalParams="{tx_dlf:{page:'{gp-page}', double:'0', id:'{gp-id}', pagegrid:'1'}}"
title="{f:translate(key:'gridpage.preview', extensionName:'dfgviewer')}">
<f:translate key='gridpage.preview' extensionName='dfgviewer' />
</f:link.page>
</f:else>
</f:if>
</f:then>
<f:else>
<span title="{f:translate(key:'gridpage.preview', extensionName:'dfgviewer')}">
<f:translate key='gridpage.preview' extensionName='dfgviewer' />
</span>
</f:else>
</f:if>
</li>
<!-- Fulltext button behaviour: active or not (but always visible) -->
<li class="fulltext">
<f:if condition="{gp-double} == 1">
<f:then>
<span class="select switchoff" id="tx-dlf-tools-fulltext"
title="{f:translate(key:'fulltext.no_fulltext_double', extensionName:'dfgviewer')}">
<f:translate key='fulltext.no_fulltext_double' extensionName='dfgviewer' />
</span>
</f:then>
<f:else>
<f:if condition="{gp-pagegrid} == 1">
<f:then>
<span class="select switchoff" id="tx-dlf-tools-fulltext"
title="{f:translate(key:'fulltext.no_fulltext_gridpage', extensionName:'dfgviewer')}">
<f:translate key='fulltext.no_fulltext_gridpage' extensionName='dfgviewer' />
</span>
</f:then>
<f:else>
<f:cObject typoscriptObjectPath="plugin.tx_dlf_fulltexttool" />
</f:else>
</f:if>
</f:else>
</f:if>
</li>
<!-- Fulltext: OCR-On-Demand Submenu -->
<f:if condition="{gp-pagegrid} == 0 and {gp-double} == 0">
<li class="submenu ocr-on-demand">
<a href="#" title="OCR-On-Demand">OCR On Demand</a>
<ul>
<!-- Fulltext: OCR-On-Demand buttons -->
<li class="ocr-page ocr-create" id="tx-dlf-create-form">
<a onclick="document.getElementById('tx-dlf-fulltext-create-page').submit()">
<!--Create Page OCR-->
<f:translate key='fulltext.create_ocr_page' extensionName='dfgviewer'/>
<f:form id="tx-dlf-fulltext-create-page" pageUid="{kitodoPageView}" extensionName="dfgviewer" action="create" name="request" method="post" additionalParams="{tx_dlf:{page:'{gp-page}', id:'{gp-id}'}}" >
<f:form.hidden property="create" value="1"/>
<f:form.hidden property="type" value="page"/>
<f:comment><f:form.submit/></f:comment>
</f:form>
</a>
</li>
<li class="ocr-book ocr-create" id="tx-dlf-create-form">
<a onclick="document.getElementById('tx-dlf-fulltext-create-book').submit()">
<!--Create Book OCR-->
<f:translate key='fulltext.create_ocr_book' extensionName='dfgviewer'/>
<f:form id="tx-dlf-fulltext-create-book" pageUid="{kitodoPageView}" extensionName="dfgviewer" action="create" name="request" method="post" additionalParams="{tx_dlf:{page:'{gp-page}', id:'{gp-id}'}}" >
<f:form.hidden property="create" value="1"/>
<f:form.hidden property="type" value="book"/>
<f:comment><f:form.submit/></f:comment>
</f:form>
</a>
</li>
<li class="subsubmenu ocr-on-demand-sub">
<a href="#" id="ocr-menu">OCR-Engine</a>
<ul id="ocr-engine" class="subunter"></ul>
</li>
</ul>
</li>
</f:if>
<!-- Search: -->
<f:if
condition="{dc:xpath(xpath:'//mets:amdSec/mets:digiprovMD/mets:mdWrap[@OTHERMDTYPE=\'DVLINKS\']/mets:xmlData/dv:links/dv:sru')}">
<f:then>
<li class="submenu search">
<a href="#" title="Search">Search</a>
<f:cObject typoscriptObjectPath="plugin.tx_dfgviewer_sru" />
</li>
</f:then>
</f:if>
</ul>

</html>
Loading

0 comments on commit 5250f31

Please sign in to comment.