An error occurred while processing the template.
Error while invoking the "journal-article" JSP custom tag; see cause exception ---- FTL stack trace ("~" means nesting-related): - Failed at: @liferay_journal["journal-article"] a... [in template "20101#20128#58904" at line 396, column 13] ----
1<style>
2.region-stories-portlet .portlet-boundary {
3 border-top:none !important;
4 border-bottom:none !important;
5}
6.sim-opportunity-content-container .region-banner-wrapper {
7 width: 100%;
8 position: relative;
9}
10.sim-opportunity-content-container .region-text-right-bottom {
11 position: absolute;
12 bottom: 0;
13 right: 0;
14 padding: 25px;
15 text-align: right;
16}
17.sim-opportunity-content-container h1 {
18 font-size: 38.5px;
19}
20.sim-opportunity-content-container h2 {
21 font-size: 31.5px;
22}
23.sim-opportunity-content-container h1,
24.sim-opportunity-content-container h2,
25.sim-opportunity-content-container h3,
26.sim-opportunity-content-container h4 {
27 color: #000000!important;
28}
29.sim-opportunity-content-container h4 {
30 font-size: 20px!important;
31}
32.sim-opportunity-content-container .region-banner-wrapper h1,
33.sim-opportunity-content-container .region-banner-wrapper h2,
34.sim-opportunity-content-container .region-banner-wrapper h3 {
35 color: #ffffff!important;
36}
37.sim-opportunity-content-container .region-header {
38 padding-top: 1em;
39}
40.sim-opportunity-content-container .region-title {
41 padding-bottom: 1em;
42 margin-bottom: 1em;
43 border-bottom: solid 2px #BD2716;
44}
45.sim-opportunity-content-container .region-text-banner {
46 font-weight: bold!important;
47}
48.sim-opportunity-content-container .region-banner-img {
49 width: 100%;
50 height: 100%;
51 max-height: 400px;
52}
53.sim-opportunity-content-container .region-text-right-bottom a, .sim-opportunity-content-container .region-text-right-bottom a:hover {
54 color: #ffffff!important;
55 text-decoration: none;
56}
57.sim-opportunity-content-container .text-heavy {
58 font-weight: 800!important;
59}
60.sim-opportunity-content-container .text-medium {
61 font-weight: 500!important;
62}
63.sim-opportunity-content-container .text-light {
64 font-weight: 300!important;
65}
66.sim-opportunity-content-container .region-text-banner {
67 line-height: normal!important;
68}
69.sim-opportunity-content-container .red-line {
70 color: rgb(200, 16, 46);
71}
72.sim-opportunity-content-container .story-article {
73 padding: 10px 0 10px 0;
74 min-height: 230px;
75}
76.sim-opportunity-content-container .story-content {
77 min-height: 230px;
78}
79.sim-opportunity-content-container .story-header {
80 /*height: 105px;*/
81}
82.sim-opportunity-content-container .story-summary {
83 color: #000000 !important;
84 font-size: 20px;
85 overflow: hidden;
86 line-height: normal!important;
87 /*height: 105px;*/
88}
89.sim-opportunity-content-container .story-footer {
90 font-size: 20px;
91 /*height: 52px;*/
92}
93.sim-opportunity-content-container .a {
94 text-decoration: none;
95}
96.sim-opportunity-content-container .new-row {
97 padding-top: 1em;
98}
99.sim-opportunity-content-container .sim-region-body {
100 padding-top: 2em;
101 margin-top: 2em;
102}
103.sim-opportunity-content-container .story-expand-button {
104 color: #c8102e;
105 font-size: 20px;
106 font-weight: bold;
107}
108.sim-opportunity-content-container .img-wrapper {
109 margin-top: 1em;
110}
111.sim-opportunity-content-container .story-image {
112 max-width: inherit;
113}
114.sim-opportunity-content-container .story-image-link {
115 max-width: -webkit-fill-available;
116 max-width: -moz-available;
117}
118@media (max-width: 332px) {
119 .sim-opportunity-content-container .region-title {
120 border-bottom: none;
121 }
122 .sim-opportunity-content-container .region-header {
123 padding-bottom: 1.7em;
124 margin: 0 0.3em 0 0.3em!important;
125 border-bottom: solid 2px #BD2716;
126 }
127}
128@media (max-width: 767px) {
129 .sim-opportunity-content-container .container-fluid {
130 padding-right: 0 !important;
131 padding-left: 0 !important;
132 }
133 .sim-opportunity-content-container .new-row {
134 padding-top: 1em;
135 }
136 .sim-opportunity-content-container .region-header {
137 text-align: center;
138 }
139 .sim-opportunity-content-container .region-banner-wrapper {
140 display: none;
141 }
142 .sim-opportunity-content-container .stories-content-container p {
143 margin-bottom: 1em;
144 }
145 .sim-opportunity-content-container .story-article {
146 height: auto;
147 min-height: 0;
148 }
149 .sim-opportunity-content-container .story-content {
150 height: auto;
151 min-height: 0;
152 }
153 .sim-opportunity-content-container .story-footer,
154 .sim-opportunity-content-container .story-summary,
155 .sim-opportunity-content-container .story-expand-button {
156 font-size: 16px !important;
157 }
158 .sim-opportunity-content-container .col-xs-12,
159 .sim-opportunity-content-container .col-xs-8,
160 .sim-opportunity-content-container .col-xs-4 {
161 padding-right: 0.7em !important;
162 padding-left: 0.7em !important;
163 }
164}
165@media (min-width: 768px) and (max-width: 991px) {
166 .sim-opportunity-content-container .container-fluid {
167 padding-right: 3.25em !important;
168 padding-left: 3.25em !important;
169 }
170 .sim-opportunity-content-container .region-banner-wrapper h1 {
171 font-size: 28px !important;
172 }
173 .sim-opportunity-content-container .region-banner-wrapper h2 {
174 font-size: 20px !important;
175 }
176 .sim-opportunity-content-container .region-text-right-bottom {
177 padding: 10px;
178 }
179 .sim-opportunity-content-container .story-footer,
180 .sim-opportunity-content-container .story-summary,
181 .sim-opportunity-content-container .story-expand-button {
182 font-size: 16px !important;
183 }
184 .sim-opportunity-content-container .col-xs-12,
185 .sim-opportunity-content-container .col-xs-8,
186 .sim-opportunity-content-container .col-xs-4 {
187 padding-right: 0.5em !important;
188 padding-left: 0.5em !important;
189 }
190 .sim-opportunity-content-container .story-article {
191 min-height: 300px;
192 }
193}
194@media (min-width: 992px) and (max-width: 1199px) {
195 .sim-opportunity-content-container .story-article {
196 min-height: 300px;
197 }
198}
199@media (min-width: 1200px) and (max-width: 1299px) {
200 .sim-opportunity-content-container .story-article {
201 min-height: 280px;
202 }
203}
204@media (min-width: 1300px) {
205 .sim-opportunity-content-container .container-fluid {
206 padding-right: 7.25em !important;
207 padding-left: 7.25em !important;
208 }
209 .sim-opportunity-content-container .region-banner-img {
210 max-height: 600px;
211 }
212 .sim-opportunity-content-container .story-image {
213 max-width: 150px;
214 max-height: 150px;
215 height:100%;
216 }
217}
218</style>
219<#assign url = request.getAttribute('CURRENT_URL')>
220<#assign currentPageIndex = url?last_index_of("/")>
221<#assign portletPreferencesStr = freeMarkerPortletPreferences.getPreferences(portletPreferences) />
222<#assign portletPreferenceXml = saxReaderUtil.read(portletPreferencesStr) />
223<#assign regionString = url?substring(currentPageIndex + 1)>
224<#assign regionBannerUrl = "region_banner_" + regionString?replace("-", "_") />
225<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
226<#assign bannerArticle = journalArticleLocalService.fetchArticleByUrlTitle(groupId, regionBannerUrl)!"" />
227<#assign portletTitle = "stories." + regionString />
228<#assign index = 0 />
229<div class="sim-opportunity-content-container">
230 <div class="container-fluid new-row">
231 <h1 class="region-header">
232 <span class="region-text-banner region-title text-medium">${languageUtil.get(locale, portletTitle)}</span>
233 </h1>
234 </div>
235 <div class="sim-region-body">
236 <#if entries?has_content>
237 <#list entries as curEntry>
238 <div class="col-md-6 col-xs-12 portlet-country-wraper">
239 <div id="embedded-welcome-portlet">
240 <#assign articleClassNameId = portalUtil.getClassNameId("com.liferay.journal.model.JournalArticle")
241 />
242 <#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")
243 />
244 <#assign structureId = ddmStructureLocalService.getStructure(groupId, articleClassNameId, "STORY-1.0.0").getStructureId()
245 />
246 <#assign article = curEntry.getAssetRenderer().getArticle() /> <!-- here article mean country-->
247 <#assign docXml = saxReaderUtil.read(article.getContentByLocale(locale)) />
248 <#assign countryName = docXml.valueOf("//dynamic-element[@name='name']/dynamic-content/text()") /> <!-- Sudan and South Sudan-->
249 <#assign countryTitle = article.getTitle(locale, true) />
250 <#assign displayDateFieldName = "ddm__keyword__"+ structureId?string + "__displayDate" />
251 <#assign preferencesHash = {
252 "displayStyle": "ddmTemplate_80458",
253 "selectionStyle": "dynamic",
254 "assetLinkBehavior": "showFullContent",
255 "enableRelatedAssets": "false",
256 "abstractLength": "200",
257 "enableRss": "false",
258 "orderByColumn1": displayDateFieldName?string,
259 "orderByType1": "DESC",
260 "orderByColumn2": "title",
261 "orderByType2": "ASC",
262 "rssDisplayStyle": "abstract",
263 "classTypeIdsDLFileEntryAssetRendererFactory": "0",
264 "ddmStructureFieldName": "countries",
265 "ddmStructureFieldValue": countryTitle?string,
266 "showAvailableLocales": "false",
267 "enablePermissions": "true",
268 "subtypeFieldsFilterEnabledDLFileEntryAssetRendererFactory": "true",
269 "showOnlyLayoutAssets": "false",
270 "emailAssetEntryAddedEnabled": "true",
271 "rssDelta": "20",
272 "delta": "10",
273 "showContextLink": "true",
274 "showAssetTitle": "true",
275 "subtypeFieldsFilterEnabled": "true",
276 "showAvailableLocales": "false",
277 "rssFeedType": "atom_1.0",
278 "subtypeFieldsFilterEnabledJournalArticleAssetRendererFactory": "true",
279 "enableFlags": "false",
280 "mergeUrlTags": "true",
281 "anyClassTypeDLFileEntryAssetRendererFactory": "true",
282 "classTypeIdsJournalArticleAssetRendererFactory": structureId?string,
283 "anyClassTypeJournalArticleAssetRendererFactory": structureId?string,
284 "classTypeIds": structureId?string,
285 "anyAssetType": articleClassNameId?string,
286 "classNameIds": articleClassNameId?string,
287 "displayStyleGroupId": groupId?string
288 }
289 />
290
291 <#assign storiesCountryPreferences = freeMarkerPortletPreferences.getPreferences(preferencesHash)
292 />
293 <#assign dynamicPlid = "sim_stories_" + countryTitle?string />
294 <div class="region-stories-portlet">
295 <h2 class="text-center"><span class="region-text-banner text-medium country-title">${countryName}</span></h2>
296 <@liferay_portlet["runtime"]
297 defaultPreferences="${storiesCountryPreferences}"
298 instanceId=dynamicPlid
299 persistSettings=false
300 portletProviderAction=portletProviderAction.VIEW
301 portletName="com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet"
302 />
303 </div>
304
305 </div>
306 </div>
307 </#list>
308 <#else>
309 <#function parseURL>
310 <#local friendURL = themeDisplay.getURLCurrent() />
311
312 <#if friendURL?contains("/stories/")>
313 <#local countryIndex = friendURL?index_of("/stories/") />
314 <#else>
315 <#return '' />
316 </#if>
317
318 <#local paramIndex = friendURL?index_of("?") />
319
320 <#if paramIndex == -1>
321 <#return friendURL?substring(countryIndex + 9) />
322 <#else>
323 <#return friendURL?substring(countryIndex + 9, paramIndex) />
324 </#if>
325 </#function>
326 <div class="col-md-6 col-xs-12 portlet-country-wraper">
327 <div id="embedded-welcome-portlet">
328 <#assign articleClassNameId = portalUtil.getClassNameId("com.liferay.journal.model.JournalArticle")
329 />
330 <#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")
331 />
332 <#assign structureId = ddmStructureLocalService.getStructure(groupId, articleClassNameId, "STORY-1.0.0").getStructureId()
333 />
334
335 <#assign countryTitle = parseURL()?replace("-", "_") />
336
337 <#assign displayDateFieldName = "ddm__keyword__"+ structureId?string + "__displayDate" />
338 <#assign preferencesHash = {
339 "displayStyle": "ddmTemplate_80458",
340 "selectionStyle": "dynamic",
341 "assetLinkBehavior": "showFullContent",
342 "enableRelatedAssets": "false",
343 "abstractLength": "200",
344 "enableRss": "false",
345 "orderByColumn1": displayDateFieldName?string,
346 "orderByType1": "DESC",
347 "orderByColumn2": "title",
348 "orderByType2": "ASC",
349 "rssDisplayStyle": "abstract",
350 "classTypeIdsDLFileEntryAssetRendererFactory": "0",
351 "ddmStructureFieldName": "countries",
352 "ddmStructureFieldValue": countryTitle?string,
353 "showAvailableLocales": "false",
354 "enablePermissions": "true",
355 "subtypeFieldsFilterEnabledDLFileEntryAssetRendererFactory": "true",
356 "showOnlyLayoutAssets": "false",
357 "emailAssetEntryAddedEnabled": "true",
358 "rssDelta": "20",
359 "delta": "10",
360 "showContextLink": "true",
361 "showAssetTitle": "true",
362 "subtypeFieldsFilterEnabled": "true",
363 "showAvailableLocales": "false",
364 "rssFeedType": "atom_1.0",
365 "subtypeFieldsFilterEnabledJournalArticleAssetRendererFactory": "true",
366 "enableFlags": "false",
367 "mergeUrlTags": "true",
368 "anyClassTypeDLFileEntryAssetRendererFactory": "true",
369 "classTypeIdsJournalArticleAssetRendererFactory": structureId?string,
370 "anyClassTypeJournalArticleAssetRendererFactory": structureId?string,
371 "classTypeIds": structureId?string,
372 "anyAssetType": articleClassNameId?string,
373 "classNameIds": articleClassNameId?string,
374 "displayStyleGroupId": groupId?string
375 }
376 />
377
378 <#assign storiesCountryPreferences = freeMarkerPortletPreferences.getPreferences(preferencesHash)
379 />
380 <#assign dynamicPlid = "sim_stories_" + countryTitle?string />
381 <div class="region-stories-portlet">
382 <@liferay_portlet["runtime"]
383 defaultPreferences="${storiesCountryPreferences}"
384 instanceId=dynamicPlid
385 persistSettings=false
386 portletProviderAction=portletProviderAction.VIEW
387 portletName="com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet"
388 />
389 </div>
390
391 </div>
392 </div>
393 </#if>
394 <div class="country-banner col-md-12">
395 <#if bannerArticle != "">
396 <@liferay_journal["journal-article"]
397 articleId=bannerArticle.getArticleId()
398 ddmTemplateKey="81505"
399 groupId=groupId
400 />
401 <#else>
402 <div class="container-fluid alert alert-warning">
403 <strong>Warning!</strong> Please add an article banner with URL <strong>${"region_banner_" + regionString?string}</strong>
404 </div>
405 </#if>
406 </div>
407</div>
408<script>
409
410 var markupRowClassPrefix = "portlet-country-wrapper-item-";
411
412 //remove row empty
413 $('.sim-region-body .portlet-country-wraper').has(".empty-stories-results").remove();
414
415 // Select rest of elements has content
416 var rows =$(".sim-region-body .portlet-country-wraper");
417
418 // Mark up portlets
419 rows.each(function(index){
420 rows[index].classList.add(markupRowClassPrefix + Math.floor(index/2));
421 });
422
423 var rowNumbers = Math.round(rows.length / 2);
424
425 for (var i = 0; i <= Math.round(rows.length / 2); i++) {
426
427 var markupClass = markupRowClassPrefix + i;
428
429 $("." + markupClass).wrapAll('<div class="container-fluid new-row accepted-row row-index-'+i+'"><div class="row"></div></div>')
430
431 //insert banner
432 if(i == 0){
433 $('.country-banner.col-md-12').insertAfter($('.container-fluid.new-row.accepted-row'));
434 }
435 }
436
437 //adjust width and height for image in stories
438 $(document).ready(function() {
439
440 var imageClass = '.sim-opportunity-content-container .story-image'
441 var cw = $(imageClass).width();
442
443 if(cw != 0 || cw > 150) {
444 $(imageClass).css({'height':cw+'px'});
445 }
446
447 });
448</script>
449</div>