Skip to content
Snippets Groups Projects

[TASK] Improve global search form

Merged Simon Schaufelberger requested to merge simonschaufi/lfeditor:better-search-form into master
1 file
+ 80
66
Compare changes
  • Side-by-side
  • Inline
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"
xmlns:lfe="http://typo3.org/ns/SGalinski/Lfeditor/ViewHelpers"
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
>
<f:layout name="GlobalSearch"/>
@@ -10,79 +11,92 @@
</f:section>
<f:section name="main">
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="function.const.search.searchGlobal"/>
</div>
<div class="panel-body">
<f:form id="contentForm" action="searchGlobalSearch">
<label class="tx-lfeditor-search-case-label">
<f:form.checkbox id="caseSensitive" name="caseSensitive" value="1" checked="{searchCaseSensitive}"
class="tx-lfeditor-checkBox-middle"/>
<f:translate key="function.search.caseSensitiveCheckbox"/>
</label>
<p>
<f:form.textfield name="searchStr" value="{searchString}" class="tx-lfeditor-wideField"/>
<f:form.submit id="tx-lfeditor-button-submit" value="{f:translate(key:'button.search')}"/>
</p>
</f:form>
</div>
</div>
<f:if condition="{searchResultArray}">
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="function.const.search.result"/>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="function.const.search.searchGlobal"/>
</div>
<div class="panel-body">
<f:form action="searchGlobalSearch" id="contentForm">
<div class="form-row-md align-items-md-end">
<div class="form-group">
<div class="input-group">
<div class="form-control-clearable-wrapper">
<f:form.textfield type="search" name="searchStr" value="{searchString}"
class="form-control t3js-collapse-search-term tx-lfeditor-wideField"
placeholder="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.enterSearchString')}"/>
</div>
<f:form.button type="submit" class="btn btn-default" id="tx-lfeditor-button-submit" value="{f:translate(key:'button.search')}">
<core:icon identifier="actions-search" />
</f:form.button>
</div>
</div>
<div class="form-group">
<div class="form-check form-switch form-check-size-input">
<f:form.checkbox
class="form-check-input"
name="caseSensitive"
id="caseSensitive"
value="1"
checked="{searchCaseSensitive}"
/>
<label class="form-check-label" for="caseSensitive">
<f:translate key="function.search.caseSensitiveCheckbox"/>
</label>
</div>
</div>
</div>
</f:form>
</div>
</div>
<div class="panel-group tx-lfeditor-panel-group-search-results">
<f:for each="{searchResultArray}" as="extension" key="extKey">
<div class="panel panel-primary">
<div class="panel-heading">
{extKey}
</div>
<div class="panel-body">
<f:for each="{extension}" as="files" key="langFile">
<fieldset class="tx-lfeditor-fieldset bgColor5">
<legend class="bgColor3">
EXT:{extKey}/{langFile}
</legend>
<f:for each="{files.results}" as="data" key="langKey">
<fieldset class="bgColor4">
<legend class="bgColor3">
{f:if(condition: '{langKey} == \'default\'', then: 'en', else:
'{langKey}')}
</legend>
<dl>
<f:for each="{data}" as="constantLabel" key="constantKey">
<dt>
<f:link.action
action="globalSearchToEditConstant"
controller="SearchConstant"
arguments="{constantKey: constantKey,
<f:if condition="{searchResultArray}">
<div class="panel panel-default">
<div class="panel-heading">
<f:translate key="function.const.search.result"/>
</div>
<div class="panel-group tx-lfeditor-panel-group-search-results">
<f:for each="{searchResultArray}" as="extension" key="extKey">
<div class="panel panel-primary">
<div class="panel-heading">{extKey}</div>
<div class="panel-body">
<f:for each="{extension}" as="files" key="langFile">
<fieldset class="tx-lfeditor-fieldset bgColor5">
<legend class="bgColor3">EXT:{extKey}/{langFile}</legend>
<f:for each="{files.results}" as="data" key="langKey">
<fieldset class="bgColor4">
<legend class="bgColor3">
{f:if(condition: '{langKey} == \'default\'', then: 'en', else: '{langKey}')}
</legend>
<dl>
<f:for each="{data}" as="constantLabel" key="constantKey">
<dt>
<f:link.action
action="globalSearchToEditConstant"
controller="SearchConstant"
arguments="{constantKey: constantKey,
extensionPath: '{lfe:base64Encoding(data: files.extensionPath)}',
extKey: extKey,
languageFile: '{lfe:base64Encoding(data: files.languageFile)}'}"
>
>
<span class="tx-lfeditor-search-result"
data-search-string="{searchString}">{constantKey}</span>
</f:link.action>
</dt>
<dd class="tx-lfeditor-search-result"
data-search-string="{searchString}">{constantLabel}
</dd>
</f:for>
</dl>
</fieldset>
</f:for>
</fieldset>
</f:for>
</div>
</div>
</f:for>
data-search-string="{searchString}">{constantKey}</span>
</f:link.action>
</dt>
<dd class="tx-lfeditor-search-result"
data-search-string="{searchString}">{constantLabel}
</dd>
</f:for>
</dl>
</fieldset>
</f:for>
</fieldset>
</f:for>
</div>
</div>
</f:for>
</div>
</div>
</f:if>
</f:if>
</f:section>
<f:section name="ButtonBarLeft">
Loading