Refactoring

This commit is contained in:
Dirk 2019-11-11 12:43:50 +01:00
parent 6d94f8ccc1
commit 2426267567
11 changed files with 589 additions and 197 deletions

View file

@ -1,6 +1,7 @@
<?php <?php
namespace Wrm\Events\Controller; namespace Wrm\Events\Controller;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use Wrm\Events\Domain\Model\Dto\DateDemand; use Wrm\Events\Domain\Model\Dto\DateDemand;
use Wrm\Events\Domain\Repository\DateRepository; use Wrm\Events\Domain\Repository\DateRepository;
use Wrm\Events\Domain\Repository\RegionRepository; use Wrm\Events\Domain\Repository\RegionRepository;
@ -63,8 +64,17 @@ class DateController extends ActionController
*/ */
public function listAction() public function listAction()
{ {
$demand = $this->createDemandFromSettings(); if (($this->request->hasArgument('searchword') && $this->request->getArgument('searchword') != '') ||
$dates = $this->dateRepository->findByDemand($demand); ($this->request->hasArgument('region') && $this->request->getArgument('region') != '') ||
($this->request->hasArgument('start') && $this->request->getArgument('start') != '') ||
($this->request->hasArgument('end') && $this->request->getArgument('end') != ''))
{
$demand = $this->createDemandFromSearch();
$dates = $this->dateRepository->findByDemand($demand);
} else {
$demand = $this->createDemandFromSettings();
$dates = $this->dateRepository->findByDemand($demand);
}
$this->view->assign('dates', $dates); $this->view->assign('dates', $dates);
} }
@ -73,42 +83,19 @@ class DateController extends ActionController
*/ */
public function searchAction() public function searchAction()
{ {
$arguments = GeneralUtility::_GET('tx_events_datelist');
$searchword = null; $searchword = $arguments['searchword'];
$regions = null; $selRegion = $arguments['region'];
$selRegion = null; $start = $arguments['start'];
$dates = null; $end = $arguments['end'];
$start = null;
$end = null;
if ($this->request->hasArgument('searchword') && $this->request->getArgument('searchword') != '') {
$searchword = $this->request->getArgument('searchword');
}
if ($this->request->hasArgument('region') && $this->request->getArgument('region') != '') {
$selRegion = $this->request->getArgument('region');
}
if ($this->request->hasArgument('start') && $this->request->getArgument('start') != '') {
$start = date( "d.m.y", strtotime( $this->request->getArgument('start')));
}
if ($this->request->hasArgument('end') && $this->request->getArgument('end') != '') {
$end = date( "d.m.y", strtotime( $this->request->getArgument('end')));
}
$demand = $this->createDemandFromSearch();
$dates = $this->dateRepository->findByDemand($demand);
$regions = $this->regionRepository->findAll(); $regions = $this->regionRepository->findAll();
$this->view->assign('regions', $regions);
$this->view->assign('searchword', $searchword); $this->view->assign('searchword', $searchword);
$this->view->assign('regions', $regions);
$this->view->assign('selRegion', $selRegion); $this->view->assign('selRegion', $selRegion);
$this->view->assign('dates', $dates);
$this->view->assign('start', $start); $this->view->assign('start', $start);
$this->view->assign('end', $end); $this->view->assign('end', $end);
} }
/** /**
@ -172,13 +159,11 @@ class DateController extends ActionController
if ($this->request->hasArgument('searchword') && $this->request->getArgument('searchword') != '') if ($this->request->hasArgument('searchword') && $this->request->getArgument('searchword') != '')
$demand->setSearchword((string)$this->request->getArgument('searchword')); $demand->setSearchword((string)$this->request->getArgument('searchword'));
if ($this->request->hasArgument('start') && $this->request->getArgument('start') != '') { if ($this->request->hasArgument('start') && $this->request->getArgument('start') != '')
$demand->setStart(date( "Y-m-d", strtotime( $this->request->getArgument('start')))); $demand->setStart(strtotime($this->request->getArgument('start')));
}
if ($this->request->hasArgument('end') && $this->request->getArgument('end') != '') { if ($this->request->hasArgument('end') && $this->request->getArgument('end') != '')
$demand->setEnd(date( "Y-m-d", strtotime( $this->request->getArgument('end')))); $demand->setEnd(strtotime($this->request->getArgument('end')));
}
$demand->setSortBy((string)$this->settings['sortByDate']); $demand->setSortBy((string)$this->settings['sortByDate']);
$demand->setSortOrder((string)$this->settings['sortOrder']); $demand->setSortOrder((string)$this->settings['sortOrder']);

View file

@ -0,0 +1,236 @@
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>Options</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.sortByDate>
<TCEforms>
<exclude>1</exclude>
<label>Sort By</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">Start</numIndex>
<numIndex index="1">start</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">End</numIndex>
<numIndex index="1">end</numIndex>
</numIndex>
</items>
</config>
</TCEforms>
</settings.sortByDate>
<settings.sortOrder>
<TCEforms>
<exclude>1</exclude>
<label>Sort Order</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">
Ascending
</numIndex>
<numIndex index="1">ASC</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">
Descending
</numIndex>
<numIndex index="1">DESC</numIndex>
</numIndex>
</items>
<default>ASC</default>
</config>
</TCEforms>
</settings.sortOrder>
<settings.limit>
<TCEforms>
<exclude>1</exclude>
<label>Max Items</label>
<config>
<type>input</type>
<size>10</size>
<max>30</max>
<eval>trim</eval>
</config>
</TCEforms>
</settings.limit>
<settings.highlight>
<TCEforms>
<exclude>1</exclude>
<label>Highlights only</label>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.highlight>
<settings.todayOnly>
<TCEforms>
<exclude>1</exclude>
<label>Today only</label>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.todayOnly>
<settings.pagination>
<TCEforms>
<exclude>1</exclude>
<label>Show pagination</label>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.pagination>
<settings.showPID>
<TCEforms>
<exclude>1</exclude>
<label>Detail page</label>
<config>
<type>group</type>
<internal_type>db</internal_type>
<allowed>pages</allowed>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>
<show_thumbs>1</show_thumbs>
</config>
</TCEforms>
</settings.showPID>
</el>
</ROOT>
</sDEF>
<sTemplate>
<ROOT>
<TCEforms>
<sheetTitle>Template</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.template>
<exclude>1</exclude>
<label>Layout option</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">Default</numIndex>
<numIndex index="1">default</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">Costum</numIndex>
<numIndex index="1">costum</numIndex>
</numIndex>
<numIndex index="2" type="array">
<numIndex index="0">Table</numIndex>
<numIndex index="1">table</numIndex>
</numIndex>
<numIndex index="3" type="array">
<numIndex index="0">Grid</numIndex>
<numIndex index="1">grid</numIndex>
</numIndex>
</items>
<default>default</default>
</config>
</settings.template>
</el>
</ROOT>
</sTemplate>
<sConstrains>
<ROOT>
<TCEforms>
<sheetTitle>Regions &amp; Categories</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.region>
<TCEforms>
<label>Region</label>
<config>
<type>select</type>
<foreign_table>tx_events_domain_model_region</foreign_table>
<foreign_table_where>AND tx_events_domain_model_region.deleted = 0 AND tx_events_domain_model_region.hidden = 0</foreign_table_where>
<size>3</size>
<minitems>0</minitems>
<maxitems>2</maxitems>
</config>
</TCEforms>
</settings.region>
<settings.categoryCombination>
<TCEforms>
<exclude>1</exclude>
<label>Combination</label>
<config>
<type>select</type>
<items type="array">
<numIndex index="0" type="array">
<numIndex index="0">And</numIndex>
<numIndex index="1">0</numIndex>
</numIndex>
<numIndex index="1" type="array">
<numIndex index="0">Or</numIndex>
<numIndex index="1">1</numIndex>
</numIndex>
</items>
<default>0</default>
</config>
</TCEforms>
</settings.categoryCombination>
<settings.categories>
<TCEforms>
<exclude>1</exclude>
<label>
Category
</label>
<config>
<type>select</type>
<autoSizeMax>20</autoSizeMax>
<foreign_table>sys_category</foreign_table>
<foreign_table_where> AND sys_category.sys_language_uid IN (-1, 0) ORDER BY sys_category.title ASC</foreign_table_where>
<maxitems>1</maxitems>
<renderMode>tree</renderMode>
<size>8</size>
<treeConfig>
<appearance>
<expandAll>1</expandAll>
<showHeader>1</showHeader>
</appearance>
<parentField>parent</parentField>
</treeConfig>
</config>
</TCEforms>
</settings.categories>
<settings.includeSubcategories>
<TCEforms>
<exclude>1</exclude>
<label>Include Subcategories</label>
<config>
<type>check</type>
<default>0</default>
</config>
</TCEforms>
</settings.includeSubcategories>
</el>
</ROOT>
</sConstrains>
</sheets>
</T3DataStructure>

View file

@ -0,0 +1,29 @@
<T3DataStructure>
<sheets>
<sSearch>
<ROOT>
<TCEforms>
<sheetTitle>Options</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.resultsPID>
<TCEforms>
<exclude>1</exclude>
<label>Results page</label>
<config>
<type>group</type>
<internal_type>db</internal_type>
<allowed>pages</allowed>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>
<show_thumbs>1</show_thumbs>
</config>
</TCEforms>
</settings.resultsPID>
</el>
</ROOT>
</sSearch>
</sheets>
</T3DataStructure>

View file

@ -20,5 +20,37 @@ call_user_func(function () {
'FILE:EXT:events/Configuration/FlexForms/Pi1.xml' 'FILE:EXT:events/Configuration/FlexForms/Pi1.xml'
); );
/* Search Plugin */
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Wrm.Events',
'DateSearch',
'Events Date Search',
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_datesearch'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'events_datesearch',
'FILE:EXT:events/Configuration/FlexForms/Search.xml'
);
/* Date List Plugin */
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Wrm.Events',
'DateList',
'Events Date List',
'EXT:events/Resources/Public/Icons/user_plugin_events.svg'
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['events_datelist'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'events_datelist',
'FILE:EXT:events/Configuration/FlexForms/DateList.xml'
);
}); });

