[FEATURE] Backend ViewHelpers for edit creation and editing
[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"
2 xmlns:rd="http://typo3.org/ns/TYPO3/CMS/Redirects/ViewHelpers"
3 xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
4 data-namespace-typo3-fluid="true">
5 <f:layout name="RedirectAdministration" />
6
7 <f:section name="headline">
8 <h1><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:heading_text"/></h1>
9 </f:section>
10
11 <f:section name="content">
12 <f:if condition="{redirects -> f:count()}">
13 <f:then><f:render section="table" arguments="{_all}" /></f:then>
14 <f:else>
15 <f:be.infobox state="-1" title="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:redirect_not_found.title')}">
16 <p><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:redirect_not_found.message"/></p>
17 <be:link.newRecord class="btn btn-primary" table="sys_redirect">
18 <f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:redirect_create"/>
19 </be:link.newRecord>
20 </f:be.infobox>
21 </f:else>
22 </f:if>
23 </f:section>
24
25 <f:section name="table">
26 <div class="table-fit">
27 <table class="table table-striped table-hover">
28 <thead>
29 <tr>
30 <th><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_host"/></th>
31 <th><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:source_path"/></th>
32 <th><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:destination"/></th>
33 <f:if condition="{showHitCounter}">
34 <th># <f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hits"/></th>
35 <th><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_last"/></th>
36 </f:if>
37 <th></th>
38 </tr>
39 </thead>
40 <tbody>
41 <f:for each="{redirects}" key="domainName" as="redirectsPerDomain">
42 <f:for each="{redirectsPerDomain}" as="groupedRedirects">
43 <f:for each="{groupedRedirects}" as="redirectRecords">
44 <f:for each="{redirectRecords}" as="redirect">
45 <tr>
46 <td>{redirect.source_host}</td>
47 <td>
48 <f:alias map="{
49 disable: '{f:translate(key: \'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:record_disabled\')}',
50 onlystart: '{f:translate(key: \'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:start\')}: {f:format.date(date: redirect.starttime, format: \'d.m.Y H:i:s\')}',
51 onlyend: '{f:translate(key: \'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:stop\')}: {f:format.date(date: redirect.endtime, format: \'d.m.Y H:i:s\')}',
52 startend: '{f:translate(key: \'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:start\')}: {f:format.date(date: redirect.starttime, format: \'d.m.Y H:i:s\')} - {f:translate(key: \'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:stop\')}: {f:format.date(date: redirect.endtime, format: \'d.m.Y H:i:s\')}'
53 }">
54 <f:if condition="{redirect.disabled}"><f:then><span title="{disable}"></f:then>
55 <f:else if="{redirect.starttime} && !{redirect.endtime}"><span title="{onlystart}"></f:else>
56 <f:else if="!{redirect.starttime} && {redirect.endtime}"><span title="{onlyend}"></f:else>
57 <f:else if="{redirect.starttime} && {redirect.endtime}"><span title="{startend}"></f:else>
58 <f:else><span></f:else>
59 </f:if>
60 <core:iconForRecord table="sys_redirect" row="{redirect}" /></span>
61 </f:alias>
62 <be:link.editRecord table="sys_redirect" uid="{redirect.uid}" title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit')}">
63 {redirect.source_path}
64 </be:link.editRecord>
65 </td>
66 <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>
67 <f:if condition="{showHitCounter}">
68 <td>
69 <f:if condition="!{redirect.disable_hitcount}">
70 <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}"/>
71 <f:if condition="{redirect.hitcount} != 0">
72 <a class="t3js-modal-trigger"
73 href="{rd:editRecord(command: 'resetcounter', uid: redirect.uid)}"
74 title="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_reset')}"
75 data-title="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_reset.confirm.title')}"
76 data-content="{f:translate(key: 'LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_reset.confirm.content')}"
77 data-button-close-text="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:buttons.confirm.delete_record.no')}">
78 <core:icon identifier="actions-edit-restore" /></a>
79 </f:if>
80 </f:if>
81 <td>
82 <f:if condition="{redirect.lasthiton}">
83 <f:then><f:format.date format="d.m.Y H:i:s">@{redirect.lasthiton}</f:format.date></f:then>
84 <f:else><f:translate key="LLL:EXT:redirects/Resources/Private/Language/locallang_module_redirect.xlf:hit_last_never"/></f:else>
85 </f:if>
86 </td>
87 </f:if>
88 <td>
89 <div class="btn-group">
90 <f:if condition="{redirect.is_regexp}">
91 <f:then>
92 <span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
93 </f:then>
94 <f:else>
95 <f:link.external class="btn btn-default" uri="{f:if(condition: '{redirect.source_host} == \'*\'', then: defaultUrl, else: redirect.source_host)}{redirect.source_path}" target="_blank">
96 <core:icon identifier="actions-view-page" />
97 </f:link.external>
98 </f:else>
99 </f:if>
100 <be:link.editRecord class="btn btn-default" table="sys_redirect" uid="{redirect.uid}" title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:edit')}">
101 <core:icon identifier="actions-open" />
102 </be:link.editRecord>
103 <f:if condition="{redirect.disabled} == 1">
104 <f:then>
105 <a class="btn btn-default" href="{rd:editRecord(command: 'unhide', uid: redirect.uid)}" title="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:unHide')}"><core:icon identifier="actions-edit-unhide" /></a>
106 </f:then>
107 <f:else>
108 <a class="btn btn-default" href="{rd:editRecord(command: 'hide', uid: redirect.uid)}" title="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:hide')}"><core:icon identifier="actions-edit-hide" /></a>
109 </f:else>
110 </f:if>
111 <a class="btn btn-default t3js-modal-trigger"
112 href="{rd:editRecord(command: 'delete', uid: redirect.uid)}"
113 title="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:delete')}"
114 data-severity="warning"
115 data-title="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title')}"
116 data-content="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:deleteWarning')}"
117 data-button-close-text="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:buttons.confirm.delete_record.no')}">
118 <core:icon identifier="actions-delete" />
119 </a>
120 </div>
121 </td>
122 </tr>
123 </f:for>
124 </f:for>
125 </f:for>
126 </f:for>
127 </tbody>
128 </table>
129 </div>
130 </f:section>
131 </html>