Aktualności Aktualności

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