Wydawca treści Wydawca treści

Wystąpił błąd podczas przetwarzania szablonu.
Expression file.icon is undefined on line 230, column 53 in 10097#20183917#ARTICLE.
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
2<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
3<#assign imageLocalService = serviceLocator.findService("com.liferay.portal.service.ImageLocalService") /> 
4 
5<#assign journalArticleId = .vars["reserved-article-id"].data?replace('.', '-') /> 
6<#assign journalArticle = journalArticleLocalService.getArticle(getterUtil.getLong(groupId), journalArticleId) /> 
7<#assign journalArticleCreateDate = journalArticle.getCreateDate() /> 
8<#assign journalArticleModifiedDate = journalArticle.getModifiedDate() /> 
9<#assign journalArticleAuthor = .vars["reserved-article-author-name"].data /> 
10<#if coauthors?? && coauthors.data?has_content> 
11    <#assign journalArticleAuthor = coauthors.data /> 
12</#if> 
13<#if title?? && title.data?has_content> 
14    <#assign journalArticleTitle = title.data /> 
15<#else> 
16    <#assign journalArticleTitle = .vars["reserved-article-title"].data /> 
17</#if> 
18<#assign journalArticleUrlTitle = journalArticle.getUrlTitle() /> 
19 
20<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext() /> 
21<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
22<#assign portletId = themeDisplay.getPortletDisplay().getId() /> 
23 
24<div id="article-${journalArticleId}" class="nfh-cp-article"> 
25 
26    <h1 class="title">${journalArticleTitle}</h1> 
27 
28    <div class="metadata">${journalArticleModifiedDate?string["dd.MM.yyyy"]} | ${journalArticleAuthor}</div> 
29 
30    <#-- MEDIA SPOŁECZNOŚCIOWE --> 
31    <#assign printGroupId = "" /> 
32    <#if journalArticle.groupId != themeDisplay.scopeGroupId> 
33        <#assign printGroupId = themeDisplay.scopeGroupId /> 
34    </#if> 
35    <div class="social-media"> 
36        <div class="addthis_toolbox addthis_default_style"> 
37            <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> 
38            <a class="addthis_button_google_plusone" g:plusone:size="medium"></a> 
39            <a class="addthis_button_tweet"></a> 
40            <img title="${languageUtil.get(locale, "print")}" src="${themeDisplay.pathThemeImages}/nfh-cp/icon-print-20x17.png"  
41                onclick="Nfhcp.AssetPublisherPortlet.printFullContent('${portletId}', '${journalArticleId}', '${printGroupId}', '${journalArticleUrlTitle}');" class="print"> 
42            <script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script> 
43            <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-55c31ccb1e1d814d"></script> 
44        </div> 
45    </div> 
46 
47    <#-- ZDJĘCIA DO GALERII --> 
48    <#assign galleryImages = [] /> 
49    <#assign mainGalleryUuid = "" /> 
50    <#assign imageDesc = ""/> 
51 
52    <#-- Zdjęcie główne z galerii --> 
53    <#if mainphotogallery?? && mainphotogallery.data?has_content> 
54        <#assign url = mainphotogallery.data /> 
55        <#if url?starts_with("/image/image_gallery")> 
56            <#assign uuid = httpUtil.getParameter(url, "uuid", false)?string /> 
57            <#assign groupId = getterUtil.getLong(httpUtil.getParameter(url, "groupId", false), 0) /> 
58            <#if dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) ?? > 
59                <#assign image = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) /> 
60 
61                <#if image??> 
62                    <#assign mainGalleryUuid = uuid /> 
63                    <#assign imageDesc = htmlUtil.escapeAttribute(image.description) /> 
64                </#if> 
65 
66                <#assign galleryImage = {"url" : mainphotogallery.data, "thumbUrl" : mainphotogallery.data + "&width=250", "desc" : imageDesc, "uuid" : mainGalleryUuid} /> 
67                <#assign galleryImages = galleryImages + [galleryImage] /> 
68            </#if> 
69        <#elseif url?contains("/documents/")> 
70            <#assign urlParts = stringUtil.split(url, "?") /> 
71            <#assign urlParts = stringUtil.split(urlParts[0]?string, "/") /> 
72            <#assign groupId = getterUtil.getLong(urlParts[2]) /> 
73            <#assign folderId = getterUtil.getLong(urlParts[3]) /> 
74            <#assign title = httpUtil.decodeURL(urlParts[4]?string, true) /> 
75 
76            <#if urlParts?size gt 5> 
77                <#assign uuid = urlParts[5]?string /> 
78                <#assign mainGalleryUuid = uuid /> 
79                <#assign image = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) /> 
80            <#else> 
81                <#assign image = dlFileEntryLocalService.getFileEntry(groupId, folderId, title) /> 
82                <#assign mainGalleryUuid = image.uuid /> 
83            </#if> 
84 
85 
86            <#assign galleryImage = {"url" : mainphotogallery.data, "thumbUrl" : mainphotogallery.data, "desc" : htmlUtil.escapeAttribute(image.description), "uuid" : mainGalleryUuid} /> 
87            <#assign galleryImages = galleryImages + [galleryImage] /> 
88        </#if> 
89    <#-- Zdjęcie główne --> 
90    <#elseif mainphoto?? && mainphoto.data?has_content> 
91        <#assign galleryImage = {"url" : mainphoto.data, "thumbUrl" : mainphoto.data, "desc" : htmlUtil.escapeAttribute(mainphoto.maindesc.data), "uuid" : "----"} /> 
92        <#assign galleryImages = galleryImages + [galleryImage] /> 
93    </#if> 
94 
95    <#-- Zdjęcia dodatkowe z dysku --> 
96    <#if additionalphoto?? > 
97        <#list additionalphoto.getSiblings() as additionalphotoItem> 
98            <#if additionalphotoItem.data?has_content> 
99                <#assign galleryImage = {"url" : additionalphotoItem.data, "thumbUrl" : additionalphotoItem.data, "desc" : htmlUtil.escapeAttribute(additionalphotoItem.photodescription.data), "uuid" : "----"} /> 
100                <#assign galleryImages = galleryImages + [galleryImage] /> 
101            </#if> 
102        </#list> 
103    </#if> 
104 
105    <#-- Zdjęcia z galerii --> 
106    <#if additionalphotogallery?? && additionalphotogallery.data?has_content> 
107        <#assign url = additionalphotogallery.data /> 
108        <#if url?starts_with("/image/image_gallery")> 
109            <#assign uuid = httpUtil.getParameter(url, "uuid", false)?string /> 
110            <#assign groupId = getterUtil.getLong(httpUtil.getParameter(url, "groupId", false), 0) /> 
111 
112            <#if dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId)?? > 
113                <#assign image = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) /> 
114            </#if> 
115        <#elseif url?contains("/documents/")> 
116            <#assign urlParts = stringUtil.split(url, "/") /> 
117            <#assign groupId = getterUtil.getLong(urlParts[2]) /> 
118            <#assign folderId = getterUtil.getLong(urlParts[3]) /> 
119            <#assign title = httpUtil.decodeURL(urlParts[4]?string, true) /> 
120 
121            <#if dlFileEntryLocalService.getFileEntry(groupId, folderId, title)?? > 
122                <#assign image = dlFileEntryLocalService.getFileEntry(groupId, folderId, title) /> 
123            </#if> 
124        </#if> 
125 
126        <#if image??> 
127            <#assign folderId = image.folderId /> 
128            <#assign folderImages = dlFileEntryLocalService.getFileEntries(groupId, folderId) /> 
129            <#if folderImages??> 
130                <#list folderImages?sort_by("name") as folderImage> 
131                    <#if folderImage.uuid != mainGalleryUuid> 
132                        <#assign folderImageDescription = folderImage.description /> 
133                        <#if folderImage.description?lower_case == folderImage.title?lower_case + folderImage.extension?lower_case> 
134                            <#assign folderImageDescription = "" /> 
135                        </#if> 
136 
137                        <#assign galleryImage = {"url" : "/image/image_gallery?uuid=" + folderImage.uuid + "&groupId=" + folderImage.groupId, 
138                            "thumbUrl" : "/image/image_gallery?uuid=" + folderImage.uuid + "&groupId=" + folderImage.groupId, 
139                            "desc" : htmlUtil.escapeAttribute(folderImageDescription), 
140                            "uuid" : folderImage.uuid} /> 
141                        <#assign galleryImages = galleryImages + [galleryImage] /> 
142                    </#if> 
143                </#list> 
144            </#if> 
145        </#if> 
146    </#if> 
147 
148    <#-- GALERIA OBRAZÓW --> 
149    <#if galleryImages?size gt 1> 
150        <div id="gallery-${journalArticleId}" class="multiple-image-gallery royalSlider rsDefault"> 
151            <#list galleryImages as galleryImage> 
152                <a href="${galleryImage.url}&width=560" class="rsImg" data-rsbigimg="${galleryImage.url}"> 
153                    <img src="${galleryImage.thumbUrl}&width=250" uuid="${galleryImage.uuid}" class="rsTmb" /> 
154                    ${galleryImage.desc} 
155                </a> 
156            </#list> 
157        </div> 
158    <#elseif galleryImages?size == 1> 
159        <div class="single-image-gallery"> 
160            <div id="gallery-${journalArticleId}"> 
161                <#list galleryImages as galleryImage> 
162                    <a href="${galleryImage.url}" rel="lightbox" title="${htmlUtil.escape(galleryImage.desc)}"> 
163                        <img src="${galleryImage.url}&width=716" alt="${htmlUtil.escape(galleryImage.desc)}" /> 
164                        <#if galleryImage.desc?has_content> 
165                            <div class="mainphotogallery-description">${galleryImage.desc}</div>  
166                        </#if> 
167                    </a> 
168                </#list> 
169            </div> 
170        </div> 
171    </#if> 
172 
173    <#-- ZAWARTOŚĆ ARTYKUŁU --> 
174    <#if abstract?? && abstract.data?has_content> 
175        <p class="description">${abstract.data}</p> 
176    <#else> 
177        <p class="description">${.vars["reserved-article-description"].data}</p> 
178    </#if> 
179 
180    <div class="content">${content.data}</div> 
181 
182    <#-- ZAŁĄCZNIKI --> 
183    <#assign hasAttachments = false /> 
184    <#if file?? && file.getSiblings()?size gt 0> 
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            <#if fileItemName?? && fileItemName?has_content> 
194                <#assign hasAttachments = true /> 
195            </#if> 
196        </#list> 
197    </#if> 
198    <#if hasAttachments> 
199        <div class="attachments"> 
200            <h2>${languageUtil.get(locale, "resources-to-get")}</h2> 
201            <ul class="attachment-list"> 
202                <#list file.getSiblings() as fileItem> 
203                    <#if fileItem.filedescription?? && fileItem.filedescription.data?has_content> 
204                        <#assign fileItemName = fileItem.filedescription.data /> 
205                    <#elseif fileItem.filetitle?? && fileItem.filetitle.data?has_content> 
206                        <#assign fileItemName = fileItem.filetitle.data /> 
207                    <#else> 
208                        <#assign fileItemName = fileItem.data /> 
209                    </#if> 
210 
211                    <#if fileItemName?? && fileItemName?has_content> 
212                        <#assign url = fileItem.data /> 
213                        <#if url?contains("/documents/")> 
214                            <#assign urlParts = stringUtil.split(url, "?") /> 
215                            <#assign urlParts = stringUtil.split(urlParts[0]?string, "/") /> 
216                            <#assign groupId = getterUtil.getLong(urlParts[2]) /> 
217                            <#assign folderId = getterUtil.getLong(urlParts[3]) /> 
218                            <#assign title = httpUtil.decodeURL(urlParts[4]?string, true) /> 
219                            <#if urlParts?size gt 5> 
220                                <#assign uuid = urlParts[5]?string /> 
221                                <#if dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId)?? > 
222                                    <#assign file = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(uuid, groupId) /> 
223                                </#if> 
224                            <#else> 
225                                <#if dlFileEntryLocalService.getFileEntry(groupId, folderId, title)?? > 
226                                    <#assign file = dlFileEntryLocalService.getFileEntry(groupId, folderId, title) /> 
227                                </#if> 
228                            </#if> 
229                            <#if file?? > 
230                                <#assign fileIcon = file.icon + ".png" /> 
231                            </#if> 
232                        </#if> 
233                        <#if !fileIcon?? || !fileIcon?has_content> 
234                            <#assign fileItemExt = fileItem.data /> 
235                            <#assign indexOfDot = fileItemExt?last_index_of(".") + 1 /> 
236                            <#assign indexOfSlash = fileItemExt?last_index_of("/") /> 
237                            <#if indexOfSlash gt indexOfDot> 
238                                <#assign fileItemExt = fileItemExt?substring(0, indexOfSlash) /> 
239                            </#if> 
240                            <#assign fileIcon = fileItemExt?substring(indexOfDot) + ".png" /> 
241                        </#if> 
242                        <li> 
243                            <a href="${fileItem.data}" target="_blank"><img src="${themeDisplay.pathThemeImages}/file_system/small/${fileIcon}"></a> 
244                            <a href="${fileItem.data}" target="_blank">${fileItemName}</a> 
245                        </li> 
246                    </#if> 
247                </#list> 
248            </ul> 
249        </div> 
250    </#if> 
251</div>