[TASK] Hide word count in indexed_search backend if mysql fulltext is used
[Packages/TYPO3.CMS.git] / typo3 / sysext / indexed_search / Resources / Private / Templates / Administration / Statistic.html
1 {namespace is=TYPO3\CMS\IndexedSearch\ViewHelpers}
2
3 <f:layout name="Administration"/>
4
5 <f:section name="Content">
6 <f:if condition="{tree}">
7 <f:then>
8 <f:form name="statistic" action="statistic" class="form-horizontal" arguments="{id:pageUid}">
9 <div class="form-group">
10 <div class="col-sm-12">
11 <f:form.select name="mode" options="{
12 overview:'{f:translate(key:\'administration.statistics.view.overview\')}',
13 content:'{f:translate(key:\'administration.statistics.view.content\')}'
14 }" value="{mode}" additionalAttributes="{onchange:'this.form.submit();'}"/>
15 <f:form.select name="depth" options="{levelTranslations}" value="{depth}" additionalAttributes="{onchange:'this.form.submit();'}"/>
16 </div>
17 </div>
18 </f:form>
19 <table class="table table-striped table-hover">
20 <thead>
21 <tr>
22 <th></th>
23 <th>
24 <a href="{f:uri.action(action:'deleteIndexedItem', arguments:'{id:\'ALL\', depth:depth, mode:mode}')}" title="{f:translate(key:'administration.removeAllEntries')}">
25 <core:icon identifier="actions-edit-delete" />
26 </a>
27 </th>
28 <th>
29 <f:translate key="field.fileName"/>
30 </th>
31 <f:switch expression="{mode}">
32 <f:case value="content">
33 <th>
34 <f:translate key="field.content" />
35 </th>
36 <f:if condition="{extensionConfiguration.useMysqlFulltext} == false">
37 <th>
38 <f:translate key="field.words" />
39 </th>
40 </f:if>
41 </f:case>
42 <f:defaultCase>
43 <f:if condition="{extensionConfiguration.useMysqlFulltext} == false">
44 <th>
45 <f:translate key="field.wordCount"/>
46 </th>
47 </f:if>
48 <th>
49 <f:translate key="field.fileSize"/>
50 </th>
51 <th>
52 <f:translate key="field.indexed"/>
53 </th>
54 </f:defaultCase>
55 </f:switch>
56 </tr>
57 </thead>
58 <tbody>
59 <f:for each="{tree}" as="line">
60 <f:if condition="{line.lines}">
61 <f:then>
62 <f:for each="{line.lines}" as="l" iteration="i">
63 <tr>
64 <f:then>
65 <td class="nowrap">
66 {line.HTML -> f:format.raw()}
67 <f:if condition="{i.index} == 0"> {line.row.title}</f:if>
68 </td>
69 <td>
70 <a href="{f:uri.action(action:'deleteIndexedItem',arguments:'{id:l.phash,depth:depth,mode:mode}')}" title="{f:translate(key:'administration.removeEntry')}">
71 <core:icon identifier="actions-edit-delete" />
72 </a>
73 </td>
74 <td>
75 <f:image src="{l.icon}"/>
76 <f:link.action action="statisticDetails" arguments="{pageHash:l.phash}">{l.item_title}</f:link.action>
77 </td>
78 <f:switch expression="{mode}">
79 <f:case value="content">
80 <td>
81 {l.fulltextData.fulltextdata}
82 </td>
83 <f:if condition="{extensionConfiguration.useMysqlFulltext} == false">
84 <td>
85 <f:for each="{l.allWords}" as="w">
86 {w}
87 </f:for>
88 <br><br>
89 <em>{f:translate(key:'administration.statistics.count')}: {f:count(subject:l.allWords)}</em>
90 </td>
91 </f:if>
92 </f:case>
93 <f:defaultCase>
94 <f:if condition="{extensionConfiguration.useMysqlFulltext} == false">
95 <td>{l.wordCount}</td>
96 </f:if>
97 <td>
98 <f:format.bytes decimals="1">{l.item_size}</f:format.bytes>
99 </td>
100 <td>
101 <is:format.dateTime>{l.tstamp}</is:format.dateTime>
102 </td>
103 </f:defaultCase>
104 </f:switch>
105 </f:then>
106 </tr>
107 </f:for>
108 </f:then>
109 <f:else>
110 <tr>
111 <td class="nowrap">{line.HTML -> f:format.raw()} {line.row.title}</td>
112 <f:switch expression="{mode}">
113 <f:case value="content">
114 <td colspan="5">
115 <f:translate key="administration.notIndexed" />
116 </td>
117 </f:case>
118 <f:defaultCase>
119 <td colspan="5">
120 <f:translate key="administration.notIndexed"/>
121 </td>
122 </f:defaultCase>
123 </f:switch>
124 </tr>
125 </f:else>
126 </f:if>
127 </f:for>
128 </tbody>
129 </table>
130 </f:then>
131 <f:else>
132 <h2><f:translate key="administration.noPageSelected"/></h2>
133 </f:else>
134 </f:if>
135 </f:section>