Buscador Candidatos - Elecciones 2015
Se ha producido un error al procesar la plantilla.
Can't convert boolean to string automatically, because the "boolean_format" setting was "true,false", which is the legacy deprecated default, and we treat it as if no format was set. This is the default configuration; you should provide the format explicitly for each place where you print a boolean. ---- Tip: Write something like myBool?string('yes', 'no') to specify boolean formatting in place. ---- Tip: If you want "true"/"false" result as you are generating computer-language output (not for direct human consumption), then use "?c", like ${myBool?c}. (If you always generate computer-language output, then it's might be reasonable to set the "boolean_format" setting to "c" instead.) ---- Tip: If you need the same two values on most places, the programmers can set the "boolean_format" setting to something like "yes,no". However, then it will be easy to unwillingly format booleans like that. ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${modifiedDate} [in template "10155#10193#352924301" at line 112, column 105] ----
1<#setting time_zone="Europe/Madrid">
2<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
3dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")
4layoutLocalServiceUtil = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
5<div class="search-total-label">
6 <#if searchResultsPortletDisplayContext.getKeywords()?has_content >
7 ${languageUtil.format(locale, "x-results-for-x", [searchContainer.getTotal(), "<strong>" + htmlUtil.escape(searchResultsPortletDisplayContext.getKeywords()) + "</strong>"], false)}
8 <#else>
9 ${languageUtil.format(locale, "showing-x-results", [searchContainer.getTotal()], false)}
10 </#if>
11
12</div>
13<div class="display-list">
14 <ul class="list-group" id="search-results-display-list">
15 <#if entries?has_content>
16 <#list entries as entry>
17 <#assign entryClassName = "${entry.getClassName()}"
18 modifiedDate = ""?has_content
19 fileType=""
20 groupId = 0/>
21 <#if entryClassName?contains("com.liferay.journal.model.JournalArticle")>
22 <#assign journalArticle = journalArticleLocalService.getLatestArticle(entry.getClassPK())
23 modifiedDate = journalArticle.getModifiedDate()?string["dd MMM yyyy"]
24 groupId = journalArticle.getGroupId()
25 />
26 <#elseif entryClassName?contains("com.liferay.document.library.kernel.model.DLFileEntry")>
27 <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntry(entry.getClassPK())
28 modifiedDate = dlFileEntry.getModifiedDate()?string["dd MMM yyyy"]
29 fileType = dlFileEntry.getMimeType()?replace("application/","")?replace("image/", "")?replace("audio/","")?replace("video/", "")
30 groupId = dlFileEntry.getGroupId()
31 />
32 </#if>
33 <li class="list-group-item list-group-item-flex">
34 <#if !entry.isTemporarilyUnavailable()>
35 <div class="autofit-col autofit-col-expand">
36 <section class="autofit-section">
37 <div class="list-group-title">
38 <#assign newURL = entry.getViewURL()>
39 <#if entry.isAssetRendererURLDownloadVisible()>
40 <#assign newURL = entry.getAssetRendererURLDownload()>
41 <#assign newURL = newURL?replace("&download=true","")>
42 <#else>
43 <#assign posicion_param_p_l_back_url = newURL?index_of("p_l_back_url=")>
44 <#assign inicio_url_p_l_back_url = posicion_param_p_l_back_url+"p_l_back_url="?length>
45 <#assign fin_url_p_l_back_url = newURL?length - 1>
46 <#assign posicion_ampersand_p_l_back_url = newURL?index_of("&",posicion_param_p_l_back_url)>
47 <#if posicion_ampersand_p_l_back_url gt 0 >
48 <#assign fin_url_p_l_back_url = posicion_param_p_l_back_url>
49 </#if>
50 <#assign param_p_l_back_url = newURL[inicio_url_p_l_back_url..fin_url_p_l_back_url]>
51 <#assign newURL = newURL+"&redirect="+param_p_l_back_url>
52 </#if>
53 <#assign linkTitle = ""/>
54 <#if entry.getTitle()?has_content>
55 <#assign linkTitle = entry.getTitle()/>
56 </#if>
57 <#assign tipoIcono = tipoDocumento(fileType)/>
58 <a href="${newURL}" class="d-block" title="${linkTitle}">
59 <#if entryClassName?contains("com.liferay.document.library.kernel.model.DLFileEntry")>
60 ${entry.getHighlightedTitle()}<svg class="lexicon-icon lexicon-icon-${tipoIcono}" role="presentation" viewBox="0 0 512 512">
61 <use xlink:href="/o/es.gva.liferayPortales.themes.columnas-theme/images/clay/icons.svg#${tipoIcono}"></use>
62 </svg>
63 <#else>
64 ${entry.getHighlightedTitle()}
65 </#if>
66 </a>
67 </div>
68 <div class="search-results-metadata">
69 <#if entryClassName?contains("com.liferay.calendar.model.CalendarBooking")>
70 <#assign params = entry.getViewURL()?keep_after("?")?split("&")/>
71 <#list params as param>
72 <#if param?contains("_com_liferay_calendar_web_portlet_CalendarPortlet_calendarBookingId")>
73 <#assign calendarBookingID = param?keep_after("=")
74 calendarBookingService = serviceLocator.findService("com.liferay.calendar.service.CalendarBookingLocalService")/>
75 <#if calendarBookingService??>
76 <#assign calendarBooking = calendarBookingService.getCalendarBooking(calendarBookingID?number)/>
77 <#if calendarBooking??>
78 <#if calendarBooking.isAllDay()>
79 <#if calendarBooking.getStartTime()?number?number_to_datetime?string["dd-MM-yyyy"]?contains(calendarBooking.getEndTime()?number?number_to_datetime?string["dd-MM-yyyy"])>
80 <span class="label-date">${languageUtil.get(locale, "fecha-inicio-fin")}: </span><span class="date-value">${calendarBooking.getStartTime()?number?number_to_datetime?string["dd-MM-yyyy"]}</span>
81 <#else>
82 <ul>
83 <li class="start-date">
84 <span class="label-date">${languageUtil.get(locale, "Fecha_inicio")}: </span><span class="date-value">${calendarBooking.getStartTime()?number?number_to_datetime?string["dd-MM-yyyy"]}</span>
85 </li>
86 <li class="end-date">
87 <span class="label-date">${languageUtil.get(locale, "Fecha_fin")}: </span><span class="date-value">${calendarBooking.getEndTime()?number?number_to_datetime?string["dd-MM-yyyy"]}</span>
88 </li>
89 </ul>
90 </#if>
91 <#else>
92 <div class="event-date">
93 <ul>
94 <li class="start-date">
95 <span class="label-date">${languageUtil.get(locale, "Fecha_inicio")}: </span><span class="date-value">${calendarBooking.getStartTime()?number?number_to_datetime?string["dd-MM-yyyy HH:mm"]}</span>
96 </li>
97 <li class="end-date">
98 <span class="label-date">${languageUtil.get(locale, "Fecha_fin")}: </span><span class="date-value">${calendarBooking.getEndTime()?number?number_to_datetime?string["dd-MM-yyyy HH:mm"]}</span>
99 </li>
100 </ul>
101 </div>
102 </#if>
103 </#if>
104 </#if>
105 </#if>
106 </#list>
107 </#if>
108 <#if entry.isContentVisible()>
109 <p class="list-group-subtext list-group-modifiedDate">
110 <#if modifiedDate?has_content>
111 <span class="modifiedDate-item" title="${languageUtil.get(locale, "fecha-modificacion")}">
112 ${modifiedDate}
113 </span>
114 </#if>
115 <#if modifiedDate?has_content && entry.getContent()?has_content>
116 -
117 </#if>
118 <span class="subtext-item">
119 ${entry.getContent()?replace("null", "")}
120 </span>
121 </p>
122 <#elseif modifiedDate?has_content>
123 <p class="list-group-subtext list-group-modifiedDate">
124 <span class="modifiedDate-item" title="${languageUtil.get(locale, "fecha-modificacion")}">
125 ${modifiedDate}
126 </span>
127 </p>
128 </#if>
129
130 <#if entry.isFieldsVisible()>
131 <p class="list-group-subtext">
132 <#assign separate = false />
133
134 <#list entry.getFieldDisplayContexts() as fieldDisplayContext>
135 <#if separate>
136 ·
137 </#if>
138
139 <span class="badge">${fieldDisplayContext.getName()}</span>
140
141 <span>${fieldDisplayContext.getValuesToString()}</span>
142
143 <#assign separate = true />
144 </#list>
145 </p>
146 </#if>
147
148 <#if entry.isAssetCategoriesOrTagsVisible()>
149 <div class="h6 search-document-tags text-default">
150 <@liferay_asset["asset-tags-summary"]
151 className=entry.getClassName()
152 classPK=entry.getClassPK()
153 paramName=entry.getFieldAssetTagNames()
154 portletURL=entry.getPortletURL()
155 />
156
157 <@liferay_asset["asset-categories-summary"]
158 className=entry.getClassName()
159 classPK=entry.getClassPK()
160 paramName=entry.getFieldAssetCategoryIds()
161 portletURL=entry.getPortletURL()
162 />
163 </div>
164 </#if>
165
166 <#if entry.isDocumentFormVisible()>
167 <div class="expand-details h6 text-default">
168 <span class="list-group-text" style="">
169 <a href="javascript:;">
170 <@liferay.language key="details" />...
171 </a>
172 </span>
173 </div>
174
175 <div class="hide search-results-list table-details table-responsive">
176 <table class="table">
177 <thead>
178 <tr>
179 <th class="key-column">
180 <@liferay.language key="key" />
181 </th>
182 <th>
183 <@liferay.language key="value" />
184 </th>
185 </tr>
186 </thead>
187
188 <tbody>
189 <#list entry.getDocumentFormFieldDisplayContexts() as fieldDisplayContext>
190 <tr>
191 <td class="key-column table-details-content">
192 <strong>${htmlUtil.escape(fieldDisplayContext.getName())}</strong>
193 </td>
194 <td class="table-details-content">
195 <code>
196 ${fieldDisplayContext.getValuesToString()}
197 </code>
198 </td>
199 </tr>
200 </#list>
201 </tbody>
202 </table>
203 </div>
204 </#if>
205 <#if groupId != themeDisplay.getScopeGroupId()>
206 <#assign organizationName = getNombreOrganizacion(layoutLocalServiceUtil, groupId, themeDisplay) />
207 <#if organizationName?? && organizationName?has_content>
208 <div class="nombre-organizacion-contenido"><span>${organizationName}</span></div>
209 </#if>
210 </#if>
211 <#if entry.isThumbnailVisible()>
212 <span class="sticker">
213 <span class="sticker-overlay">
214 <img
215 alt="${languageUtil.get(locale, "thumbnail")}"
216 class="sticker-img"
217 src="${entry.getThumbnailURLString()}"
218 />
219 </span>
220 </span>
221 </#if>
222 </div>
223 </section>
224 </div>
225 <#else>
226 <div class="autofit-col">
227 <div class="alert alert-danger">
228 <@liferay.language_format
229 arguments="result"
230 key="is-temporarily-unavailable"
231 />
232 </div>
233 </div>
234 </#if>
235 </li>
236 </#list>
237 </#if>
238 </ul>
239</div>
240
241<@liferay_aui.script use="aui-base">
242 A.one('#search-results-display-list').delegate(
243 'click',
244 function(event) {
245 var currentTarget = event.currentTarget;
246
247 currentTarget.siblings('.search-results-list').toggleClass('hide');
248 },
249 '.expand-details'
250 );
251</@liferay_aui.script>
252
253<#function tipoDocumento fileType>
254 <#if fileType == "pdf" || fileType == "binary">
255 <#return "document-pdf">
256 <#elseif fileType == "x-xcf" || fileType == "bmp" || fileType == "jpg" || fileType == "jpeg" || fileType == "png" || fileType == "gif" || fileType == "tiff" || fileType == "aiff">
257 <#return "document-image">
258 <#elseif fileType == "rtf" || fileType == "vnd.oasis.opendocument.text-template" || fileType == "vnd.openxmlformats-officedocument.wordprocessingml.template" || fileType == "doc" || fileType == "msword" || fileType == "docx" || fileType = "vnd.openxmlformats-officedocument.wordprocessingml.document" || fileType == "odt" || fileType == "text" || fileType == "text/plain" || fileType == "vnd.oasis.opendocument.text">
259 <#return "document-text">
260 <#elseif fileType == "x-msvideo" || fileType == "x-ms-wmv" || fileType == "mp4" || fileType == "avi" || fileType == "ogg" || fileType == "x-flv" || fileType == "wav" || fileType == "mpeg" || fileType == "mp3">
261 <#return "document-multimedia">
262 <#elseif fileType == "vnd.oasis.opendocument.spreadsheet" || fileType == "vnd.ms-excel.sheet.macroEnabled.12" || fileType == "vnd.openxmlformats-officedocument.spreadsheetml.sheet" || fileType == "vnd.ms-excel" || fileType == "dbf" || fileType == "excel">
263 <#return "document-table">
264 <#elseif fileType == "vnd.openxmlformats-officedocument.presentationml.presentation" || fileType == "ppt">
265 <#return "document-presentation">
266 <#elseif fileType == "xml" || fileType == "html" || fileType == "css" || fileType == "javascript">
267 <#return "file-script">
268 <#elseif fileType == "x-zip-compressed" || fileType == "zip">
269 <#return "document-compressed">
270 </#if>
271 <#return "document-default">
272</#function>
273
274<#function getNombreOrganizacion
275layoutLocalServiceUtil, groupId, themeDisplay>
276
277 <#if groupId?? && groupId != 0>
278 <#assign firstLayout = layoutLocalServiceUtil.fetchFirstLayout(groupId, false, 0)
279 nombre = ""/>
280
281 <#if firstLayout?has_content>
282 <#assign nombre=firstLayout.getName(themeDisplay.getLocale())/>
283 <#else>
284 <#assign groupLocalServiceUtil = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")/>
285 <#assign group = groupLocalServiceUtil.getGroup(groupId)/>
286 <#if group!=null>
287 <#assign nombre=HtmlUtil.escape(group.getDescriptiveName())/>
288 <#else>
289 <#assign nombre=String.valueOf(groupId)/>
290 </#if>
291 </#if>
292 <#return nombre>
293 </#if>
294 <#return "">
295</#function>