Skip to content

Commit fab5661

Browse files
[BUGFIX] Adjust template for missing collection id (kitodo#1586)
1 parent e016f74 commit fab5661

File tree

3 files changed

+30
-16
lines changed

3 files changed

+30
-16
lines changed

Resources/Private/Language/de.locallang.xlf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@
101101
<source><![CDATA[Subscribe to the RSS feed of this collection!]]></source>
102102
<target><![CDATA[Abonnieren Sie den RSS-Feed dieser Kollektion!]]></target>
103103
</trans-unit>
104+
<trans-unit id="collection.missing" approved="yes">
105+
<source><![CDATA[The collection id is missing!]]></source>
106+
<target><![CDATA[Die ID der Sammlung fehlt!]]></target>
107+
</trans-unit>
104108
<trans-unit id="doublePage+1" approved="yes">
105109
<source><![CDATA[Adjust recto/verso]]></source>
106110
<target><![CDATA[Recto/Verso korrigieren]]></target>

Resources/Private/Language/locallang.xlf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@
350350
<trans-unit id="collection.feed.title">
351351
<source><![CDATA[Subscribe to the RSS feed of this collection!]]></source>
352352
</trans-unit>
353+
<trans-unit id="collection.missing">
354+
<source><![CDATA[The collection id is missing!]]></source>
355+
</trans-unit>
353356
<trans-unit id="newTenant.module">
354357
<source><![CDATA[New Tenant Module]]></source>
355358
</trans-unit>

Resources/Private/Templates/Collection/Show.html

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,34 @@
1313
data-namespace-typo3-fluid="true">
1414

1515
<div class="tx-dlf-listview">
16-
<h2 class="tx-dlf-listview-label">{collection.label}</h2>
16+
<f:if condition="{collection}">
17+
<f:then>
18+
<h2 class="tx-dlf-listview-label">{collection.label}</h2>
1719

18-
<f:if condition="{collection.thumbnail}">
19-
<div class="tx-dlf-collection-thumbnail">
2020
<f:if condition="{collection.thumbnail}">
21-
<f:image image="{collection.thumbnail}" alt="{f:translate(key: 'thumbnail')} {collection.label}" title="{collection.label}" maxWidth="250" />
22-
</f:if>
23-
</div>
24-
</f:if>
21+
<div class="tx-dlf-collection-thumbnail">
22+
<f:if condition="{collection.thumbnail}">
23+
<f:image image="{collection.thumbnail}" alt="{f:translate(key: 'thumbnail')} {collection.label}" title="{collection.label}" maxWidth="250" />
24+
</f:if>
25+
</div>
26+
</f:if>
2527

26-
<f:if condition="{collection.description}">
27-
<div class="tx-dlf-collection-description">
28-
<f:format.html>{collection.description}</f:format.html>
29-
</div>
30-
</f:if>
28+
<f:if condition="{collection.description}">
29+
<div class="tx-dlf-collection-description">
30+
<f:format.html>{collection.description}</f:format.html>
31+
</div>
32+
</f:if>
3133

32-
<f:variable name="action" value="showSorted" />
33-
<f:variable name="controller" value="Collection" />
34-
<f:render partial="ListView/SortingForm" arguments="{_all}" />
35-
<f:render partial="ListView/Results" arguments="{_all}" />
34+
<f:variable name="action" value="showSorted" />
35+
<f:variable name="controller" value="Collection" />
36+
<f:render partial="ListView/SortingForm" arguments="{_all}" />
37+
<f:render partial="ListView/Results" arguments="{_all}" />
38+
</f:then>
39+
<f:else>
40+
<h2 class="tx-dlf-listview-label">{f:translate(key: 'collection.missing')}</h1>
41+
</f:else>
3642

43+
</f:if>
3744
</div>
3845

3946
</html>

0 commit comments

Comments
 (0)