View file

@ -21,11 +21,13 @@
{date.event.region.title} | <f:format.date format="d. m. Y - H:i">{date.start}</f:format.date> {date.event.region.title} | <f:format.date format="d. m. Y - H:i">{date.start}</f:format.date>
<h4>{date.event.title}</h4> <h4>{date.event.title}</h4>
<p>{date.event.teaser}</p> <p>{date.event.teaser}</p>
<f:if condition="{date.event.highlight}"> <f:comment>
<f:then> <f:if condition="{date.event.highlight}">
<b>Hightlight</b> <f:then>
</f:then> <b>Hightlight</b>
</f:if> </f:then>
</f:if>
</f:comment>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,9 +1,9 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:widget.paginate objects="{dates}" as="paginatedDates" configuration="{itemsPerPage: 25, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 5}"> <f:widget.paginate objects="{dates}" as="paginatedDates" configuration="{itemsPerPage: 25, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 5, addQueryStringMethod: 'POST,GET'}">
<f:for each="{paginatedDates}" as="date"> <f:for each="{paginatedDates}" as="date" iteration="index">
<div class="row mb-3"> <div class="row mt-3 mb-3 pb-3">
<div class="col-2"> <div class="col-2">
<b><f:format.date format="H:i">{date.start}</f:format.date></b><br> <b><f:format.date format="H:i">{date.start}</f:format.date></b><br>
<b><f:format.date format="%a">{date.start}</f:format.date></b><br> <b><f:format.date format="%a">{date.start}</f:format.date></b><br>
@ -11,30 +11,45 @@
{date.event.region.title}<br> {date.event.region.title}<br>
</div> </div>
<div class="col-6"> <div class="col-6">
<h4>{date.event.title}</h4>
<h5>{date.event.teaser}</h5>
<f:format.crop maxCharacters="150">{date.event.details}</f:format.crop>
<f:if condition="{date.event.highlight}"> <f:if condition="{date.event.highlight}">
<f:then> <f:then>
<b>Hightlight</b> <b>Hightlight</b>
</f:then> </f:then>
</f:if> </f:if>
<h4>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
{date.event.title}
</f:link.action>
</h4>
<p><strong>{date.event.teaser}</strong></p>
<f:format.crop maxCharacters="150">{date.event.details}</f:format.crop>
<pre style="margin-top:15px; font-size:80%;">
DEBUGGING:
GLOBAL EVENT ID: {date.event.globalId}
</pre>
</div> </div>
<div class="col-3"> <div class="col-4">
<f:if condition="{date.event.images}"> <f:if condition="{date.event.images}">
<f:then> <f:then>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}"> <f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
<f:image src="{date.event.images.originalResource.originalFile.uid}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="240c" class="img-fluid img-thumbnail"/> <f:image src="{date.event.images.originalResource.originalFile.uid}" alt="" width="400c" height="280c" class="img-fluid img-thumbnail"/>
</f:link.action> </f:link.action>
</f:then> </f:then>
<f:else> <f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}"> <f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
<f:image src="{settings.defaultImagePath}" alt="{date.event.title}" title="{date.event.title}" width="480c" height="320c" class="img-fluid img-thumbnail"/> <img src="{settings.defaultImagePath}" alt="Dummy" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action> </f:link.action>
</f:else> </f:else>
</f:if> </f:if>
</div> </div>
</div> </div>
<f:if condition="{index.isLast}">
<f:then>
</f:then>
<f:else>
<div class="mb-3 border-bottom"></div>
</f:else>
</f:if>
</f:for> </f:for>
</f:widget.paginate> </f:widget.paginate>

