[FEATURE] Backend ViewHelpers for edit creation and editing
[Packages/TYPO3.CMS.git] / typo3 / sysext / filelist / Resources / Private / Templates / FileList / Search.html
1 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
2 xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
3 xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
4 xmlns:fl="http://typo3.org/ns/TYPO3/CMS/Filelist/ViewHelpers">
5 <f:layout name="Default"/>
6
7 <f:section name="headline">
8 <h1><f:translate id="search">Search</f:translate>: "{searchWord}"</h1>
9 </f:section>
10
11 <f:section name="content">
12
13 <f:render partial="SearchForm" arguments="{searchWord:searchWord}" />
14
15 <f:if condition="{files->f:count()} > 0">
16 <div class="table-fit">
17 <table class="table table-striped table-hover" id="typo3-filelist">
18 <thead>
19 <tr data-uid="0" data-l10nparent="0">
20 <th class="col-icon nowrap"></th>
21 <th class="col-path nowrap">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:c_filepath' )}</th>
22 <th class="col-title nowrap">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:c_file' )}</th>
23 <th class="col-control"></th>
24 <th class="nowrap">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:c_fileext' )}</th>
25 <th class="nowrap">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:c_tstamp' )}</th>
26 <th class="nowrap">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:c_size' )}</th>
27 <th class="nowrap">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:c_rw' )}</th>
28 <th class="nowrap">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:c__REF_' )}</th>
29 </tr>
30 </thead>
31 <tbody>
32 <f:for each="{files}" as="file">
33 <tr data-uid="0" data-l10nparent="0">
34 <td class="col-icon nowrap">
35 <a class="t3js-contextmenutrigger" data-uid="{file.identifier}" data-table="sys_file" href="#">
36 <core:iconForResource resource="{file.resource}" />
37 </a>
38 </td>
39 <td class="col-path nowrap">
40 {file.path}
41 </td>
42 <td class="col-title col-responsive nowrap">
43 <f:if condition="{file.isMetadataEditable}">
44 <f:then>
45 <a href="#" class="filelist-file-title"
46 title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.editMetadata' )}"
47 data-url="{be:uri.editRecord( uid:file.metadataUid, table:'sys_file_metadata', returnUrl:'{f:uri.action( action:\'search\', arguments:{ searchWord:\'{searchWord->f:format.htmlentities()}\' } ) -> f:format.raw()}' )}"
48 >
49 {file.name}
50 </a>
51 </f:then>
52 <f:else>
53 {file.name}
54 </f:else>
55 </f:if>
56 <f:if condition="{file.isImage}">
57 <br>
58 <f:image image="{file.resource}" maxWidth="{thumbnail.width}" maxHeight="{thumbnail.height}" />
59 </f:if>
60 </td>
61 <td class="col-control nowrap">
62 <div class="btn-group">
63 <f:if condition="{file.isEditable}">
64 <f:then>
65 <a href="#" class="btn btn-default filelist-file-edit"
66 title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.editcontent' )}"
67 data-url="{fl:uri.editFileContent( file:file.resource, returnUrl:'{f:uri.action( action:\'search\', arguments:{ searchWord:\'{searchWord->f:format.htmlentities()}\' } ) -> f:format.raw()}' )}"
68 >
69 <core:icon identifier="actions-page-open" />
70 </a>
71 </f:then>
72 <f:else>
73 <span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
74 </f:else>
75 </f:if>
76
77 <f:if condition="{file.IsMetadataEditable}">
78 <f:then>
79 <a href="#" class="btn btn-default filelist-file-edit"
80 title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.editMetadata' )}"
81 data-url="{be:uri.editRecord(uid:file.metadataUid, table:'sys_file_metadata', returnUrl:'{f:uri.action( action:\'search\', arguments:{ searchWord:\'{searchWord->f:format.htmlentities()}\' } ) -> f:format.raw()}' )}"
82 >
83 <core:icon identifier="actions-open" />
84 </a>
85 </f:then>
86 <f:else>
87 <span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
88 </f:else>
89 </f:if>
90
91 <f:if condition="{file.publicUrl}">
92 <f:then>
93 <a href="#" class="btn btn-default filelist-file-view"
94 title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.view' )}"
95 data-url="{file.publicUrl}"
96 >
97 <core:icon identifier="actions-document-view" />
98 </a>
99 </f:then>
100 <f:else>
101 <span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
102 </f:else>
103 </f:if>
104
105 <f:if condition="{file.isReplaceable}">
106 <f:then>
107 <a href="#" class="btn btn-default filelist-file-replace"
108 title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.replace' )}"
109 data-url="{fl:uri.replaceFile( file:file.resource, returnUrl:'{f:uri.action( action:\'search\', arguments:{ searchWord:\'{searchWord->f:format.htmlentities()}\' } ) -> f:format.raw()}' )}"
110 >
111 <core:icon identifier="actions-edit-replace" />
112 </a>
113 </f:then>
114 <f:else>
115 <span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
116 </f:else>
117 </f:if>
118
119 <f:if condition="{file.isRenamable}">
120 <f:then>
121 <a href="#" class="btn btn-default filelist-file-rename"
122 title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.rename' )}"
123 data-url="{fl:uri.renameFile( file:file.resource, returnUrl:'{f:uri.action( action:\'search\', arguments:{ searchWord:\'{searchWord->f:format.htmlentities()}\' } ) -> f:format.raw()}' )}"
124 >
125 <core:icon identifier="actions-edit-rename" />
126 </a>
127 </f:then>
128 <f:else>
129 <span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
130 </f:else>
131 </f:if>
132
133 <f:if condition="{file.isReadable}">
134 <f:then>
135 <a href="#" class="btn btn-default filelist-file-info"
136 title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.info' )}"
137 data-identifier="{file.identifier}"
138 >
139 <core:icon identifier="actions-document-info" />
140 </a>
141 </f:then>
142 <f:else>
143 <span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
144 </f:else>
145 </f:if>
146 <f:if condition="{file.isDeletable}">
147 <f:then>
148 <a href="#" class="btn btn-default t3js-filelist-delete"
149 title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.delete' )}"
150 data-identifier="{file.identifier}"
151 data-title="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.delete' )}"
152 data-content="{f:translate( key:'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:mess.delete', arguments: {0:file.name} )}"
153 data-check="{f:if(condition:settings.jsConfirmationDelete, then:'1', else:'0')}"
154 data-delete-url="{deleteUrl}"
155 data-delete-type="delete_file"
156 data-redirect-url="{f:uri.action( action:'search', arguments:{ searchWord:'{searchWord->f:format.htmlentities()}' } )}"
157 >
158 <core:icon identifier="actions-edit-delete" />
159 </a>
160 </f:then>
161 <f:else>
162 <span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
163 </f:else>
164 </f:if>
165 </div>
166 </td>
167 <td class="nowrap">{file.extension}</td>
168 <td class="nowrap">{file.lastModified}</td>
169 <td class="nowrap">{file.size}</td>
170 <td class="nowrap">
171 <f:if condition="{file.isReadable}"><strong class="text-danger">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:read' )}</strong></f:if><f:if condition="{file.isWritable}"><strong class="text-danger">{f:translate( key:'LLL:EXT:filelist/Resources/Private/Language/locallang_mod_file_list.xlf:write' )}</strong></f:if>
172 </td>
173 <td class="nowrap">
174 <f:if condition="{file.referenceCount} > 0">
175 <f:then>
176 <a href="#" class="filelist-file-references" data-identifier="{file.identifier}" title="{f:translate( key:'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references' )} ({file.referenceCount})">{file.referenceCount}</a>
177 </f:then>
178 <f:else>
179 -
180 </f:else>
181 </f:if>
182 </td>
183 </tr>
184 </f:for>
185 </tbody>
186 </table>
187 </div>
188 </f:if>
189 </f:section>
190 </html>