1<#-- Job-Offer-Overview, V1.0 -->
2<#-- Asset-Publisher Template -->
3<#-- Autor: THU, 12.02.2020 -->
4
5<#assign dlAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService") />
6
7<#if entries?has_content>
8
9<style type="text/css">
10 .table-responsive table { width:100%; }
11 .table-responsive table th { padding:5px 0px !important; text-align: left; border-bottom:2px solid #888 !important; }
12 .table-responsive table td { padding:10px 20px 10px 0px !important; text-align: left; border-bottom:1px solid #ccc !important; }
13 .table-responsive table td span { background-color: inherit; }
14 .table-responsive table tbody tr:last-child td { border-bottom: none; }
15 .table-responsive table td span { background: inherit; font-weight: normal; }
16 .table-responsive table td a { text-decoration: none; display: block; }
17 .table-responsive table td a:hover { text-decoration: underline; }
18</style>
19
20<div class="table-responsive">
21<table class="table table-hover">
22 <thead>
23 <tr>
24 <th>Oferta pracy</th>
25 <th>Lokalizacja</th>
26 </tr>
27 </thead>
28 <tbody>
29
30 <#list entries as curEntry>
31 <#assign renderer = curEntry.getAssetRenderer()>
32 <#assign className = renderer.getClassName()>
33
34 <#if className == "com.liferay.journal.model.JournalArticle">
35
36 <#assign journalArticle = renderer.getArticle()>
37 <#assign document = saxReaderUtil.read(journalArticle.getContent())>
38 <#assign rootElement = document.getRootElement()>
39
40 <#-- Fields -->
41 <#assign Title = curEntry.getTitle(locale)>
42
43 <#assign Site = saxReaderUtil
44 .createXPath("dynamic-element[@name='Mejsce']")
45 .selectSingleNode(rootElement)
46 .getStringValue()?trim>
47
48 <#assign JobOffer = saxReaderUtil
49 .createXPath("dynamic-element[@name='JobOffer']")
50 .selectSingleNode(rootElement)
51 .getStringValue()?trim>
52
53 <#assign dlDocument = dlAppService.getFileEntryByUuidAndGroupId(JobOffer?eval_json.uuid,JobOffer?eval_json.groupId?number) />
54 <#assign fileEntryURL = themeDisplay.getPortalURL() + themeDisplay.getPathContext() + "/documents/" + dlDocument.groupId + "/" + dlDocument.folderId + "/" + dlDocument.fileName?url("UTF-8") + "/" + dlDocument.uuid />
55
56 <#assign viewURL = assetPublisherHelper.getAssetViewURL(
57 renderRequest, renderResponse, curEntry, true
58 )>
59
60 <#if JobOffer?length == 0>
61 <#assign TitleDisplay = "<b>${Title}</b>">
62 <#else>
63 <#assign TitleDisplay = "<a href='${fileEntryURL}' target='_blank'><b>${Title}</b></a>">
64 </#if>
65
66 <tr>
67 <td><nobr>${TitleDisplay}</nobr></td>
68 <td>${Site}</td>
69 </tr>
70
71 </#if>
72
73 </#list>
74
75 </tbody>
76</table>
77</div>
78
79</#if>
80
81<p> </p>