View file

@ -1,9 +1,10 @@
{namespace wrm=Wrm\Events\ViewHelpers} {namespace wrm=Wrm\Events\ViewHelpers}
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="row"> <div class="row">
<div class="col-8 mb-5"> <div class="col-12 mb-5">
<!-- TODO bg color classes not loaded in scss --> <!-- TODO bg color classes not loaded in scss -->
<f:form action="search" controller="Date" method="post" id="events_search" name="events_search"> <f:form action="list" controller="Date" pluginName="DateList" method="get" addQueryString="1" id="events_search" name="events_search">
<div class="row"> <div class="row">
<div class="col"> <div class="col">
@ -60,6 +61,5 @@
<f:form.submit value="Suchen" class="btn btn-primary" /> <f:form.submit value="Suchen" class="btn btn-primary" />
</div> </div>
</f:form> </f:form>
</div> </div>
</div> </div>

View file

@ -1,60 +1,68 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true"> <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<div class="col-12 mb-5">
<!-- TODO bg color classes not loaded in scss -->
<f:form action="list" controller="Date" pluginName="DateList" method="get" addQueryString="1" id="events_search" name="events_search">
<f:render partial="Date/SearchForm" arguments="{searchword: searchword, dates: dates, regions: regions, selRegion: selRegion, start: start, end: end}"/> <div class="row">
<div class="col">
<div class="form-group">
<label for="searchword">Suchwort</label>
<f:form.textfield type="text" class="form-control" id="searchword" name="searchword" value="{searchword}" />
</div>
</div>
</div>
<hr class="mt-2 mb-4"> <div class="row">
<div class="col">
<div class="form-group">
<label for="start">Datum von</label>
<div class="input-group date" id="date_start" data-target-input="nearest">
<f:form.textfield type="text" class="form-control datetimepicker-input" id="start" name="start" value="{start}" additionalAttributes="{data-target: '#date_start'}" />
<div class="input-group-append" data-target="#date_start" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="form-group">
<label for="end">Datum bis</label>
<div class="input-group date" id="date_end" data-target-input="nearest">
<f:form.textfield type="text" class="form-control datetimepicker-input" id="start" name="end" value="{end}" additionalAttributes="{data-target: '#date_end'}" />
<div class="input-group-append" data-target="#date_end" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
</div>
<f:widget.paginate objects="{dates}" as="paginatedDates" configuration="{itemsPerPage: 25, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 5, addQueryStringMethod: 'POST,GET'}"> <div class="row">
<f:for each="{paginatedDates}" as="date" iteration="index"> <div class="col-3">
<div class="row mt-3 mb-3 pb-3"> <div class="form-check">
<div class="col-2"> <f:form.radio class="form-check-input" name="region" value="{region.uid}" checked="{selRegion}==0" id="radio_0"/>
<b><f:format.date format="H:i">{date.start}</f:format.date></b><br> <label class="form-check-label" for="radio_0">Alle Städte</label>
<b><f:format.date format="%a">{date.start}</f:format.date></b><br> </div>
<b><f:format.date format="d.m.">{date.start}</f:format.date></b><br> </div>
{date.event.region.title}<br>
</div> <f:for each="{regions}" as="region">
<div class="col-6"> <div class="col-3">
<f:if condition="{date.event.highlight}"> <div class="form-check">
<f:then> <f:form.radio class="form-check-input" name="region" value="{region.uid}" checked="{selRegion}=={region.uid}" id="radio_{region.uid}"/>
<b>Hightlight</b> <label class="form-check-label" for="radio_{region.uid}">{region.title}</label>
</f:then> </div>
</f:if> </div>
<h4> </f:for>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}"> </div>
{date.event.title} <div class="form-group mt-3">
</f:link.action> <f:form.submit value="Suchen" class="btn btn-primary" />
</h4> </div>
<p><strong>{date.event.teaser}</strong></p> </f:form>
<f:format.crop maxCharacters="150">{date.event.details}</f:format.crop>
<pre style="margin-top:15px; font-size:80%;">
DEBUGGING:
GLOBAL EVENT ID: {date.event.globalId}
</pre>
</div>
<div class="col-4">
<f:if condition="{date.event.images}">
<f:then>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
<f:image src="{date.event.images.originalResource.originalFile.uid}" alt="" width="400c" height="280c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:then>
<f:else>
<f:link.action pageUid="{settings.showPID}" action="show" controller="Date" arguments="{date: date}">
<img src="{settings.defaultImagePath}" alt="Dummy" width="480c" height="320c" class="img-fluid img-thumbnail"/>
</f:link.action>
</f:else>
</f:if>
</div>
</div> </div>
<f:if condition="{index.isLast}"> </div>
<f:then> </f:section>
</f:then>
<f:else>
<div class="mb-3 border-bottom"></div>
</f:else>
</f:if>
</f:for>
</f:widget.paginate>
</html> </html>

