Initial commit
[TYPO3CMS/Extensions/roq_newsevent.git] / Resources / Private / Partials / EventList / Item.html
1 {namespace n=Tx_News_ViewHelpers}
2 {namespace e=Tx_RoqNewsevent_ViewHelpers}
3 <!--
4 =====================
5 Partials/EventList/Item.html
6 -->
7 <div class="article articletype-{newsItem.type}{f:if(condition: newsItem.istopnews, then: ' topnews')}">
8 <!-- header -->
9 <div class="header">
10 <h3>
11 <e:link newsItem="{newsItem}" settings="{settings}" action="eventDetail">
12 {newsItem.title}
13 </e:link>
14 </h3>
15 </div>
16
17 <f:if condition="{newsItem.media}">
18 <!-- media preview element -->
19 <f:then>
20 <div class="news-img-wrap">
21 <e:link newsItem="{newsItem}" settings="{settings}" action="eventDetail">
22 <f:if condition="{newsItem.mediaPreviews}">
23 <f:then>
24 <f:alias map="{mediaElement: newsItem.mediaPreviews.0}">
25 <f:if condition="{mediaElement.type} == 0">
26 <f:image
27 src="uploads/tx_news/{mediaElement.image}"
28 title="{mediaElement.title}"
29 alt="{mediaElement.alt}"
30 maxWidth="{settings.list.media.image.maxWidth}"
31 maxHeight="{settings.list.media.image.maxHeight}"
32 />
33 </f:if>
34 <f:if condition="{mediaElement.type} == 1">
35 <f:render partial="Detail/MediaVideo" arguments="{mediaElement: mediaElement}"/>
36 </f:if>
37 <f:if condition="{mediaElement.type} == 2">
38 <f:render partial="Detail/MediaHtml" arguments="{mediaElement: mediaElement}"/>
39 </f:if>
40 <f:if condition="{mediaElement.type} == 3">
41 <n:format.dam as="dam" uid="{mediaElement.uid}">
42 <f:image src="{dam.file_path}{dam.file_name}" title="{dam.title}" alt="{dam.alt_text}" maxWidth="{settings.detail.media.image.maxWidth}" />
43 </n:format.dam>
44 </f:if>
45 </f:alias>
46 </f:then>
47 <f:else>
48 <f:if condition="{settings.displayDummyIfNoMedia}">
49 <span class="no-media-element">
50 <f:image
51 src="typo3conf/ext/news/Resources/Public/Images/dummy-preview-image.png"
52 title=""
53 alt=""
54 maxWidth="{settings.list.media.image.maxWidth}"
55 maxHeight="{settings.list.media.image.maxHeight}"
56 />
57 </span>
58 </f:if>
59 </f:else>
60 </f:if>
61 </e:link>
62 </div>
63 </f:then>
64 <f:else>
65 <f:if condition="{settings.displayDummyIfNoMedia}">
66 <f:then>
67 <div class="news-img-wrap">
68 <e:link newsItem="{newsItem}" settings="{settings}" action="eventDetail">
69 <span class="no-media-element">
70 <f:image
71 src="typo3conf/ext/news/Resources/Public/Images/dummy-preview-image.png"
72 title=""
73 alt=""
74 maxWidth="{settings.list.media.image.maxWidth}"
75 maxHeight="{settings.list.media.image.maxHeight}"
76 />
77 </span>
78 </e:link>
79 </div>
80 </f:then>
81 </f:if>
82 </f:else>
83 </f:if>
84
85 <!-- teaser text -->
86 <div class="teaser-text">
87 <f:if condition="{newsItem.teaser}">
88 <f:then>
89 <f:format.html>{newsItem.teaser}</f:format.html>
90 </f:then>
91 <f:else>
92 <f:format.html><f:format.crop maxCharacters="{settings.cropMaxCharacters}" respectWordBoundaries="true">{newsItem.bodytext}</f:format.crop></f:format.html>
93 </f:else>
94 </f:if>
95
96 <!-- date -->
97 <span class="news-list-date">
98 <f:render partial="Event/Item" arguments="{newsItem: newsItem, settings:settings}"/>
99 </span>
100 </div>
101
102 <!-- footer information -->
103 <div class="footer" role="contentinfo">
104 <p>
105 <!-- date -->
106 <span class="news-list-date">
107
108 </span>
109
110 <!-- first category -->
111 <f:if condition="{newsItem.firstCategory}">
112 <span class="hidden">. </span>
113 <span class="news-list-category">{newsItem.firstCategory.title}</span>
114 </f:if>
115
116 <!-- author -->
117 <f:if condition="{newsItem.author}">
118 <span class="hidden">. </span>
119 <span class="news-list-author">
120 <f:translate key="author" arguments="{0:newsItem.author}"/>
121 </span>
122 </f:if>
123 </p>
124 </div>
125 </div>