Widok zawartości stron Widok zawartości stron

Wystąpił błąd podczas przetwarzania szablonu.
Expression titleAsParent.selectSingleNode("dynamic-element[@name='description']/dynamic-content") is undefined on line 124, column 19 in 10112#37001#138456102.
1<#assign 
2sciezkaObrazkow = '' 
3scopeGroupId = '' 
4timeZone = '' 
5/> 
6 
7<#if request?? && request?has_content > 
8    <#assign 
9    timeZone = timeZoneUtil.getTimeZone(request['theme-display']['time-zone']) 
10    sciezkaObrazkow = request['theme-display']["path-theme-images"] 
11    scopeGroupId = request['theme-display']['scope-group-id'] 
12    /> 
13</#if> 
14 
15<#assign currentRenderUrl = ''> 
16<#if request['render-url']??> 
17    <#assign currentRenderUrl = request['render-url'] /> 
18</#if> 
19 
20<#assign plid = ''> 
21<#if request['portlet-namespace']??> 
22    <#assign plid = "#p_p_id"+ request['portlet-namespace'] > 
23</#if> 
24 
25<#assign url = ''> 
26<#assign reqFriendlyUrl = ''> 
27<#if request['attributes']??> 
28    <#assign url = request['attributes']['CURRENT_COMPLETE_URL'] /> 
29    <#if request['attributes']['FRIENDLY_URL']??> 
30        <#assign reqFriendlyUrl = request['attributes']['FRIENDLY_URL'] /> 
31    </#if> 
32</#if> 
33 
34<#function checkVer ver> 
35    <#if ver?string?contains(".")> 
36        <#return ver> 
37    <#else> 
38        <#return ver + ".0"> 
39    </#if> 
40</#function> 
41 
42<#assign groupsTemplatePermission = ["17996", "137073416", "138253629", "138244338", "138271490", "138272021", "138272210", 
43"138272712", "137427482", "1378124", "139327903", "139329102", "139334879", "139333849", "139366427", "139366543", "139366729", 
44"139615400", "139828746", "142111321", "74942167", "18091666", "1384597", "143384508", "143573699", "143650541", "143650933", 
45"143651291", "143626193", "143651626", "143698486", "143759816", "143762750", "143763175", "143763548", "143811035", 
46"144025960", "144029710", "144210552", "144268390", "142594442", "144566016", "144567168", "144613420", "144613810", 
47"144614151", "1066429", "41633", "145020268", "145456295", "145506072", "145508621", "145509076", "145509606", 
48"145510025", "144624357", "146339985", "102715934", "146816175", "147685118", "1025534", "150122405", "15103613", 
49"15033991"]> 
50 
51<#--Portal,Senat, nauka-komisja, rozwoj-komisja, remonty-komisja, statut-komisja, rw-historycznego, rw-polonistyki, finanse-komisja, przetargi 
52rw-filologicznego-139327903,rw-filozoficznego-139329102,rw-biologii-139334879,rw-wpia-139333849,rw-chemii-139366427,rw-wsmip-139366543,rw-fais-139366729 
53 Stała Senacka Komisja ds. Nauczania - 139615400, Rady WZKiS (ID: 139828746),  142111321-https://www.uj.edu.pl/web/rada-uczelni, 74942167-zespół radców prawnych 
54 18091666 - Instytut Kultury, 1384597 - BIP, 143384508 - RD Językoznawstwo, 
55 143650541 - RD Matematyka,  143650933 - RD Informatyka, 143651291 - RW Matinf 
56143626193 - RD Nauki Biologiczne, 143651626 - RD Nauki o Polityce i Adm., 143698486 - RD Psychologia, 143759816 - RD Nauki o Kulturze i Religii 
57143762750 - RD Filozofia, 143763175 - RD Socjologiczne, 143763548 - RD Pedagogika, 
58143811035 - RD Literaturoznawstwo, 144025960 - RD Nauki o Ziemi, 144029710 - RD Geografia społ-ekon., 144210552 - RD Historia, 144268390 - RD Nauki Prawne 
59142594442 - Szkoła dr nauk ścisłych i rpzyrodniczych, 144566016 - RD Nauki Fizyczne, 144567168 - RD Astronomia 
60144613420 - RD Ekonomia i Finanse, 144613810 - RD Nauki o Komunikacji Społecznej i Mediach, 144614151 - RD Nauki o Zarządzaniu i Jakości 
611066429 - Kwestura, 41633 - Wydział MatInf, 145020268 - POB Heritage 
62POB BioS - 145456295,POB FutureSoc - 145506072,POB Anthropocene - 145508621,POB qLife - 145509076,POB SciMat - 145509606,POB DigiWorld - 145510025 
63id.uj.edu.pl - 144624357, rd-archeologia-nauka - 146339985, cawp.uj.edu.pl - 102715934, RD Nauki o sztuce - 146816175, RD IT - 147685118 
641025534 - Uniwersytecki System Obsługi Studiów, 150122405 - Usosownia, 15103613 - JCJ, 15033991 - Socjologia--> 
65 
66<#-----------Predefined variables-----------> 
67<#assign 
68longCompanyId = getterUtil.getLong(companyId) 
69longGroupId = getterUtil.getLong(groupId) 
70longUserId = permissionChecker.getUserId() 
71/> 
72 
73<#-----------Services-----------> 
74<#assign 
75folderService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFolderLocalService") 
76fileService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") 
77dlAppService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLAppLocalService") 
78journalArticleService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") 
79assetEntryService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") 
80groupService = serviceLocator.findService("com.liferay.portal.service.GroupLocalService") 
81userService = serviceLocator.findService("com.liferay.portal.service.UserLocalService") 
82userRoleService = serviceLocator.findService("com.liferay.portal.service.RoleLocalService") 
83teamService = serviceLocator.findService("com.liferay.portal.service.TeamLocalService") 
84/> 
85 
86<#---------Article variables---------> 
87<#assign 
88articleId = .vars['reserved-article-id'].data 
89najnowszaWersja = .vars['reserved-article-version'].data 
90/> 
91 
92<#----------Checking version----------> 
93<#assign 
94newsestVer = .vars['reserved-article-version'].data 
95currentVer = newsestVer 
96przejdzDo = httpUtil.getParameter(url, 'przejdzDo', false) 
97/> 
98 
99<#if przejdzDo?has_content> 
100    <#assign currentVer = przejdzDo> 
101</#if> 
102<#if sciezkaObrazkow?has_content || sciezkaObrazkow?matches(".*/uj-lift-theme/images.*") && groupsTemplatePermission?seq_contains(scopeGroupId)> 
103 
104    <#if newsestVer != currentVer> 
105        <p class="archival"> 
106            <b>Niniejszy dokument jest wersją archiwalną.</b> 
107            <a class="archival-link" href="${currentRenderUrl}&groupId=${scopeGroupId}&articleId=${articleId}&przejdz-do=${newsestVer}">Przejdź do najnowszej wersji - ${newsestVer}</a><br/><br/> 
108        </p> 
109    </#if> 
110 
111    <#assign 
112    aktualna = journalArticleService.getArticle(longGroupId, articleId, getterUtil.getDouble(currentVer)) 
113    content = aktualna.getContentByLocale(locale.toString()) 
114    v = content?replace('<br>', '<br/>', 'r') 
115    document = saxReaderUtil.read(content) 
116    root = document.getRootElement() 
117 
118    artPrimKey = aktualna.getResourcePrimKey() 
119    model = "com.liferay.portlet.journal.model.JournalArticle" 
120    asset = assetEntryService.getEntry(model, artPrimKey) 
121 
122    titleAsParent = root.selectSingleNode("dynamic-element[@name='title']") 
123    title = root.selectSingleNode("dynamic-element[@name='title']/dynamic-content").text 
124    description = titleAsParent.selectSingleNode("dynamic-element[@name='description']/dynamic-content").text 
125    content = titleAsParent.selectSingleNode("dynamic-element[@name='content']/dynamic-content").text 
126    folderId = root.selectSingleNode("dynamic-element[@name='folderId']/dynamic-content").text 
127    sortField = root.selectSingleNode("dynamic-element[@name='sortField']/dynamic-content").text 
128    sortOrder = root.selectSingleNode("dynamic-element[@name='sortOrder']/dynamic-content").text 
129    showSubfolders = root.selectSingleNode("dynamic-element[@name='showSubfolders']/dynamic-content").text 
130    emptyFiles = root.selectSingleNode("dynamic-element[@name='emptyFiles']/dynamic-content").text 
131    emptySubfolder = root.selectSingleNode("dynamic-element[@name='emptySubfolder']/dynamic-content").text 
132    permission = root.selectSingleNode("dynamic-element[@name='permission']/dynamic-content").text 
133    teamId = root.selectSingleNode("dynamic-element[@name='teamId']/dynamic-content").text 
134    publishBIP = "" 
135    /> 
136    <#if root.selectSingleNode("dynamic-element[@name='publishBIP']/dynamic-content")?? > 
137        <#assign publishBIP = root.selectSingleNode("dynamic-element[@name='publishBIP']/dynamic-content").text> 
138    </#if> 
139 
140    <#assign langDownloadFiles = htmlUtil.escape(languageUtil.get(locale, "uj-lift-theme.download-files"))> 
141 
142    <style> 
143 
144        ${plid} div.folder-open{ 
145            font-size: 1rem; 
146            background: url('//www.uj.edu.pl/html/themes/control_panel/images/common/folder.png') no-repeat left center; 
147            padding: .5rem 0 0.5rem 1.5rem; 
148            display: inline-block; 
149
150        ${plid} a.folder{ background: url('//www.uj.edu.pl/html/themes/control_panel/images/common/folder_full_document.png') no-repeat left center;} 
151 
152        ${plid} p {color: #333;} 
153        #high-contrast ${plid}  p{color: #fff;} 
154 
155        ${plid} ul li{color: #333;} 
156 
157        ${plid} .back{	font-size: 1rem; display: inline-block; 	margin-right: .5rem;} 
158 
159        ${plid} a:link{text-decoration:none; color: #00519E;} 
160        #high-contrast ${plid} a:link{color: #ffe800;} 
161 
162        ${plid} a:visited{text-decoration:none; color: #005ca7 !important;} 
163 
164        ${plid} a.download { 
165                    color: #292727; 
166                    display: inline-block; 
167                    <#if publishBIP?has_content && publishBIP == "true"> width: 75%; <#else> width: 100%; </#if> 
168            padding: .25rem 0 0.25rem 1.5rem; 
169
170 
171        .view-lt720 ${plid} a.download { 
172            display: block; width: 100%; 
173
174 
175        ${plid} a:hover.download {color: #00519E; padding: .25rem 0 0.25rem 1.75rem;} 
176        #high-contrast ${plid} a.download{color: #fff !important;} 
177        #high-contrast ${plid} a:hover.download{color: #FFE800 !important;} 
178 
179        ${plid} a.cdr { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/cdr.png') no-repeat left top 0.5rem;} 
180        ${plid} a.eps { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/eps.png') no-repeat left top 0.5rem;} 
181        ${plid} a.pdf { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/pdf.png') no-repeat left top 0.5rem;} 
182        ${plid} a.rtf { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/rtf.png') no-repeat left top 0.5rem;} 
183        ${plid} a.zewnetrzny_link { background: url('//www.uj.edu.pl/image/image_gallery?uuid=2202e51b-8a20-4edf-b3f5-dd1fd92c116f&groupId=37001&t=1297849855367') no-repeat left top 0.5rem;} 
184        ${plid} a.ai { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/ai.png') no-repeat left top 0.5rem;} 
185        ${plid} a.doc,${plid}  a.docx { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/doc.png') no-repeat left top 0.5rem;} 
186        ${plid} a.jpg { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/jpg.png') no-repeat left top 0.5rem;} 
187        ${plid} a.pptx, ${plid} a.ppt{ background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/ppt.png') no-repeat left top 0.5rem;} 
188        ${plid} a.xls,${plid}  a.xlsx { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/xls.png') no-repeat left top 0.5rem;} 
189        ${plid} a.zip { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/zip.png') no-repeat left top 0.5rem;} 
190        ${plid} a.swf { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/swf.png') no-repeat left top 0.5rem;} 
191        ${plid} a.txt { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/txt.png') no-repeat left top 0.5rem;} 
192        ${plid} a.csv { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/csv.png') no-repeat left top 0.5rem;} 
193        ${plid} a.gif { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/gif.png') no-repeat left top 0.5rem;} 
194        ${plid} a.odt { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/odt.png') no-repeat left top 0.5rem;} 
195        ${plid} a.xml { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/xml.png') no-repeat left top 0.5rem;} 
196        ${plid} a.tiff { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/tiff.png') no-repeat left top 0.5rem;} 
197        ${plid} a.png { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/png.png') no-repeat left top 0.5rem;} 
198        ${plid} a.css { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/css.png') no-repeat left top 0.5rem;} 
199        ${plid} a.js { background: url('//www.uj.edu.pl/html/themes/control_panel/images/file_system/small/js.png') no-repeat left top 0.5rem;} 
200 
201        ${plid} .stopka { color: #bbb; font-size: .85rem; display: none;} 
202        ${plid} .stopka a:link { color: #bbb; font-size: .85rem; text-decoration-line: underline;} 
203        #hign-contrast ${plid} .stopka a:link { color: #FFE800;} 
204        ${plid} .stopka a:hover {color: #aaa} 
205        ${plid} .permission-error{color: #dd0000;} 
206        ${plid} .permission-info{margin-top: 1em;} 
207 
208        ${plid} .komunikat{color: #aaa;} 
209        ${plid} .komunikat a:link{color: #8cb1d4;} 
210 
211        ${plid} .file { 
212                    margin: .25rem 0; 
213
214        #high-contrast ${plid} .file{background: #030303;} 
215 
216        ${plid} .czytaj{ 
217                    cursor: pointer; 
218                    text-decoration: none; 
219                    float: right; 
220                    padding: .25rem .5rem; 
221
222 
223        .view-lt720 ${plid} .czytaj{ 
224            float: none; 
225            padding: 1rem; 
226
227 
228        ${plid} .archiwum{ 
229                    border: 1px dashed #eee; 
230                    padding: 0.125rem; 
231                    font-size: 0.725rem; 
232
233 
234        ${plid}  #accordion-header-history{cursor: pointer; background: #f9f9f9;} 
235        #high-contrast ${plid}  #accordion-header-history{cursor: pointer; background: #090909;} 
236 
237        ${plid} .czytaj:hover{color: #000; text-decoration: none;} 
238        #high-contrast ${plid}  .czytaj:hover{color: #fff;} 
239 
240        ${plid}  #accordion-panel-history{background: #f0f0f0;} 
241        #high-contrast ${plid}  #accordion-panel-history{background: #101010;} 
242 
243        ${plid} #accordion-header-history, ${plid} #accordion-panel-history{display: block; 
244                    font-family: 'Libre Baskerville', serif; 
245                    font-size: .85rem; 
246                    padding: 15px 45px 15px 30px; 
247                    position: relative; 
248                    text-decoration: none; 
249                    height: auto; 
250                    border-bottom: 1px #e0e0e0 solid; 
251
252 
253        ${plid} #accordion-header-history:before { 
254                    font-family: 'icomoon'; 
255                    speak: none; 
256                    font-style: normal; 
257                    font-weight: normal; 
258                    font-variant: normal; 
259                    text-transform: none; 
260                    line-height: 1; 
261                    vertical-align: middle; 
262                    -webkit-font-smoothing: antialiased; 
263                    content: "\e60d"; 
264                    width: auto; 
265                    position: absolute; 
266                    top: 15px; 
267                    bottom: 0; 
268                    right: 30px; 
269                    color: #aaaaaa; 
270                    font-size: 20px; 
271                    font-size: 1.25rem; 
272
273        #high-contrast #accordion-header-history:before {color: #eee;} 
274 
275        ${plid} #accordion-header-history.open:before{ 
276                    content: "\e60e"; 
277                //color: #005ca7; 
278
279        ${plid} .works-activities{ 
280                    background: #f8f8f8; 
281                    padding: 0 1rem 1rem 1rem; 
282                    margin: 2rem 0 .5rem 0; 
283                    border: 1px dashed #ddd; 
284
285 
286        ${plid} .description{ 
287                    color: #999; 
288
289 
290        .archival {font-family: 'Libre Baskerville', serif; 
291            color:#e80000;} 
292        #high-contrast .archival{color: #fff;} 
293 
294        ${plid} .description{color: #999;} 
295        #high-contrast ${plid} .description{color: #fff;} 
296        #high-contrast ${plid} .file a{color: #FFE800;} 
297        #high-contrast ${plid} .file a:visited {color: #FFE800 !important;} 
298        #high-contrast ${plid} .download{color: #FFE800 !important;} 
299        #high-contrast ${plid} a.download{color: #FFE800 !important;} 
300        #high-contrast ${plid} a.archival-link{color: #FFE800 !important;} 
301        #high-contrast ${plid} a:visited.archival-link {color: #FFE800 !important;} 
302        #high-contrast ${plid} .archiwum li {color: #fff ;} 
303        #high-contrast ${plid} li {color: #fff ;} 
304    </style> 
305 
306    <#-- TRANSLATION --> 
307    <#assign translations = { 
308        'znajdujeszSieWKatalogu':{ 
309            'pl_PL':'Znajdujesz się w katalogu', 
310            'en_GB':'You are in the directory' 
311        }, 
312        'brakPlikowWKatalogu':{ 
313            'pl_PL':'Brak plików w katalogu', 
314            'en_GB':'No files in the directory' 
315        }, 
316        'znajdujeszSieWKataloguGlownym':{ 
317            'pl_PL':'Znajdujesz się w katalogu głównym', 
318            'en_GB':'You are in the root directory' 
319        }, 
320        'powrot':{ 
321            'pl_PL':'Powrót', 
322            'en_GB':'Return' 
323        }, 
324        'zawartoscTegoFolderuNiedostepna':{ 
325            'pl_PL':'Zawartość tego folderu jest niedostępna', 
326            'en_GB':'The content of this folder is unavailable' 
327        }, 
328        'trescDostepnaDlaZalogowanych':{ 
329            'pl_PL':'Treść dostępna po zalogowaniu', 
330            'en_GB':'The content is available to logged in users' 
331        }, 
332        'trescDostepnaDlaOkreslonejGrupy':{ 
333            'pl_PL':'Treść dostępna dla określonej grupy osób po zalogowaniu', 
334            'en_GB':'The content is available to specific logged in users' 
335        }, 
336        'niePosiadajaPanstwoOpowiednichUprawnien':{ 
337            'pl_PL':'Nie posiadają Państwo odpowiednich uprawnień do przeglądania tej treści', 
338            'en_GB':'You do not have authorisation to view this content' 
339        }, 
340        'zawartoscDostepnaDla':{ 
341            'pl_PL':'Zawartość dostępna tylko dla', 
342            'en_GB':'Content available only' 
343        }, 
344        'zespolu':{ 
345            'pl_PL':'zespołu', 
346            'en_GB':'to the team' 
347        }, 
348        'uzytkownikowWitryny':{ 
349            'pl_PL':'użytkowników witryny', 
350            'en_GB':'to the website users' 
351        }, 
352        'pracownikowUj':{ 
353            'pl_PL':'pracowników UJ', 
354            'en_GB':'to Jagiellonian University employees' 
355        }, 
356        'iLub':{ 
357            'pl_PL':'i/lub', 
358            'en_GB':'and/or' 
359        }, 
360        'doktorantow':{ 
361            'pl_PL':'doktorantów UJ', 
362            'en_GB':'PhD students' 
363        }, 
364        'nieskonfigurowanyIdentyfikatorKatalogu':{ 
365            'pl_PL':'Nieskonfigurowany identyfikator katalogu', 
366            'en_GB':'Unconfigured directory identifier' 
367        }, 
368        'listaPlikowKatalogow':{ 
369            'pl_PL':'Lista plików i katalogów', 
370            'en_GB':'List of files and directories' 
371        }, 
372        'poZakonczeniuPrzegladaniaPlikówNalezySieWylogowac':{ 
373            'pl_PL':'Po zakończeniu przeglądania plików należy się wylogować', 
374            'en_GB':'Log out after you have finished viewing the files' 
375        }, 
376        'zalogowac':{ 
377            'pl_PL':'zalogować', 
378            'en_GB':'log-in' 
379        }, 
380        'dziennikZmianPliku':{ 
381            'pl_PL':'Dziennik zmian pliku', 
382            'en_GB':'File revision log' 
383        }, 
384        'dziennikZmianDokumentu':{ 
385            'pl_PL':'Dziennik zmian dokumentu', 
386            'en_GB':'Document revision log' 
387        }, 
388        'ukryjDziennikZmianPliku':{ 
389            'pl_PL':'Ukryj dziennik zmian pliku', 
390            'en_GB':'Hide the file revision log' 
391        }, 
392        'ukryjDziennikZmianDokumentu':{ 
393            'pl_PL':'Ukryj dziennik zmian dokumentu', 
394            'en_GB':'Hide the document revision log' 
395        }, 
396        'dataPublikacji':{ 
397            'pl_PL':'Data publikacji', 
398            'en_GB':'Date of publication' 
399        }, 
400        'wersja':{ 
401            'pl_PL':'wersja', 
402            'en_GB':'version' 
403        }, 
404        'pokazWersje':{ 
405            'pl_PL':'Pokaż wersję', 
406            'en_GB':'Show version' 
407        }, 
408        'przegladaszWersje':{ 
409            'pl_PL':'Przeglądasz wersję', 
410            'en_GB':'You are viewing the version' 
411        }, 
412        'dataAktualizacji':{ 
413            'pl_PL':'Data aktualizacji', 
414            'en_GB':'Actualisation date' 
415        }, 
416        'zaktualizowal':{ 
417            'pl_PL':'Zaktualizował', 
418            'en_GB':'Updated' 
419        }, 
420        'dataOpublikowania':{ 
421            'pl_PL':'Data opublikowania', 
422            'en_GB':'Date of publication' 
423        }, 
424        'dokumentOpublikowanyPrzez':{ 
425            'pl_PL':'Dokument opublikowany przez', 
426            'en_GB':'Document published by' 
427        }, 
428        'iloscWyswietlen':{ 
429            'pl_PL':'Ilość wyświetleń', 
430            'en_GB':'Number of views' 
431
432
433    /> 
434 
435    <#if locale!='pl_PL'> 
436        <#assign locale = 'en_GB'/> 
437    </#if> 
438 
439    <#-- UPRAWNIENIA--> 
440    <#assign 
441    grupa = groupService.getGroup(longGroupId) 
442    error = true 
443    friendlyUrl = htmlUtil.escapeURL(reqFriendlyUrl) 
444    adresLogowania = "/c/portal/login?Fp_l_id=10181&_58_redirect=" + friendlyUrl 
445    rolaPracownik = userRoleService.getRole(longCompanyId, "Pracownik").getRoleId() 
446    sprPracownika = userRoleService.hasUserRole(longUserId, rolaPracownik) 
447    rolaDoktorant = userRoleService.getRole(longCompanyId, "Doktorant").getRoleId() 
448    sprDoktoranta = userRoleService.hasUserRole(longUserId, rolaDoktorant) 
449    /> 
450 
451    <#if permission == "zalogowani członkowie witryny"> 
452        <#if longUserId lt 100000> 
453            <p class="page-sub-heading__title permission-info"> 
454                <a href="${adresLogowania}">${translations['trescDostepnaDlaOkreslonejGrupy'][locale]} <i class="icon icon-enter"></i></a> 
455             </p> 
456 
457        <#else> <#--jesli zalogowany sprawdzamy role i udział w organizacji/społecznosci danej strony--> 
458        <#-- checking teamId (the most restrictive)--> 
459            <#if longTeamId?has_content && teamService.getTeam(getterUtil.getLong(teamId))??> 
460                <#assign teamName = teamService.getTeam(getterUtil.getLong(teamId)).getName()> 
461                <#if teamService.hasUserTeam(longUserId, longTeamId)> 
462                    <#assign error = false> 
463                <#else> 
464                    <p class="page-sub-heading__title permission-info"> 
465                        <span class="permission-error">${translations['niePosiadajaPanstwoOpowiednichUprawnien'][locale]}</span>. 
466                        <br/>${translations['zawartoscDostepnaDla'][locale]} ${translations['zespolu'][locale]}<#if teamName?has_content>: <b>${teamName}</b></#if>. 
467                    </p> 
468                </#if> 
469            <#else> 
470                <#if userService.hasGroupUser(getterUtil.getLong(groupId), longUserId)> 
471                    <#assign error = false> 
472                <#else> 
473                    <p class="page-sub-heading__title permission-info"> 
474                        <span class="permission-error">${translations['niePosiadajaPanstwoOpowiednichUprawnien'][locale]}</span>. 
475                        <br/>${translations['zawartoscDostepnaDla'][locale]} ${translations['uzytkownikowWitryny'][locale]}: <b>${grupa.getDescriptiveName()}</b>. 
476                    </p> 
477                </#if> 
478            </#if> <#-- of checking teamId--> 
479        </#if> 
480 
481    <#elseif permission == "zalogowani pracownicy UJ"> 
482        <#if longUserId lt 100000> 
483            <p class="page-sub-heading__title permission-info"> 
484                <a href="${adresLogowania}">${translations['trescDostepnaDlaOkreslonejGrupy'][locale]} <i class="icon icon-enter"></i></a> 
485            </p> 
486        <#else> <#--jesli zalogowany sprawdzamy role--> 
487            <#if sprPracownika == true> 
488                <#assign error = false> 
489            <#else> 
490                <p class="page-sub-heading__title permission-info"> 
491                    <span class="permission-error">${translations['niePosiadajaPanstwoOpowiednichUprawnien'][locale]}</span>. 
492                    <br/>${translations['zawartoscDostepnaDla'][locale]} <b>${translations['pracownikowUj'][locale]}</b>. 
493                </p> 
494            </#if> 
495        </#if> 
496    <#elseif permission == "zalogowani pracownicy i doktoranci UJ"> 
497        <#if longUserId lt 100000> 
498            <p class="page-sub-heading__title permission-info"> 
499                <a href="${adresLogowania}">${translations['trescDostepnaDlaOkreslonejGrupy'][locale]} <i class="icon icon-enter"></i></a> 
500            </p> 
501        <#else> <#--jesli zalogowany sprawdzamy role--> 
502            <#if sprPracownika == true || sprDoktoranta == true> 
503                <#assign error = false> 
504            <#else> 
505                <p class="page-sub-heading__title permission-info"> 
506                    <span class="permission-error">${translations['niePosiadajaPanstwoOpowiednichUprawnien'][locale]}</span>. 
507                    <br/>${translations['zawartoscDostepnaDla'][locale]} <b>${translations['pracownikowUj'][locale]} ${translations['iLub'][locale]} doktorantów UJ</b>. 
508                </p> 
509            </#if> 
510        </#if> 
511    <#elseif permission == "zalogowani doktoranci UJ"> 
512        <#if longUserId lt 100000> 
513            <p class="page-sub-heading__title permission-info"> 
514                <a href="${adresLogowania}">${translations['trescDostepnaDlaOkreslonejGrupy'][locale]} <i class="icon icon-enter"></i></a> 
515            </p> 
516        <#else> <#--jesli zalogowany sprawdzamy role--> 
517            <#if sprDoktoranta == true> 
518                <#assign error = false> 
519            <#else> 
520                <p class="page-sub-heading__title permission-info"> 
521                    <span class="permission-error">${translations['niePosiadajaPanstwoOpowiednichUprawnien'][locale]}</span>. 
522                    <br/>${translations['zawartoscDostepnaDla'][locale]} <b>${translations['doktorantow'][locale]}</b>. 
523                </p> 
524            </#if> 
525        </#if> 
526    <#elseif permission == "wszyscy zalogowani"> 
527        <#if longUserId lt 100000> 
528            <p class="page-sub-heading__title permission-info"> 
529                <a href="${adresLogowania}">${translations['trescDostepnaDlaZalogowanych'][locale]} <i class="icon icon-enter"></i></a> 
530            </p> 
531        <#else> 
532            <#assign error = false> 
533        </#if> 
534    <#elseif permission == "niezalogowani"> 
535        <#assign error = false> 
536    </#if> <#-- end of checking permission--> 
537    <#assign 
538    currentFolderId = "" 
539    currentFolderId = httpUtil.getParameter(url, 'folderId', false) 
540    /> 
541    <#-- check whether parent folder in current language is correct - if not set parentFolder --> 
542    <#if !currentFolderId?has_content> 
543        <#if folderId?has_content && (folderId?length gt 0) && (folderId !="null")> 
544            <#assign currentFolderId = folderId> 
545        <#else> 
546            <p class="alert">Nieskonfigurowany identyfikator katalogu.</p> 
547            <#assign currentFolderId = ""> 
548        </#if> 
549    <#else> 
550 
551        <#if folderId?has_content && (folderId?length gt 0) && (folderId !="null")> 
552            <#assign 
553            longParentFolderId = getterUtil.getLong(folderId) 
554            parentSubfolders = folderService.getFolders(longGroupId, longParentFolderId) 
555            redirectOnParentFolder = true 
556            /> 
557 
558            <#if folderId!=currentFolderId > 
559 
560                    <#list parentSubfolders as sf> 
561                        <#if sf.folderId?string == currentFolderId> 
562                            <#assign redirectOnParentFolder = false /> 
563                        </#if> 
564                    </#list> 
565 
566                <#assign 
567                parentUrl = httpUtil.setParameter(url, 'folderId', longParentFolderId) 
568                /> 
569                <script> 
570                    let friendlyUrl = "${reqFriendlyUrl}"; 
571 
572                    <#if !redirectOnParentFolder > 
573                        console.log('Not Redirect! -- ${parentUrl}'); 
574                    <#else> 
575                        console.log('Redirect! -- ${parentUrl}'); 
576                        window.location.replace(friendlyUrl); 
577                    </#if> 
578 
579                </script> 
580            </#if> 
581 
582        <#else> 
583            <p class="alert">Nieskonfigurowany identyfikator katalogu.</p> 
584        </#if> 
585    </#if> 
586 
587    <#if folderId?has_content && (folderId?length gt 0) && (folderId !="null")> 
588        <#assign 
589        longCurrentFolderId = getterUtil.getLong(currentFolderId) 
590        folders = folderService.getFolders(longGroupId, longCurrentFolderId) 
591        folder = "" 
592        /> 
593 
594        <#if folderService.getFolder(longCurrentFolderId)??> 
595            <#assign folder = folderService.getFolder(longCurrentFolderId)> 
596        </#if> 
597 
598        <#assign parentUrl = httpUtil.setParameter(url, 'folderId', folderId)> 
599        <#-- sorting by createDate, modifiedDate, title, description --> 
600 
601        <#if !sortField?has_content> 
602            <#assign sortField = "title"> 
603        </#if> 
604        <#if !sortOrder?has_content> 
605            <#assign sortOrder = "asc"> 
606        </#if> 
607        <#if sortOrder == "asc"> 
608            <#assign isAscending = true> 
609        <#else> 
610            <#assign isAscending = false> 
611        </#if> 
612 
613        <#assign 
614        OrderByComparatorFactoryUtil = staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"] 
615        filesOrderBy = OrderByComparatorFactoryUtil.create("DLFileEntry", [sortField, isAscending]) 
616        files = fileService.getFileEntries(longGroupId, longCurrentFolderId, 0, 0, 300, filesOrderBy) 
617        /> 
618    </#if>   <#-- end of checkin folderId if empty --> 
619 
620    <section class="main-content" id="main-content" tabindex="-1"> 
621        <article class="article"> 
622            <#if error == false> 
623            <#--treść właściwa--> 
624                <div class="page-sub-heading"> 
625                    <h2 class="page-sub-heading__title"> 
626                        <#if title?has_content && title?length gt 0> 
627                            ${title} 
628                        <#else> 
629                            ${translations['listaPlikowKatalogow'][locale]} 
630                        </#if> 
631                    </h2> 
632                </div> 
633 
634            <#-- wyekstrahować dane o portletach z bieżacej strony!!!!--> 
635                <#assign 
636                layoutService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") 
637                currentPlid = getterUtil.getLong(request['theme-display']['plid']) 
638                currentLayout = layoutService.getLayout(currentPlid) 
639                currentPortletId = request['attributes']['PORTLET_ID'] 
640                currentLayoutType = currentLayout.getLayoutType() 
641                portletsInRightColumn = currentLayoutType.getAllPortlets("column-3") 
642                /> 
643                <#if portletsInRightColumn?has_content && portletsInRightColumn?size gt 0 && portletsInRightColumn[0].getPortletId() == currentPortletId> 
644                    <#if permission != "niezalogowani"> 
645                        <p class="komunikat"> 
646                            <a href="/c/portal/logout?p_l_id=10181&_58_redirect=${htmlUtil.escapeURL(reqFriendlyUrl)}">${translations['poZakonczeniuPrzegladaniaPlikówNalezySieWylogowac'][locale]} <i class="icon icon-exit"></i></a> 
647                        </p> 
648                    </#if> 
649                </#if> 
650 
651 
652                <div class="article__content"> 
653 
654                <#if description?has_content> 
655                    <p class="article__description"> 
656                        ${description} 
657                    </p> 
658                </#if> 
659                <#if content?has_content> 
660                    <p> 
661                        ${content} 
662                    </p> 
663                </#if> 
664                <#-- checking parentFolderId--> 
665                <#if  folderId?has_content && (folderId?length gt 0) && (folderId !="null")> 
666                    <#if longCurrentFolderId == getterUtil.getLong(folderId) || getterUtil.getLong(folderId) == folder.getParentFolderId()> 
667 
668                        <#if showSubfolders?has_content && showSubfolders == "tak"> 
669                            <#if currentFolderId != folderId> 
670                                <a href="${parentUrl}" class="back"> 
671                                    <i class="icon icon-undo2"></i> 
672                                    ${translations['powrot'][locale]} 
673                                </a> 
674                            </#if> 
675                            <div class="folder-open"> 
676                                <#if folder?has_content && folder.getName()?has_content> 
677                                    ${translations['znajdujeszSieWKatalogu'][locale]} <b>${folder.getName()}</b> 
678                                <#else> 
679                                    ${translations['znajdujeszSieWKataloguGlownym'][locale]} 
680                                </#if> 
681                            </div> 
682 
683                            <#-- FOLDERS--> 
684                            <#if folders?size == 0> 
685                                ${emptySubfolder} 
686                                <#if emptySubfolder?has_content && emptySubfolder?length gt 0> 
687                                    <div class="info-podfolder"> 
688                                        ${emptySubfolder} 
689                                    </div> 
690                                </#if> 
691                            <#else> 
692                                <div> 
693                                    <#list folders as f> 
694                                        <#assign folderId = f.getFolderId()> 
695                                        <#assign urlToFolder = httpUtil.setParameter(url, "folderId", folderId)> 
696 
697                                        <a href="${urlToFolder}" class="folder download"> 
698                                            ${f.getName()} 
699                                        </a> 
700                                    </#list> 
701                                </div> 
702                            </#if> 
703                        </#if><#-- end of checking showSubfolders--> 
704 
705                        <div id="accordionGroup" class="dziennikZmian" data-allow-multiple data-allow-toggle> 
706                            <div class="article__section"> 
707 
708                                <#if files?size == 0> 
709                                    <br/> 
710                                    <#if emptyFiles?has_content && emptyFiles?length gt 0> 
711                                        ${emptyFiles} 
712                                    <#else> 
713                                        ${translations['brakPlikowWKatalogu'][locale]} 
714                                    </#if> 
715                                    <br/> 
716                                <#else> 
717                                    <#list files as doc> 
718                                        <#assign uet = httpUtil.encodeURL(htmlUtil.unescape(doc.getTitle()))> 
719                                        <#assign fileExt = doc.getExtension()> 
720                                        <#assign fileUrl = "/documents/" + longGroupId + "/" + currentFolderId + "/" + uet> 
721                                        <div class="file"> 
722                                            <a type="button" href="${fileUrl}" class="download <#if fileExt?has_content && fileExt?length gt 0> ${fileExt} </#if> "> 
723                                                <#if doc.description?length gt 0> 
724                                                    ${doc.getDescription()} 
725                                                <#else> 
726                                                    ${doc.getTitle()} 
727                                                </#if> 
728                                            </a> 
729 
730                                            <#if publishBIP?has_content && publishBIP == "true"> 
731                                                <a tabindex="0" id="accordion-header-${files?seq_index_of(doc)}" aria-controls="accordion-panel-${files?seq_index_of(doc)}" class="czytaj Accordion-trigger" aria-expanded="false" type="button"> 
732                                                    <i class="icon icon-info"></i> 
733                                                    ${translations['dziennikZmianPliku'][locale]} 
734                                                </a> 
735                                                <div id="accordion-panel-${files?seq_index_of(doc)}" aria-labelledby="accordion-header-${files?seq_index_of(doc)}" class="archiwum" hidden> 
736                                                    <#assign docVersions = doc.getFileVersions(0)> 
737                                                    <ul> 
738                                                        <#list docVersions as docVersion> 
739                                                            <li><a href="${fileUrl}?version=${docVersion.getVersion()}">${translations['wersja'][locale]}: ${docVersion.version}</a>, ${translations['dataPublikacji'][locale]}: ${dateUtil.getDate(docVersion.getStatusDate(), "dd.MM.yyyy HH:mm", locale, timeZone)} 
740                                                                ${docVersion.getStatusByUserName()} 
741                                                            </li> 
742                                                        </#list> 
743                                                    </ul> 
744                                                </div> 
745                                            </#if> 
746                                        </div> <#-- end of class="file"--> 
747                                    </#list><#-- of foreach--> 
748                                </#if><#-- of checking files.size--> 
749 
750                            </div> <#-- end of article__section--> 
751                        </div> <#-- end of Accordion--> 
752 
753                    <#else> 
754                        <p>${translations['zawartoscTegoFolderuNiedostepna'][locale]}</p> 
755                    </#if> 
756                </#if><#-- end of checkin folderId if empty--> 
757 
758                </div> <#-- end of article__content--> 
759 
760                <#if publishBIP?has_content && publishBIP == 'true'> 
761                <#-- -----------------------------------------------------------------> 
762                <#-- --------  assets from the current journalArticle--> 
763                <#-- ------------------------------------------------------------------> 
764                    <#assign 
765                    assetCategoryService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService") 
766                    assetTagService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetTagLocalService") 
767                    articleId = .vars['reserved-article-id'].data 
768                    article = journalArticleService.getArticle(groupId, articleId) 
769                    model = "com.liferay.portlet.journal.model.JournalArticle" 
770                    artPrimKey = article.getResourcePrimKey() 
771                    asset = assetEntryService.getEntry(model, artPrimKey) 
772                    assetViewCount = asset.getViewCount() 
773                    assetClassPK = getterUtil.getLong(asset.getClassPK()) 
774                    categories = assetCategoryService.getCategories(model, assetClassPK) 
775                    tags = assetTagService.getTags(model, assetClassPK) 
776                    /> 
777 
778                    <div class="dziennikZmian" data-allow-multiple data-allow-toggle> 
779                        <a id="accordion-header-history" aria-controls="accordion-panel-history" tabindex="0" class="Accordion-trigger" aria-expanded="false" type="button"> 
780                            <i class="icon icon-info"></i> 
781                            ${translations['dziennikZmianDokumentu'][locale]}</a> 
782 
783                        <div id="accordion-panel-history" aria-labelledby="accordion-header-history" style="display: none;"> 
784 
785                            <#-- LINKOWANIE DO POPRZEDNIEJ WERSJI--> 
786                            <#assign articleVersions = journalArticleService.getArticles(groupId, articleId)> 
787                            <#list articleVersions as articleVersion> 
788                                <#if articleVersion.getStatus() != 2> 
789                                    <#assign version = articleVersion.getVersion()> 
790                                    <#assign dataMod = dateUtil.getDate(articleVersion.getModifiedDate(), "dd.MM.yyyy HH:mm", locale, timeZone)> 
791                                    <#assign userMod = articleVersion.getUserName()> 
792                                    <p> 
793                                        <#if currentVer?number != version?number> 
794                                            <a class="archival-link" href="${currentRenderUrl}&groupId=${scopeGroupId}&articleId=${articleId}&przejdzDo=${checkVer(version)}">${translations['pokazWersje'][locale]} ${checkVer(version)}</a> 
795                                        <#else> 
796                                            ${translations['przegladaszWersje'][locale]} <b>${checkVer(version)}</b> 
797                                        </#if> 
798                                        <span class="description"><#if version?number == 1.0>${translations['dataOpublikowania'][locale]}:<#else> ${translations['dataAktualizacji'][locale]}:</#if></span> 
799                                        ${dataMod} 
800                                        <span class="description"><#if version?number == 1.0>${translations['dokumentOpublikowanyPrzez'][locale]}:<#else> ${translations['zaktualizowal'][locale]}:</#if></span> 
801                                        ${userMod} 
802                                    </p> 
803                                </#if> 
804                            </#list> <#-- of foreach--> 
805                            <p><span>${translations['iloscWyswietlen'][locale]}:</span> <span>${assetViewCount}</span></p> 
806                        </div> 
807                    </div> 
808                </#if> <#-- end of checking publishBIP==true--> 
809            </#if> <#--koniec sprawdzenia, czy error--> 
810        </article> 
811    </section> 
812<#else> 
813    <p>Wybrany szablon nie jest przeznaczony dla tej witryny!</p> 
814</#if> 
815 
816 
817<#if publishBIP?has_content && publishBIP == 'true'> 
818    <script type="text/javascript"> 
819        /* 
820            *   This content is licensed according to the W3C Software License at 
821            *   https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document 
822
823            *   Simple accordion pattern example 
824            */ 
825        'use strict'; 
826 
827        Array.prototype.slice.call(document.querySelectorAll('.dziennikZmian')).forEach(function (accordion) { 
828 
829            // Allow for multiple accordion sections to be expanded at the same time 
830            var allowMultiple = accordion.hasAttribute('data-allow-multiple'); 
831            // Allow for each toggle to both open and close individually 
832            var allowToggle = (allowMultiple) ? allowMultiple : accordion.hasAttribute('data-allow-toggle'); 
833 
834            // Create the array of toggle elements for the accordion group 
835            var triggers = Array.prototype.slice.call(accordion.querySelectorAll('.Accordion-trigger')); 
836            var panels = Array.prototype.slice.call(accordion.querySelectorAll('.Accordion-panel')); 
837 
838            accordion.addEventListener('keypress', accord, false); 
839            accordion.addEventListener('click', accord, false); 
840 
841            function accord(event) { 
842                var target = event.target; 
843                if (target.classList.contains('Accordion-trigger')) { 
844                    // Check if the current toggle is expanded. 
845                    var isExpanded = target.getAttribute('aria-expanded') == 'true'; 
846                    var active = accordion.querySelector('[aria-expanded="true"]'); 
847 
848                    // without allowMultiple, close the open accordion 
849                    if (!allowMultiple && active && active !== target) { 
850                        // Set the expanded state on the triggering element 
851                        active.setAttribute('aria-expanded', 'false'); 
852                        // Hide the accordion sections, using aria-controls to specify the desired section 
853                        document.getElementById(active.getAttribute('aria-controls')).setAttribute('hidden', ''); 
854 
855                        // When toggling is not allowed, clean up disabled state 
856                        if (!allowToggle) { 
857                            active.removeAttribute('aria-disabled'); 
858
859
860 
861                    if (!isExpanded) { 
862                        // Set the expanded state on the triggering element 
863                        target.setAttribute('aria-expanded', 'true'); 
864                        // Hide the accordion sections, using aria-controls to specify the desired section 
865                        // document.getElementById(target.getAttribute('aria-controls')).removeAttribute('hidden'); 
866                        jQuery(target).next("div").slideToggle("fast"); 
867 
868                        if(target.innerHTML.includes('pliku')){ 
869                            target.innerHTML = '<i class="icon icon-info"></i> ${translations['ukryjDziennikZmianPliku'][locale]}'; 
870                        } else { 
871                            target.innerHTML = '<i class="icon icon-info"></i> ${translations['ukryjDziennikZmianDokumentu'][locale]}'; 
872
873                        // If toggling is not allowed, set disabled state on trigger 
874                        if (!allowToggle) { 
875                            target.setAttribute('aria-disabled', 'true'); 
876
877
878                    else if (allowToggle && isExpanded) { 
879                        // Set the expanded state on the triggering element 
880                        target.setAttribute('aria-expanded', 'false'); 
881                        // Hide the accordion sections, using aria-controls to specify the desired section 
882                        // document.getElementById(target.getAttribute('aria-controls')).setAttribute('hidden', ''); 
883                        jQuery(target).next("div").slideToggle("fast"); 
884                        if(target.innerHTML.includes('pliku')){ 
885                            target.innerHTML = '<i class="icon icon-info"></i> ${translations['dziennikZmianPliku'][locale]}'; 
886                        } else { 
887                            target.innerHTML = '<i class="icon icon-info"></i> ${translations['dziennikZmianDokumentu'][locale]}'; 
888
889
890                    event.preventDefault(); 
891
892
893        }); 
894    </script> 
895</#if>