View file

@ -0,0 +1,68 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="content">
<div class="row">
<div class="col-12 mb-5">
<!-- TODO bg color classes not loaded in scss -->
<form action="{settings.resultPID}" controller="Date" extensionName="events" method="get" addQueryString="1" id="events_search" name="events_search">
<div class="row">
<div class="col">
<div class="form-group">
<label for="searchword">Suchwort</label>
<input type="text" class="form-control" id="searchword" name="searchword" value="{searchword}" />
</div>
</div>
</div>
<div class="row">
<div class="col">
<div class="form-group">
<label for="start">Datum von</label>
<div class="input-group date" id="date_start" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" id="start" name="start" value="{start}" additionalAttributes="{data-target: '#date_start'}" />
<div class="input-group-append" data-target="#date_start" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="form-group">
<label for="end">Datum bis</label>
<div class="input-group date" id="date_end" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input" id="end" name="end" value="{end}" additionalAttributes="{data-target: '#date_end'}" />
<div class="input-group-append" data-target="#date_end" data-toggle="datetimepicker">
<div class="input-group-text"><i class="fa fa-calendar"></i></div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-3">
<div class="form-check">
<input type="radio" class="form-check-input" name="region" value="{region.uid}" checked="{selRegion}==0" id="radio_0"/>
<label class="form-check-label" for="radio_0">Alle Städte</label>
</div>
</div>
<f:for each="{regions}" as="region">
<div class="col-3">
<div class="form-check">
<input type="radio" class="form-check-input" name="region" value="{region.uid}" checked="{selRegion}=={region.uid}" id="radio_{region.uid}"/>
<label class="form-check-label" for="radio_{region.uid}">{region.title}</label>
</div>
</div>
</f:for>
</div>
<div class="form-group mt-3">
<input type="submit" value="Suchen" class="btn btn-primary" />
</div>
</form>
</div>
</div>
</f:section>
</html>

