1<#assign ddmTemplateLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMTemplateLocalService") >
2<#assign globalGroupId = themeDisplay.getCompanyGroupId() />
3<#assign lisTemplates = ddmTemplateLocalService.getTemplatesByGroupId(globalGroupId) >
4<#assign isGlobal = (themeDisplay.getTheme().getContextPath() == "/o/upv-ehu-global-theme") >
5
6<#assign nombreTpl = "event-comun">
7<#list lisTemplates as template >
8 <#if validator.isNotNull(locale) >
9 <#assign templateName = template.getName(locale ) >
10 <#else>
11 <#assign templateName = template.getNameCurrentValue() >
12 </#if>
13 <#if templateName == nombreTpl >
14 <#assign templateKey = template.getTemplateKey() >
15 </#if>
16</#list>
17
18<#include "${templatesPath}/" + "${templateKey}" />
19
20
21 <#-- TITLE -->
22 <#if ehugeneraldataFieldSet?? && ehugeneraldataFieldSet.ehutitle?? && ehugeneraldataFieldSet.ehutitle.getData()?html??>
23 <#assign main_title = ehugeneraldataFieldSet.ehutitle.getData()?html>
24 </#if>
25
26 <#-- HIGHLIGHT TITLE-->
27 <#if ehuimagesFieldSet?? && ehuimagesFieldSet.ehuhighlighttitle?? && ehuimagesFieldSet.ehuhighlighttitle.getData()?html?? >
28 <#assign title = ehuimagesFieldSet.ehuhighlighttitle.getData()?html>
29 </#if>
30
31 <#if !title?has_content && main_title?has_content>
32 <#assign title = main_title>
33 </#if>
34
35 <#-- SUBTITLE-->
36 <#if ehuimagesFieldSet?? && ehuimagesFieldSet.ehuhighlightsubtitle?? && ehuimagesFieldSet.ehuhighlightsubtitle.getData()?html??>
37 <#assign subtitle = ehuimagesFieldSet.ehuhighlightsubtitle.getData()?html>
38 </#if>
39
40 <#-- IMAGE-->
41 <#if ehuimagesFieldSet?? && ehuimagesFieldSet.ehuhighlightimage?? && ehuimagesFieldSet.ehuhighlightimage.getData()?html?? >
42 <#assign image = ehuimagesFieldSet.ehuhighlightimage.getData()?html >
43 </#if>
44 <#if image?has_content>
45 <#assign hayImage = true >
46 <#else>
47 <#assign hayImage = false >
48 </#if>
49 <#if ehuimagesFieldSet?? && ehuimagesFieldSet.ehuhighlightimagealttext?? && ehuimagesFieldSet.ehuhighlightimagealttext.getData()?html??>
50 <#assign imageAlt = ehuimagesFieldSet.ehuhighlightimagealttext.getData()?html >
51
52 </#if>
53
54 <#if imageAlt?? && imageAlt?has_content>
55 <#assign txtAltImg = imageAlt>
56 <#else>
57 <#assign txtAltImg = " ">
58 </#if>
59
60 <#-- HTML-->
61 <div class="event">
62 <#if hayImage >
63 <figure class="row">
64 <#if txtAltImg?? >
65 <#if isGlobal>
66 <div class="col-md-4">
67 <img alt='${txtAltImg}' src='${image}'>
68 </div>
69 <#else>
70 <img class="col-4" alt="${txtAltImg}" src="${image}">
71 </#if>
72 </#if>
73 <#if isGlobal>
74 <figcaption class="col-md-8">
75 <#else>
76 <figcaption class="col-8">
77 </#if>
78
79 </#if>
80 <#if title?has_content >
81 <p class="card-title"><strong>${title}</strong></p>
82 </#if>
83
84 <#if subtitle?has_content >
85 <p class="subtitle">${subtitle}</p>
86 </#if>
87
88 <p>
89 <#-- Si hay fecha de inicio pero no de fin se pinta la fecha de inicio y la hora de fin. Tampoco se pinta el "Desde". -->
90 <#if dateStartStr?? && dateStartStr != "" && (!dateEndStr?? || dateEndStr == "") >
91 <span class="date">
92 ${ dateStartStr }
93 <#if dateEndHourStr?? && dateEndMinStr?? >
94 - ${ dateEndHourStr }:${ dateEndMinStr }
95 </#if>
96 </span>
97 </#if>
98
99 <#-- Si hay fecha de inicio y de fin se pintan -->
100 <#if dateStartStr?? && dateStartStr != "" && dateEndStr?? && dateEndStr != "" >
101 <span class="date">
102 <#-- Si hay hora de fin hay que pintar una coma dentro de la fecha para que no meta un espacio en blanco por detrás -->
103 <#if dateStartHourStr?? && dateStartMinStr??>
104 ${ dateStartReduced } - ${ dateEndReduced + ","}
105 <#else>
106 ${ dateStartReduced } - ${ dateEndReduced }
107 </#if>
108 <#if dateStartHourStr?? && dateStartMinStr?? && dateEndHourStr?? && dateEndMinStr?? >
109 ${ dateStartHourStr }:${ dateStartMinStr } - ${ dateEndHourStr }:${ dateEndMinStr }
110 <#elseif dateStartHourStr?? && dateStartMinStr??>
111 ${ dateStartHourStr }:${ dateStartMinStr }
112 </#if>
113 </span>
114 </#if>
115
116 <#-- LOCALIZACION -->
117 <@upvlibs.VocabFormatCategoriesSummary vocabularyName="Kokalekuak"/>
118 <#assign localizationSummary = upvlibs.catStringSummary >
119 <#if (localizationSummary?? && localizationSummary?has_content) >
120 <#assign lastComma = localizationSummary?last_index_of(',')>
121 <#if (lastComma > 0)>
122 <#assign newlocalizationSummary = localizationSummary?substring(0,lastComma)>
123 <#else>
124 <#assign newlocalizationSummary = localizationSummary>
125 </#if>
126 ${newlocalizationSummary}
127 </#if>
128 </p>
129
130 <#if hayImage >
131 </figcaption>
132 </figure>
133 </#if>
134 </div>