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