View file

@ -1,91 +1,91 @@
<f:if condition="{configuration.insertAbove}"> <f:if condition="{configuration.insertAbove}">
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" /> <f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" />
</f:if> </f:if>
<f:renderChildren arguments="{contentArguments}" /> <f:renderChildren arguments="{contentArguments}" />
<f:if condition="{configuration.insertBelow}"> <f:if condition="{configuration.insertBelow}">
<f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" /> <f:render section="paginator" arguments="{pagination: pagination, configuration: configuration}" />
</f:if> </f:if>
<f:section name="paginator"> <f:section name="paginator">
<nav> <nav>
<ul class="pagination"> <ul class="pagination">
<f:if condition="{pagination.previousPage}"> <f:if condition="{pagination.previousPage}">
<li class="page-item"> <li class="page-item">
<f:if condition="{pagination.previousPage} > 1"> <f:if condition="{pagination.previousPage} > 1">
<f:then> <f:then>
<f:widget.link class="page-link" rel="prev" <f:widget.link class="page-link" rel="prev"
arguments="{currentPage: pagination.previousPage}" arguments="{currentPage: pagination.previousPage}"
addQueryStringMethod="{configuration.addQueryStringMethod}" addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}"><span aria-hidden="true">&laquo;</span> section="{configuration.section}"><span aria-hidden="true">&laquo;</span>
</f:widget.link> </f:widget.link>
</f:then> </f:then>
<f:else> <f:else>
<f:widget.link class="page-link" rel="prev" <f:widget.link class="page-link" rel="prev"
addQueryStringMethod="{configuration.addQueryStringMethod}" addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}"><span aria-hidden="true">&laquo;</span> section="{configuration.section}"><span aria-hidden="true">&laquo;</span>
</f:widget.link> </f:widget.link>
</f:else> </f:else>
</f:if> </f:if>
</li> </li>
</f:if> </f:if>
<f:if condition="{pagination.displayRangeStart} > 1"> <f:if condition="{pagination.displayRangeStart} > 1">
<li class="page-item"> <li class="page-item">
<f:widget.link class="page-link" addQueryStringMethod="{configuration.addQueryStringMethod}" <f:widget.link class="page-link" addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}">1 section="{configuration.section}">1
</f:widget.link> </f:widget.link>
</li> </li>
</f:if> </f:if>
<f:if condition="{pagination.hasLessPages}"> <f:if condition="{pagination.hasLessPages}">
<li class="page-item"><span class="page-link"></span></li> <li class="page-item"><span class="page-link"></span></li>
</f:if> </f:if>
<f:for each="{pagination.pages}" as="page"> <f:for each="{pagination.pages}" as="page">
<f:if condition="{page.isCurrent}"> <f:if condition="{page.isCurrent}">
<f:then> <f:then>
<li class="page-item active"> <li class="page-item active">
<span class="page-link">{page.number}</span> <span class="page-link">{page.number}</span>
</li> </li>
</f:then> </f:then>
<f:else> <f:else>
<li class="page-item"> <li class="page-item">
<f:if condition="{page.number} > 1"> <f:if condition="{page.number} > 1">
<f:then> <f:then>
<f:widget.link class="page-link" arguments="{currentPage: page.number}" <f:widget.link class="page-link" arguments="{currentPage: page.number}"
addQueryStringMethod="{configuration.addQueryStringMethod}" addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}">{page.number} section="{configuration.section}">{page.number}
</f:widget.link> </f:widget.link>
</f:then> </f:then>
<f:else> <f:else>
<f:widget.link class="page-link" <f:widget.link class="page-link"
addQueryStringMethod="{configuration.addQueryStringMethod}" addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}">{page.number} section="{configuration.section}">{page.number}
</f:widget.link> </f:widget.link>
</f:else> </f:else>
</f:if> </f:if>
</li> </li>
</f:else> </f:else>
</f:if> </f:if>
</f:for> </f:for>
<f:if condition="{pagination.hasMorePages}"> <f:if condition="{pagination.hasMorePages}">
<li class="page-item"><span class="page-link"></span></li> <li class="page-item"><span class="page-link"></span></li>
</f:if> </f:if>
<f:if condition="{pagination.displayRangeEnd} < {pagination.numberOfPages}"> <f:if condition="{pagination.displayRangeEnd} < {pagination.numberOfPages}">
<li class="page-item"> <li class="page-item">
<f:widget.link class="page-link" arguments="{currentPage: pagination.numberOfPages}" <f:widget.link class="page-link" arguments="{currentPage: pagination.numberOfPages}"
addQueryStringMethod="{configuration.addQueryStringMethod}" addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}">{pagination.numberOfPages} section="{configuration.section}">{pagination.numberOfPages}
</f:widget.link> </f:widget.link>
</li> </li>
</f:if> </f:if>
<f:if condition="{pagination.nextPage}"> <f:if condition="{pagination.nextPage}">
<li class="page-item"> <li class="page-item">
<f:widget.link class="page-link" rel="next" arguments="{currentPage: pagination.nextPage}" <f:widget.link class="page-link" rel="next" arguments="{currentPage: pagination.nextPage}"
addQueryStringMethod="{configuration.addQueryStringMethod}" addQueryStringMethod="{configuration.addQueryStringMethod}"
section="{configuration.section}"><span aria-hidden="true">&raquo;</span> section="{configuration.section}"><span aria-hidden="true">&raquo;</span>
</f:widget.link> </f:widget.link>
</li> </li>
</f:if> </f:if>
</ul> </ul>
</nav> </nav>
</f:section> </f:section>

View file

@ -18,6 +18,31 @@ call_user_func(
] ]
); );
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Wrm.Events',
'DateSearch',
[
'Date' => 'search'
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Wrm.Events',
'DateList',
[
'Date' => 'list'
]
);
/*
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'events-plugin',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:events/Resources/Public/Icons/user_plugin_events.svg']
);
// wizards // wizards
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod { 'mod {
@ -37,14 +62,6 @@ call_user_func(
} }
}' }'
); );
*/
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'events-plugin',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:events/Resources/Public/Icons/user_plugin_events.svg']
);
} }
); );