Aktualności Aktualności

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