Pular para o conteúdo
Voltar

FAPEMAT - ON

Um erro ocorreu enquanto processava o modelo.
Error on line 27, column 1 in 20154#20194#22766
journalArticleLocalService.getArticle( groupId, radio_id ) is undefined.
It cannot be assigned to journalArticleRadio
1<#assign hat = (.vars['hat'].getData()?trim)!"" > 
2<#assign front_title = (.vars['front_title'].getData()?trim)!"" > 
3<#assign sub_title = (.vars['sub_title'].getData()?trim)!"" > 
4<#assign image = (.vars['image'].getData()?trim)!"" > 
5<#assign source = (.vars['source'].getData()?trim)!"" > 
6<#assign author = (.vars['author'].getData()?trim)!"" > 
7<#assign full_text = (.vars['full_text'].getData()?trim)!"" > 
8<#assign radio_id = (.vars['radio_id'].getData()?trim)!"" > 
9<#assign video_url = (.vars['video_url'].getData()?trim)!"" > 
10<#assign IDgallery = (.vars['gallery_id'].getData()?trim)!"" > 
11 
12<#setting datetime_format="EEEE, dd 'de' MMMM 'de' yyyy 'às' HH:mm"> 
13 
14<#assign theme_img_path = "/mt-portal-theme/images" > 
15 
16<#assign mostrar_radio = "" > 
17<#assign mostrar_video = "" > 
18<#assign mostrar_galeria = "" > 
19 
20<#assign total_img = 0 > 
21 
22<#assign articleId = .vars['reserved-article-id'].data > 
23 
24<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")> 
25<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") > 
26<#assign journalArticle = journalArticleLocalService.getArticle( groupId, articleId ) > 
27<#assign journalArticleRadio = journalArticleLocalService.getArticle( groupId, radio_id ) > 
28 
29<#assign createDate = journalArticle["displayDate"]?datetime > 
30 
31 
32<#if radio_id != "" > 
33	<#assign documentRadio = saxReaderUtil.read(journalArticleRadio.getContent()) > 
34 
35	<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='radio_url']") > 
36	<#assign radio_url = (xPathSelector.selectSingleNode(documentRadio.getRootElement()).getStringValue())!"" > 
37	<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image']") > 
38	<#assign radio_img = (xPathSelector.selectSingleNode(documentRadio.getRootElement()).getStringValue())!"" > 
39	 
40	<#if radio_url != "" > 
41		<#assign radioTitulo = journalArticleRadio.getTitle(locale) > 
42		<#assign radioUrlTitle = journalArticleRadio["urlTitle"] > 
43		<#assign radioUserName = journalArticleRadio["userName"] > 
44		 
45		<#assign mostrar_radio = '<div class="row-fluid"><div class="span5"><div style="background:url(${radio_img});background-size:cover;width:100%;height:220px;"></div></div><div class="span7" style="padding:20px 0;"><span><a href="/web/guest/-/${radioUrlTitle}"><h3>${radioTitulo}</h3></a></span><small>Autor: ${radioUserName}</small><audio controls style="width:90%;opacity:.4;"><source src="${radio_url}" type="audio/mpeg"> Seu navegador não possui suporte para reprodução de áudio.</audio></div></div>' > 
46	</#if> 
47</#if> 
48 
49 
50<#if video_url != "" > 
51	<#assign video_url = video_url?split("/")[3] > 
52	 
53	<#assign mostrar_video = '<object width="100%" height="360" class="hidden-phone"><param name="movie" value="https://www.youtube.com/embed/${video_url}?version=3&theme=light"></param><param name="allowScriptAccess" value="always"></param><embed src="https://www.youtube.com/embed/${video_url}?version=3&theme=light" allowscriptaccess="always" width="100%" height="360"></embed></object><object width="100%" height="240" class="visible-phone"><param name="movie" value="https://www.youtube.com/embed/${video_url}?version=3&theme=light"></param><param name="allowScriptAccess" value="always"></param><embed src="https://www.youtube.com/embed/${video_url}?version=3&theme=light" allowscriptaccess="always" width="100%" height="240"></embed></object>' > 
54</#if> 
55 
56 
57<#assign conteudo = full_text > 
58 
59<#if radio_id != "" > 
60	<#assign conteudo = conteudo?replace("[[radio]]", mostrar_radio) > 
61</#if> 
62<#if video_url != "" > 
63	<#assign conteudo = conteudo?replace("[[video]]", mostrar_video) > 
64</#if> 
65<#if IDgallery != "" > 
66	<#assign conteudo = conteudo?replace("[[galeria]]", "<div class='insert-gallery'>&nbsp;</div>") > 
67</#if> 
68 
69 
70<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> 
71<style> 
72.main-img{width:100%;padding:0px 0;margin:30px 0;} 
73cite{font-size:24px;font-weight:bold;} 
74cite:before{content: '"';font-size: 48px;font-style: italic;vertical-align: text-bottom;padding-right: 5px;} 
75cite:after{content: '"';font-size: 48px;font-style: italic;display: -webkit-inline-box;-webkit-transform: matrix(-1, 0, 0, -1, 0, 0);margin-left: 5px;} 
76person{display: block;text-align: center;font-size: 12px;} 
77p.left{float:left;width:30%;padding:20px 10px 20px 0;text-align:left;} 
78p.right{float:right;width:30%;padding:20px 0 20px 10px;text-align:right;} 
79.insert-video{margin:20px 0;} 
80.insert-radio{padding: 0;min-height: 100px;background: #F0F5F8;margin: 20px 0;} 
81.insert-radio a h3{font-family:'Nexa';color:#324688;margin: 0;line-height:30px;} 
82.insert-radio small{font-size:12px;color:#324688;display:block;margin-bottom:10px;} 
83.taglib-header:after {content: "${createDate}";font-size: 12px;float:right;margin-bottom: 30px;} 
84.sub-title{font-weight:bold;font-size:18px;} 
85</style> 
86 
87<h5>${sub_title}</h5> 
88 
89<span style="font-size:11px;">${author}</span> 
90<#if source != "" > 
91    | <span style="font-size:11px;">${source}</span> 
92</#if> 
93 
94<#if image != "" > 
95	<div class="main-img"><img src="${image}" /></div> 
96</#if> 
97<div style="margin-top:30px;">${conteudo}</div> 
98 
99<#if IDgallery != "" > 
100	<@mostrarGaleria IDgallery /> 
101</#if> 
102 
103<script type="text/javascript"> 
104	if(jQuery(".insert-gallery").length){ 
105		jQuery( "#rg-gallery" ).clone().appendTo( ".insert-gallery" ); 
106		jQuery( ".rg-gallery" )[1].remove(); 
107	} else { 
108		jQuery( ".rg-gallery" ).remove(); 
109
110</script> 
111 
112 
113<#macro mostrarGaleria gallery_id> 
114	<#assign theme_img_path = "/mt-portal-theme/images" > 
115	<style> 
116	.rg-image-nav a{ 
117		background:#000 url(${theme_img_path}/nav.png) no-repeat -20% 50%; 
118
119	.es-nav span{ 
120		background:transparent url(${theme_img_path}/nav_thumbs.png) no-repeat top left; 
121
122	.rg-loading{ 
123		background:#000 url(${theme_img_path}/ajax-loader.gif) no-repeat center center; 
124
125	.rg-view a{ 
126		background:#464646 url(${theme_img_path}/views.png) no-repeat top left; 
127
128	.mt-search{display:none;} 
129	.taglib-header .header-back-to a{font-size:1.8em;margin-top:-10px;} 
130	</style> 
131 
132	<script id="img-wrapper-tmpl" type="text/x-jquery-tmpl">	 
133		<div class="rg-image-wrapper"> 
134			{{if itemsCount > 1}} 
135				<div class="rg-image-nav"> 
136					<a href="#" class="rg-image-nav-prev">Anterior</a> 
137					<a href="#" class="rg-image-nav-next">Próxima</a> 
138				</div> 
139			{{/if}} 
140			<div class="rg-image"></div> 
141			<div class="rg-loading"></div> 
142			<div class="rg-caption-wrapper"> 
143				<div class="rg-caption" style="display:none;"> 
144					<p></p> 
145				</div> 
146			</div> 
147		</div> 
148	</script> 
149 
150	<noscript> 
151		<style> 
152			.es-carousel ul{ 
153				display:block; 
154
155		</style> 
156	</noscript> 
157 
158	<div id="rg-gallery" class="rg-gallery"> 
159		<div class="rg-thumbs"> 
160			<div class="es-carousel-wrapper"> 
161				<div class="es-nav"> 
162					<span class="es-nav-prev">Previous</span> 
163					<span class="es-nav-next">Next</span> 
164				</div> 
165				<div class="es-carousel"> 
166					<ul> 
167						<#assign journalArticleGaleria = journalArticleLocalService.getArticle( groupId, IDgallery ) > 
168						<#assign resourceprimKeyGaleria = journalArticleGaleria.getResourcePrimKey() > 
169						<#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.portlet.journal.model.JournalArticle", resourceprimKeyGaleria) > 
170 
171						<#assign documentGaleria = saxReaderUtil.read(journalArticleGaleria.getContent()) > 
172 
173						<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image']") > 
174						<#assign gal_imgs = (xPathSelector.selectNodes(documentGaleria.getRootElement()))!"" > 
175						 
176						<#assign countImg = gal_imgs?size > 
177						<#assign countImg = countImg - 1 > 
178						 
179						<#list 0..countImg as x> 
180							<#assign imagemGaleria = gal_imgs[x].getStringValue()?trim > 
181							 
182							<#assign uuid = imagemGaleria?split("/")[5]> 
183							<#assign uuid = uuid?split("?")[0]> 
184 
185							<#assign dlFileEntryUtil = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") > 
186							<#assign fileEntry = dlFileEntryUtil.getDLFileEntryByUuidAndGroupId(uuid, groupId) > 
187 
188							<#assign version = fileEntry.getFileVersion().fileVersionId > 
189							<#assign fileEntryTypeId = fileEntry.getFileEntryTypeId() > 
190							<#assign fieldsMap = fileEntry.getFieldsMap(version) > 
191 
192							<#assign imgTxt = "&nbsp;" > 
193							<#assign imgCred = "&nbsp;" > 
194 
195							<#list fieldsMap?keys as fld> 
196								<#assign imgTxt = (fieldsMap[fld]["image_text"].getValue())!"" > 
197								<#assign imgCred = (fieldsMap[fld]["image_credits"].getValue())!"" > 
198								 
199								<#if imgTxt != "" > 
200									<#if imgCred != "" > 
201										<#assign imgCred = " - Foto por: " + imgCred > 
202									</#if> 
203								</#if> 
204							</#list> 
205							 
206							<li> 
207								<a href="#"> 
208									<img src="${imagemGaleria}&imageThumbnail=1" data-large="${imagemGaleria}&imageThumbnail=3" data-save="${imagemGaleria}" alt="${imgTxt}" data-description="${imgTxt} ${imgCred}" /> 
209								</a> 
210							</li> 
211							 
212						</#list> 
213					</ul> 
214				</div> 
215			</div> 
216		</div> 
217	</div> 
218	<script> 
219		executarGaleria(); 
220	</script> 
221</#macro>