Asset Publisher
Fehler bei der Verarbeitung der Vorlage.
Error on line 226, column 29 in 10097#20183917#29277751 file.extension is undefined. It cannot be assigned to fExtension
1<#setting locale="${locale?string}">
2
3<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") />
4<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") />
5
6<#assign journalArticleId = .vars["reserved-article-id"].data?replace('.', '-') />
7<#assign journalArticle = journalArticleLocalService.getArticle(getterUtil.getLong(groupId), journalArticleId) />
8<#assign journalArticleCreateDate = journalArticle.getCreateDate() />
9<#assign journalArticleModifiedDate = journalArticle.getModifiedDate() />
10<#assign journalArticleAuthor = .vars["reserved-article-author-name"].data />
11<#if coauthors?? && coauthors.data?has_content>
12 <#assign journalArticleAuthor = coauthors.data />
13</#if>
14<#if title?? && title.data?has_content>
15 <#assign journalArticleTitle = title.data />
16<#else>
17 <#assign journalArticleTitle = .vars["reserved-article-title"].data />
18</#if>
19<#assign journalArticleUrlTitle = journalArticle.getUrlTitle() />
20
21<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext() />
22<#assign themeDisplay = serviceContext.getThemeDisplay() />
23<#assign portletId = themeDisplay.getPortletDisplay().getId() />
24
25<div id="article-${journalArticleId}" class="nfh-cp-article">
26
27 <h1 class="title">${journalArticleTitle}</h1>
28
29 <#-- MEDIA SPOŁECZNOŚCIOWE -->
30 <#assign printGroupId = "" />
31 <#if journalArticle.groupId != themeDisplay.scopeGroupId>
32 <#assign printGroupId = themeDisplay.scopeGroupId />
33 </#if>
34 <div class="social-media">
35 <div class="addthis_toolbox addthis_default_style">
36 <input type="image" alt="${languageUtil.get(locale, "print")}" src="${themeDisplay.pathThemeImages}/nfh-cp/icon-print-20x17.png" onclick="Nfhcp.AssetPublisherPortlet.printFullContent('${portletId}', '${journalArticleId}', '${printGroupId}', '${journalArticleUrlTitle}');" class="print"/>
37 </div>
38 </div>
39
40 <#-- ZDJĘCIE GÓRNE -->
41 <#assign showImageGallery = false />
42 <#if mainphoto?? && mainphoto.data?has_content>
43 <#assign showImageGallery = true />
44 </#if>
45 <#if showImageGallery>
46 <div id="gallery-${journalArticleId}" class="event">
47 <#assign eventDateFromAsString1 = "" />
48 <#assign eventDateFromAsString2 = "" />
49 <#assign eventDateToAsString2 = "" />
50
51 <#if event?? && event.datefrom?? && event.datefrom.data?has_content>
52 <#if event.datefrom.data?matches("^\\d+$")>
53 <#assign eventDateFrom = event.datefrom.data?number?number_to_datetime />
54 <#else>
55 <#assign eventDateFrom = event.datefrom.data?datetime("yyyy-MM-dd HH:mm") />
56 </#if>
57
58 <#assign eventDateFromAsString1 = eventDateFrom?string("d '<span>'MMMM'</span>'") />
59 <#assign eventDateFromAsString2 = eventDateFrom?string("d MMMM 'godz.' HH:mm") />
60
61 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("styczeń", "stycznia") />
62 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("luty", "lutego") />
63 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("marzec", "marca") />
64 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("kwiecień", "kwietnia") />
65 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("maj$", "maja") />
66 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("czerwiec", "czerwca") />
67 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("lipiec", "lipca") />
68 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("sierpień", "sierpnia") />
69 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("wrzesień", "września") />
70 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("październik$", "października") />
71 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("listopad$", "listopada") />
72 <#assign eventDateFromAsString1 = eventDateFromAsString1?replace("grudzień", "grudnia") />
73
74 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("styczeń", "stycznia") />
75 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("luty", "lutego") />
76 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("marzec", "marca") />
77 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("kwiecień", "kwietnia") />
78 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("maj$", "maja") />
79 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("czerwiec", "czerwca") />
80 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("lipiec", "lipca") />
81 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("sierpień", "sierpnia") />
82 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("wrzesień", "września") />
83 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("październik$", "października") />
84 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("listopad$", "listopada") />
85 <#assign eventDateFromAsString2 = eventDateFromAsString2?replace("grudzień", "grudnia") />
86 </#if>
87 <#if event?? && event.dateto?? && event.dateto.data?has_content>
88 <#if event.dateto.data?matches("^\\d+$")>
89 <#assign eventDateTo = event.dateto.data?number?number_to_datetime />
90 <#else>
91 <#assign eventDateTo = event.dateto.data?datetime("yyyy-MM-dd HH:mm") />
92 </#if>
93
94 <#assign eventDateToAsString2 = eventDateTo?string("d MMMM 'godz.' HH:mm") />
95
96 <#assign eventDateToAsString2 = eventDateToAsString2?replace("styczeń", "stycznia") />
97 <#assign eventDateToAsString2 = eventDateToAsString2?replace("luty", "lutego") />
98 <#assign eventDateToAsString2 = eventDateToAsString2?replace("marzec", "marca") />
99 <#assign eventDateToAsString2 = eventDateToAsString2?replace("kwiecień", "kwietnia") />
100 <#assign eventDateToAsString2 = eventDateToAsString2?replace("maj$", "maja") />
101 <#assign eventDateToAsString2 = eventDateToAsString2?replace("czerwiec", "czerwca") />
102 <#assign eventDateToAsString2 = eventDateToAsString2?replace("lipiec", "lipca") />
103 <#assign eventDateToAsString2 = eventDateToAsString2?replace("sierpień", "sierpnia") />
104 <#assign eventDateToAsString2 = eventDateToAsString2?replace("wrzesień", "września") />
105 <#assign eventDateToAsString2 = eventDateToAsString2?replace("październik$", "października") />
106 <#assign eventDateToAsString2 = eventDateToAsString2?replace("listopad$", "listopada") />
107 <#assign eventDateToAsString2 = eventDateToAsString2?replace("grudzień", "grudnia") />
108 </#if>
109
110 <div class="image-wrapper">
111 <div class="event-date">${eventDateFromAsString1}</div>
112 <img src="${mainphoto.data}&height=305">
113 </div>
114
115 <div class="event-data">
116 <div class="header">${languageUtil.get(locale, "event-information")}</div>
117
118 <div class="subheader">${languageUtil.get(locale, "event-date")}</div>
119 <div class="date table">
120 <div class="row">
121 <div class="from-date cell"><img src="${themeDisplay.pathThemeImages}/nfh-cp/event-from-date-marker-10x9.png"/></div>
122 <div class="from-date cell"><span>${eventDateFromAsString2}</span></div>
123 </div>
124 <div class="row">
125 <div class="to-date cell"><img src="${themeDisplay.pathThemeImages}/nfh-cp/event-to-date-marker-10x9.png"/></div>
126 <div class="to-date cell"><span>${eventDateToAsString2}</span></div>
127 </div>
128 </div>
129
130 <div class="subheader">${languageUtil.get(locale, "location")}</div>
131 <div class="location table">
132 <#if event?? && event.place?? && event.place.data?has_content>
133 <div class="row">
134 <div class="cell"><span>${event.place.data}</span></div>
135 </div>
136 </#if>
137 <#if (event?? && event.person?? && event.person.data?has_content) || (event?? && event.email?? && event.email.data?has_content)>
138 <div class="row">
139 <div class="cell"><a href="mailto:${event.email.data}">${event.person.data}</a></div>
140 </div>
141 <#elseif event?? && event.email?? && event.email.data?has_content>
142 <div class="row">
143 <div class="cell"><span>${event.email.data}</span></div>
144 </div>
145 </#if>
146 <#if event?? && event.phone?? && event.phone.data?has_content>
147 <div class="row">
148 <div class="cell"><span>${languageUtil.get(locale, "phone-abbreviation")}: ${event.phone.data}</span></div>
149 </div>
150 </#if>
151 </div>
152 </div>
153 </div>
154 </#if>
155
156 <#-- ZAWARTOŚĆ ARTYKUŁU -->
157 <#if abstract?? && abstract.data?has_content>
158 <p class="description">${abstract.data}</p>
159 <#else>
160 <p class="description">${.vars["reserved-article-description"].data}</p>
161 </#if>
162
163 <div class="content">${content.data}</div>
164
165 <#-- ZAŁĄCZNIKI -->
166 <#assign hasAttachments = false />
167 <#if file?? && file.getSiblings()?size gt 0>
168 <#list file.getSiblings() as fileItem>
169 <#if fileItem.filedescription?? && fileItem.filedescription.data?has_content>
170 <#assign fileItemName = fileItem.filedescription.data />
171 <#elseif fileItem.filetitle?? && fileItem.filetitle.data?has_content>
172 <#assign fileItemName = fileItem.filetitle.data />
173 <#else>
174 <#assign fileItemName = fileItem.data />
175 </#if>
176 <#if fileItemName?? && fileItemName?has_content>
177 <#assign hasAttachments = true />
178 </#if>
179 </#list>
180 </#if>
181 <#if hasAttachments>
182 <div class="attachments">
183 <h2>${languageUtil.get(locale, "resources-to-get")}</h2>
184 <ul class="attachment-list">
185 <#list file.getSiblings() as fileItem>
186 <#if fileItem.filedescription?? && fileItem.filedescription.data?has_content>
187 <#assign fileItemName = fileItem.filedescription.data />
188 <#elseif fileItem.filetitle?? && fileItem.filetitle.data?has_content>
189 <#assign fileItemName = fileItem.filetitle.data />
190 <#else>
191 <#assign fileItemName = fileItem.data />
192 </#if>
193
194 <#if fileItemName?? && fileItemName?has_content>
195 <#assign url = fileItem.data />
196 <#if url?contains("/documents/")>
197 <#assign urlParts = stringUtil.split(url, "?") />
198 <#assign urlParts = stringUtil.split(urlParts[0]?string, "/") />
199 <#assign groupId = getterUtil.getLong(urlParts[2]) />
200 <#assign folderId = getterUtil.getLong(urlParts[3]) />
201 <#assign title = httpUtil.decodeURL(urlParts[4]?string, true) />
202 <#if urlParts?size gt 5>
203 <#assign uuid = urlParts[5]?string />
204 <#assign file = dlFileEntryLocalService.getFileEntryByUuidAndGroupId(uuid, groupId) />
205 <#else>
206 <#assign file = dlFileEntryLocalService.getFileEntry(groupId, folderId, title) />
207 </#if>
208 <#assign fileIcon = file.icon + ".png" />
209 </#if>
210 <#if !fileIcon?? || !fileIcon?has_content>
211 <#assign fileItemExt = fileItem.data />
212 <#assign indexOfDot = fileItemExt?last_index_of(".") + 1 />
213 <#assign indexOfSlash = fileItemExt?last_index_of("/") />
214 <#if indexOfSlash gt indexOfDot>
215 <#assign fileItemExt = fileItemExt?substring(0, indexOfSlash) />
216 </#if>
217 <#assign fileIcon = fileItemExt?substring(indexOfDot) + ".png" />
218 </#if>
219 <#if fileItem.wcagdescription?? && fileItem.wcagdescription.data?has_content>
220 <#assign fileItemWCAGDesc = fileItem.wcagdescription.data />
221 <#else>
222 <#assign fileItemWCAGDesc = "" />
223 </#if>
224 <#if file?? >
225 <#assign
226 fExtension = file.extension
227 textFormatter = staticUtil["com.liferay.portal.kernel.util.TextFormatter"]
228 sizeFormatted = textFormatter.formatStorageSize(file.size, locale)
229 />
230 </#if>
231
232 <li>
233 <a href="${fileItem.data}" target="_blank" <#if fileItemWCAGDesc?? && fileItemWCAGDesc?has_content>title="${htmlUtil.escapeAttribute(fileItemWCAGDesc)}"</#if>><img src="${themeDisplay.pathThemeImages}/file_system/small/${fileIcon}"></a>
234 <a href="${fileItem.data}" target="_blank" <#if fileItemWCAGDesc?? && fileItemWCAGDesc?has_content>title="${htmlUtil.escapeAttribute(fileItemWCAGDesc)}"</#if>>${fileItemName} (${stringUtil.upperCase(fExtension)}, ${sizeFormatted})</a>
235 </li>
236 </#if>
237 </#list>
238 </ul>
239 </div>
240 </#if>
241</div>