Aktualności urzędu - Powiatowy Urząd Pracy w Dębicy
Aktualności
Wystąpił błąd podczas przetwarzania szablonu.
Java method "com.liferay.portal.kernel.util.DateUtil_IW.getDate(Date, String, Locale)" threw an exception when invoked on com.liferay.portal.kernel.util.DateUtil_IW object "com.liferay.portal.kernel.util.DateUtil_IW@31b7c2ae"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: ${dateUtil.getDate(entry.getPublishDa... [in template "10202#10240#31273065" in macro "getArticle" at line 66, column 21] - Reached through: @getArticle entry=entry [in template "10202#10240#31273065" at line 16, column 13] ----
1<#if !entries?has_content>
2 <#if !themeDisplay.isSignedIn()>
3 ${renderRequest.setAttribute("PORTLET_CONFIGURATOR_VISIBILITY", true)}
4 </#if>
5 <div class="alert alert-info">
6 <@liferay_ui["message"] key="there-are-no-results" />
7 </div>
8<#else>
9 <#assign
10 titleMaxLength = 60
11 dateFormat = "dd.MM.yyyy"
12 journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
13 />
14 <div class="nnk-article-list d-flex flex-wrap flex-column gy-5 flex-sm-row">
15 <#list entries as entry>
16 <@getArticle entry=entry />
17 </#list>
18 </div>
19</#if>
20
21<#macro getArticle entry>
22 <#assign
23 entry = entry
24 assetRenderer = entry.getAssetRenderer()
25 entryTitle = htmlUtil.escape(stringUtil.shorten(assetRenderer.getTitle(locale), titleMaxLength))
26 summary = assetRenderer.getSummary(renderRequest, renderResponse.getResponse())
27 viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse.getResponse(), assetRenderer, entry, !stringUtil.equals(assetLinkBehavior, "showFullContent"))
28 imageUrl = assetRenderer.getURLImagePreview(renderRequest)!""
29 />
30 <#if !summary?has_content>
31 <#attempt>
32 <#assign
33 journalArticle = assetRenderer.getArticle()
34 journalArticleDisplay = journalArticleLocalService.getArticleDisplay(journalArticle.getGroupId(), journalArticle.getArticleId(), "", l, themeDisplay)
35 articleContent = journalArticleDisplay.getContent()
36 summary = htmlUtil.stripHtml(articleContent)
37 />
38 <#recover>
39 <#assign
40 journalArticle = assetRenderer.getArticle()
41 />
42 </#attempt>
43 </#if>
44
45 <#if imageUrl?has_content>
46 <#assign contentMaxLength = 200 />
47 <#else>
48 <#assign contentMaxLength = 350 />
49 </#if>
50
51 <div class="row">
52 <#if imageUrl?has_content>
53 <div class="nnk_article-list-image col-12 col-lg-4 p-0 m-0 text-center align-self-center">
54 <img src="${imageUrl}"
55 alt="<@liferay.language key='nnk.article.image-alt' /> ${entryTitle}"
56 class="nnk-article-list-article-img img-fluid rounded">
57 </div>
58 <div class="nnk-article-list-article-content col-12 col-lg-8 px-0 px-lg-3 align-self-start">
59 <#else>
60 <div class="nnk-article-list-article-content col-12 p-0">
61 </#if>
62
63 <@getEditIcon />
64
65 <span class="nnk-article-list-article-publish-date text-3">
66 ${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale)}
67 </span>
68
69 <div>
70 <a href="${viewURL}">
71 <h3 class="nnk-article-list-title my-2 text-5">${entryTitle}</h3>
72 </a>
73
74 <div class="nnk-article-list-article-metadata pb-3">
75 <@getMetadataField fieldName = "create-date" />
76 <@getMetadataField fieldName = "author" />
77 <@getMetadataField fieldName = "publish-date" />
78 <@getMetadataField fieldName = "modified-date" />
79 <@getMetadataField fieldName = "expiration-date" />
80 <@getMetadataField fieldName = "view-count" />
81 </div>
82
83 <div class="nnk-article-list-article-summary">
84 <p>
85 ${stringUtil.shorten((summary?replace("\\s\\&imagePreview=1", "", "r")), contentMaxLength)}
86 </p>
87 </div>
88 </div>
89 </div>
90 <@getMetadataField fieldName = "tags" />
91 </div>
92</#macro>
93
94<#macro getEditIcon>
95 <#attempt>
96 <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())>
97 <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse.getResponse(), windowStateFactory.getWindowState("NORMAL"), themeDisplay.getURLCurrent())!"" />
98
99 <#if validator.isNotNull(editPortletURL)>
100 <#assign title = languageUtil.format(locale, "edit-x", htmlUtil.escape(assetRenderer.getTitle(locale)), false) />
101 <@liferay_ui["icon"]
102 cssClass="icon-monospaced visible-interaction float-right"
103 icon="pencil"
104 markupView="lexicon"
105 message=title
106 url=editPortletURL.toString()
107 />
108 </#if>
109 </#if>
110 <#recover>
111 </#attempt>
112</#macro>
113
114<#macro getMetadataField fieldName>
115 <#if stringUtil.split(metadataFields)?seq_contains(fieldName)>
116 <span class="nnk-article-list-article-metadata-entry metadata-${fieldName} text-3">
117 <#assign dateFormat = "dd.MM.yyyy" />
118
119 <#if stringUtil.equals(fieldName, "author")>
120 <@liferay.language key="nnk.asset.publisher.info.author"/>
121 <strong>
122 <#attempt>
123 <#assign authorName = extendedJournalArticleLocalService.getArticleFieldValue(entry.getClassPK(), "author", themeDisplay.getLanguageId()) />
124 <#recover>
125 <#assign authorName = "" />
126 </#attempt> <#if authorName?has_content>
127 ${authorName}
128 <#else>
129 ${htmlUtil.escape(portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName()))}
130 </#if>
131 </strong>
132 <br/>
133
134 <#elseif stringUtil.equals(fieldName, "modified-date")>
135 <@liferay.language key="nnk.asset.publisher.info.modified"/>
136 <strong>${entry.getModifiedDate()?string(dateFormat)}</strong>
137 <br/>
138
139 <#elseif stringUtil.equals(fieldName, "publish-date")>
140 <@liferay.language key="nnk.asset.publisher.info.published"/>
141 <strong>${entry.getPublishDate()?string(dateFormat)}</strong>
142 <br/>
143
144 <#elseif stringUtil.equals(fieldName, "create-date")>
145 <@liferay.language key="nnk.asset.publisher.info.created"/>
146 <strong>${entry.getCreateDate()?string(dateFormat)}</strong>
147 <br/>
148
149 <#elseif stringUtil.equals(fieldName, "expiration-date")>
150 <@liferay.language key="nnk.asset.publisher.info.expired"/>
151 <#if entry.getExpirationDate()?has_content>
152 <strong>${entry.getExpirationDate()?string(dateFormat)}</strong>
153 </#if>
154 <br/>
155
156 <#elseif stringUtil.equals(fieldName, "view-count")>
157 <@liferay.language key="nnk.asset.publisher.info.views"/>
158 <strong>${entry.getViewCount()}</strong>
159 <br/>
160
161 <#elseif stringUtil.equals(fieldName, "tags")>
162 <@liferay_asset["asset-tags-summary"]
163 className=entry.getClassName()
164 classPK=entry.getClassPK()
165 portletURL=renderResponse.createRenderURL()
166 />
167 </#if>
168 </span>
169 </#if>
170</#macro>
—
10 pozycji na stronie