List.html 4.51 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />

<f:section name="main">
    <f:if condition="{settings.templateLayout} == 1">
        <f:then>
            <ul class="list-unstyled event-list listing__group">
                <f:for each="{events}" as="event">
                    <li class="m-3 m-md-4 mx-lg-5 mt-lg-5">
                        <f:link.action action="detail" arguments="{event : event}" pageUid="{settings.detailPid}" class="media listing__group-item p-sm-2 card-date">
                            <div class="d-flex mr-sm-4">
                                <time class="listing__group-item_time" datetime="{event.startdate -> f:format.date(format:'Y-m-d H:i')}">
                                    <span class="listing__group-item_time-day mt-sm-2">{event.startdate -> f:format.date(format:'d')}</span>
                                    <span class="listing__group-item_time-month">{event.startdate -> f:format.date(format:'M')}</span>
                                    <span class="listing__group-item_time-year">{event.startdate -> f:format.date(format:'Y')}</span>
                                </time>
                            </div>
                            <div class="media-body listing__group-item_body">
                                <h5 class="mb-0 mt-sm-1 mb-sm-3">
                                    <strong>{event.title}</strong>
                                </h5>
                                <p class="listing__group-item_body-text">
                                    {event.location.title}<br>{event.location.zip} {event.location.city}<br>{event.location.country}<i class="fa fa-chevron-right ml-2" aria-hidden="true"></i>
                                </p>
                            </div>
                        </f:link.action>
                    </li>
                </f:for>
            </ul>
            <f:link.action class="btn btn-primary btn-block py-lg-3 mb-0" pageUid="433" action="list" controller="Event" arguments="{overwriteDemand:{category:settings.category}}">Show more</f:link.action>
        </f:then>
        <f:else>
            <div class="container">
                <div class="row">
                    <div class="{f:if(condition:'{categories -> f:count()} > 1',then:'col-md-8',else:'col-md-12')}">
                        <div id="accordion" role="tablist" aria-multiselectable="true">
37
                            <f:widget.paginate objects="{events}" as="paginatedEvents" configuration="{itemsPerPage: 10, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 10, addQueryStringMethod: 'GET'}">
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
                                <f:for each="{paginatedEvents}" as="event">
                                    <f:render partial="Event/ListItem" arguments="{_all}" />
                                </f:for>
                            </f:widget.paginate>
                        </div>
                    </div>
                    <f:if condition="{categories -> f:count()} > 1">
                        <div class="col-md-4">
                            <f:render section="Filter" arguments="{_all}" />
                        </div>
                    </f:if>
                    <div class="col-md-12">
                        <f:link.action action="list" controller="Event">
                            <f:translate key="event.allEvents" />
                        </f:link.action>
                    </div>
                </div>
            </div>
        </f:else>
    </f:if>
</f:section>

<f:section name="Filter">
    <f:if condition="{settings.templateLayout} == '2'">
        <f:else>
            <f:form class="event-filter">
64
                <f:form.select class="custom-select" name="event-filter-neu" additionalAttributes="{onchange: 'location = this.value;'}">
65
                    <option value="{f:uri.action(action: 'list', controller: 'Event', arguments: '{overwriteDemand:{category: category}}')}"><f:translate key="tx_t3org_layout.events.all_category" extensionName="t3org_layout"/></option>
66
                    <f:for each="{categories}" as="category">
67
                        <option value="{f:uri.action(action: 'list', controller: 'Event', arguments: '{overwriteDemand:{category: category}}')}" {f:if(condition: '{overwriteDemand.category} == {category.uid}', then: 'class="active" selected="selected"')}>
68
69
70
71
                        {category.title}
                        </option>
                    </f:for>
                </f:form.select>
72
73
74
75
76
            </f:form>
        </f:else>
    </f:if>
</f:section>
</html>