[TASK] Hide redirect table header when no records exist
[Packages/TYPO3.CMS.git] / typo3 / sysext / redirects / Resources / Private / Templates / Management / Overview.html
1 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:rd="http://typo3.org/ns/TYPO3/CMS/Redirects/ViewHelpers" data-namespace-typo3-fluid="true">
2 <f:layout name="RedirectAdministration" />
3
4 <f:section name="headline">
5 <h1><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:heading_text"/></h1>
6 </f:section>
7
8 <f:section name="content">
9 <f:if condition="{redirects -> f:count()}">
10 <f:then><f:render section="table" arguments="{redirects: redirects}" /></f:then>
11 <f:else>
12 <f:be.infobox state="-1" title="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:redirect_not_found.title')}">
13 <p><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:redirect_not_found.message"/></p>
14 <a class="btn btn-primary" href="{rd:editRecord(command: 'new', uid: 0)}"><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:redirect_create"/></a>
15 </f:be.infobox>
16 </f:else>
17 </f:if>
18 </f:section>
19
20 <f:section name="table">
21 <div class="table-fit">
22 <table class="table table-striped table-hover">
23 <thead>
24 <tr>
25 <th><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_host"/></th>
26 <th><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_path"/></th>
27 <th><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:destination"/></th>
28 <th># <f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hits"/></th>
29 <th><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_last"/></th>
30 <th></th>
31 </tr>
32 </thead>
33 <tbody>
34 <f:for each="{redirects}" key="domainName" as="redirectsPerDomain">
35 <f:for each="{redirectsPerDomain}" as="groupedRedirects">
36 <f:for each="{groupedRedirects}" as="redirectRecords">
37 <f:for each="{redirectRecords}" as="redirect">
38 <tr>
39 <td>{redirect.source_host}</td>
40 <td>
41 <f:if condition="{redirect.disabled} == 1"><span title="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:record_disabled')}"><core:icon identifier="overlay-hidden" /></span></f:if>
42 <f:if condition="{redirect.starttime} != 0 || {redirect.endtime} != 0"><span title="{f:format.date(date: redirect.starttime, format: '%d.%m.%Y %H:%M')} - {f:format.date(date: redirect.endtime, format: '%d.%m.%Y %H:%M')}"><core:icon identifier="overlay-scheduled" /></span></f:if>
43 <strong><f:link.external uri="{redirect.source_host}{redirect.source_path}" target="_blank">{redirect.source_path}</f:link.external></strong>
44 </td>
45 <td><f:link.typolink parameter="{redirect.target}" target="_blank"><f:uri.typolink parameter="{redirect.target}"></f:uri.typolink></f:link.typolink> (<f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:destination_status_code"/>: {redirect.target_statuscode})</td>
46 <td>
47 <f:if condition="!{redirect.disable_hitcount}">
48 <f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit{f:if(condition:'{redirect.hitcount} > 1',then:'s')}_text" arguments="{0:redirect.hitcount}"/>
49 <f:if condition="{redirect.hitcount} != 0">
50 <a class="t3js-modal-trigger"
51 href="{rd:editRecord(command: 'resetcounter', uid: redirect.uid)}"
52 title="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_reset')}"
53 data-title="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_reset.confirm.title')}"
54 data-content="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_reset.confirm.content')}"
55 data-button-close-text="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_alt_doc.xlf:buttons.confirm.delete_record.no')}">
56 <core:icon identifier="actions-edit-restore" /></a>
57 </f:if>
58 </f:if>
59 <td>
60 <f:if condition="{redirect.lasthiton}">
61 <f:then><f:format.date format="d.m.Y H:i:s">@{redirect.lasthiton}</f:format.date></f:then>
62 <f:else><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_last_never"/></f:else>
63 </f:if>
64 </td>
65 <td>
66 <div class="btn-group">
67 <a class="btn btn-default"
68 href="{rd:editRecord(command: 'edit', uid: redirect.uid)}"
69 title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf:edit')}">
70 <core:icon identifier="actions-open" />
71 </a>
72 <f:if condition="{redirect.disabled} == 1">
73 <f:then>
74 <a class="btn btn-default" href="{rd:editRecord(command: 'unhide', uid: redirect.uid)}" title="{f:translate(key:'LLL:EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf:unHide')}"><core:icon identifier="actions-edit-unhide" /></a>
75 </f:then>
76 <f:else>
77 <a class="btn btn-default" href="{rd:editRecord(command: 'hide', uid: redirect.uid)}" title="{f:translate(key:'LLL:EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf:hide')}"><core:icon identifier="actions-edit-hide" /></a>
78 </f:else>
79 </f:if>
80 <a class="btn btn-default t3js-modal-trigger"
81 href="{rd:editRecord(command: 'delete', uid: redirect.uid)}"
82 title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf:delete')}"
83 data-severity="warning"
84 data-title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title')}"
85 data-content="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_alt_doc.xlf:deleteWarning')}"
86 data-button-close-text="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_alt_doc.xlf:buttons.confirm.delete_record.no')}">
87 <core:icon identifier="actions-delete" />
88 </a>
89 </div>
90 </td>
91 </tr>
92 </f:for>
93 </f:for>
94 </f:for>
95 </f:for>
96 </tbody>
97 </table>
98 </div>
99 </f:section>
100 </html>