Přejít k obsahu

Okresní soud v Ostravě

Agregátor obsahu Agregátor obsahu

Při zpracování šablony došlo k chybě.
Error on line 83, column 5 in 10154#10194#366687
journalContentUtil.getDisplay(groupId, articleId, portletMode, locale, themeDisplay) is undefined.
It cannot be assigned to display
1<#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> 
2<#assign currentUrl = request.getAttribute('CURRENT_URL') /> 
3 
4    <#assign showPublishDates = false /> 
5    <#attempt> 
6        <#assign expandoBridge = themeDisplay.getLayout().getExpandoBridge() /> 
7        <#if !validator.isNull( expandoBridge.getAttribute('showPublishDates') )> 
8            <#assign showPublishDates = expandoBridge.getAttribute('showPublishDates') /> 
9        </#if> 
10    <#recover> 
11    </#attempt> 
12 
13    <#assign requestedArticleUrlTitle = portalUtil.getOriginalServletRequest(request).getParameter('clanek')! /> 
14 
15    <#-- Je pozadovan konkretni clanek? --> 
16    <#if !validator.isNull( requestedArticleUrlTitle )> 
17        <#attempt> 
18            <#-- Pokud ano, zkus ho najit --> 
19            <#assign requestedAsset = entry.getAssetRendererFactory().getAssetRenderer(entry.getGroupId(), requestedArticleUrlTitle) /> 
20            <#-- ... a zobrazit --> 
21            <@showArticleBig asset=requestedAsset abstract=false /> 
22        <#recover> 
23            <#-- Pokud byl pozadovan a nebyl nalezen, zobraz chybovou hlasku --> 
24            <@handleEmptyContent reason='articleNotFound' /> 
25        </#attempt> 
26    <#elseif entries?size == 1> 
27        <#-- Pokud nebyl pozadovan konkretni clanek a v journalu jen jeden, zobraz ho --> 
28        <#assign requestedAsset = entry.getAssetRenderer() /> 
29        <@showArticleBig asset=requestedAsset abstract=false /> 
30    <#elseif entries?has_content> 
31        <#-- Jinak zobraz prehled anotaci (v tomto bloku je jiste, ze jsou alespon dve - viz podminka entries?size == 1) --> 
32        <#assign currentAsset = entry.getAssetRenderer() /> 
33        <@showArticleBig asset=currentAsset abstract=true /> 
34        <#assign annotationCount = 0 /> 
35        <#list entries as entry> 
36            <#if entry != entries?first> 
37                <#assign annotationCount = annotationCount + 1 /> 
38                <#if annotationCount % 2 == 1> 
39                    <div class="row"> 
40                </#if> 
41                    <#assign currentAsset = entry.getAssetRenderer() /> 
42                    <@showArticleSmall asset=currentAsset /> 
43                <#if annotationCount % 2 == 0 || entry == entries?last> 
44                    </div> 
45                </#if> 
46            </#if> 
47        </#list> 
48<#-- 
49        <a href="#" class="button large older-news" title="Zobrazit starší aktuality">Další aktuality</a> 
50--> 
51    <#else> 
52        <#-- Byly vycerpany vsechny moznosti, stranka je prazdna (a nebyl pozadovan zadny konkretni clanek) --> 
53        <@handleEmptyContent reason='emptyPage' /> 
54    </#if> 
55 
56 
57<#-- MACROS AND FUNCTIONS --> 
58 
59<#function getFormattedTitle title> 
60    <#local firstWordBreak = title?index_of(' ') /> 
61    <#if (firstWordBreak >= 2)> 
62        <#local firstWord = title?substring(0, firstWordBreak) /> 
63        <#local otherWords = title?substring(firstWordBreak + 1) /> 
64        <#local title = '${firstWord} <span class="lighter">${otherWords}</span>' /> 
65    </#if> 
66    <#return title> 
67</#function> 
68 
69 
70<#macro showArticleBig asset abstract=false> 
71    <#assign article = asset.getArticle() /> 
72    <#assign articleUrl = httpUtil.addParameter( currentUrl, 'clanek', article.getUrlTitle() ) /> 
73    ${freeMarkerPortletPreferences.setValue( 'leadingArticleTitle', getFormattedTitle( article.getTitle(locale) ) )} 
74    ${freeMarkerPortletPreferences.setValue( 'leadingArticleIsAbstract', abstract?string('yes', 'no') )} 
75    ${freeMarkerPortletPreferences.setValue( 'leadingArticleUrl', articleUrl )} 
76    <#if showPublishDates> 
77        <@publishDate article=article show=false /> 
78    </#if> 
79 
80    <#assign groupId = article.getArticleResource().getGroupId() /> 
81    <#assign articleId = article.getArticleResource().getArticleId() /> 
82    <#assign portletMode = renderRequest.getPortletMode() /> 
83    <#assign display = journalContentUtil.getDisplay(groupId, articleId, portletMode, locale, themeDisplay) /> 
84 
85    <article class="article"> 
86        <@getEditIcon assetRenderer=asset /> 
87        ${display.getContent()} 
88    </article> 
89 
90    ${freeMarkerPortletPreferences.setValue( 'leadingArticleTitle', '' )} 
91    ${freeMarkerPortletPreferences.setValue( 'leadingArticleIsAbstract', '' )} 
92    ${freeMarkerPortletPreferences.setValue( 'leadingArticleUrl', '' )} 
93    ${freeMarkerPortletPreferences.setValue( 'leadingArticlePublishDate', '' )} 
94</#macro> 
95 
96 
97<#macro showArticleSmall asset> 
98    <#assign article = asset.getArticle() /> 
99    <#assign xmlContent = saxReaderUtil.read( article.getContent() ) /> 
100    <#assign xmlNode = xmlContent.selectSingleNode('//dynamic-element[@name="urlOverride"]/dynamic-content')! /> 
101    <#if !validator.isNull( xmlNode ) && !validator.isNull( xmlNode.getText() )> 
102        <#assign targetUrl = xmlNode.getText() /> 
103    <#else> 
104        <#assign targetUrl = httpUtil.addParameter( currentUrl, 'clanek', article.getUrlTitle() ) /> 
105    </#if> 
106    <div class="small-24 large-12 columns"> 
107        <article class="article"> 
108            <@getEditIcon assetRenderer=asset /> 
109            <h2 class="text-title-2 ${showPublishDates?string('', 'hr-below')}"> 
110                <a href="${targetUrl}" title="Zobrazit více"> 
111                <#if showPublishDates> 
112                    <span class="par hr-below"><span class="icon icon-calendar"></span> <@publishDate article=article /></span> 
113                </#if> 
114                    ${htmlUtil.escape( article.getTitle(locale) )} 
115                </a> 
116            </h2> 
117            <p> 
118                 
119                    ${asset.getSummary(locale)} 
120                 
121            </p> 
122        </article> 
123    </div> 
124</#macro> 
125 
126 
127<#macro publishDate article show=true> 
128    <#assign dateMask = 'dd.MM.yyyy' /> 
129    <#assign xmlContent = saxReaderUtil.read( article.getContent() ) /> 
130    <#assign xmlNode = xmlContent.selectSingleNode('//dynamic-element[@name="customPublishDate"]/dynamic-content')! /> 
131    <#if !validator.isNull( xmlNode ) && !validator.isNull( xmlNode.getText() )> 
132        <#assign articlePublishDate = xmlNode.getText()?number?number_to_date?string[dateMask] /> 
133    <#else> 
134        <#assign articlePublishDate = article.getModifiedDate()?string[dateMask] /> 
135    </#if> 
136    <#if show> 
137        ${articlePublishDate} 
138    <#else> 
139        ${freeMarkerPortletPreferences.setValue( 'leadingArticlePublishDate', articlePublishDate )} 
140    </#if> 
141</#macro> 
142 
143 
144<#function removeHidden items> 
145    <#if items?is_enumerable && items?has_content && items?first.isHidden!?is_method> 
146        <#local newList = [] /> 
147        <#list items as item> 
148            <#if !item.isHidden()> 
149                <#local newList = newList + [item] /> 
150            </#if> 
151        </#list> 
152        <#return newList /> 
153    <#else> 
154        <#return items /> 
155    </#if> 
156</#function> 
157 
158 
159<#macro handleEmptyContent reason> 
160    <#assign currentLayout = themeDisplay.getLayout() /> 
161 
162    <article class="article"> 
163    <div class="main-article"> 
164 
165        <h1 class="text-title-1 empty-page"> 
166            ${getFormattedTitle( currentLayout.getName(locale) )} 
167        </h1> 
168 
169        <#if reason == 'articleNotFound'> 
170            <div class="panel callout"> 
171                Požadovaný obsah tu bohužel nemáme. 
172            </div> 
173        <#elseif reason == 'emptyPage'> 
174            <#assign nav_items = removeHidden( currentLayout.getChildren()! ) /> 
175 
176            <#if nav_items?has_content> 
177 
178            <#assign level1Count = 0 /> 
179            <#assign isLast = false /> 
180 
181            <#list nav_items as nav_item_level1> 
182 
183            <#assign level1Count = level1Count + 1 /> 
184            <#if nav_item_level1 == nav_items?last> 
185                <#assign isLast = true /> 
186            </#if> 
187 
188            <#if level1Count % 4 == 1> 
189            <div class="row"> 
190            </#if> 
191 
192                <div class="small-24 large-12 xxlarge-6 columns ${isLast?string('end', '')}"> 
193                    <table class="subpages"> 
194                        <thead> 
195                            <tr> 
196                                <th> 
197                                    <a href="<@getRelativeURL nav_item_level1.getRegularURL(request) />" ${nav_item_level1.getTarget()}>${nav_item_level1.getName(locale)}</a> 
198                                </th> 
199                            </tr> 
200                        </thead> 
201 
202                        <#assign nav_items2 = removeHidden( nav_item_level1.getChildren()! ) /> 
203                        <#if nav_items2?has_content> 
204 
205                        <tbody> 
206                            <#list nav_items2 as nav_item_level2> 
207                            <tr> 
208                                <td> 
209                                    <a href="<@getRelativeURL nav_item_level2.getRegularURL(request) />" ${nav_item_level2.getTarget()}>${nav_item_level2.getName(locale)}</a> 
210                                </td> 
211                            </tr> 
212                            </#list> 
213                        </tbody> 
214 
215                        </#if> 
216 
217                    </table> 
218                </div> 
219 
220            <#if level1Count % 40 == 0 || isLast> 
221            </div> 
222            </#if> 
223 
224            </#list> 
225 
226            </#if> 
227        </#if> 
228 
229    </div> 
230    </article> 
231</#macro> 
232 
233<#macro getRelativeURL url>${url?replace( r'^' + htmlUtil.escapeHREF( portalUtil.getPortalURL(request) ), '', 'rif' )?replace( r'^' + portalUtil.getPortalURL(request), '', 'rif' )}</#macro> 
234 
235<#macro getEditIcon assetRenderer> 
236    <#assign entryTitle = htmlUtil.escape( assetRenderer.getTitle(locale) ) /> 
237 
238	<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
239		<#assign redirectURL = renderResponse.createRenderURL() /> 
240 
241		${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
242		${redirectURL.setWindowState("pop_up")} 
243 
244		<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
245 
246		<#if validator.isNotNull(editPortletURL)> 
247			<#assign title = languageUtil.format(locale, "edit-x", entryTitle) /> 
248 
249            <div class="right"> 
250                <@liferay_ui["icon"] 
251				    image="edit" 
252				    message=title 
253				    url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" /> 
254            </div> 
255		</#if> 
256	</#if> 
257</#macro>