Pular para o conteúdo
Voltar

MTI celebra 46 anos de fundação e resultados

Um erro ocorreu enquanto processava o modelo.
Error on line 211, column 57 in 20154#20194#21081
imagemGaleria?split("/")[5] is undefined.
It cannot be assigned to uuid
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")> 
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") > 
3<#assign articleId = .vars['reserved-article-id'].data > 
4<#assign journalArticle = journalArticleLocalService.getArticle( groupId, articleId ) > 
5 
6<#setting datetime_format="dd 'de' MMMM 'de' yyyy 'às' HH:mm"> 
7 
8<#assign dataPublicacao = journalArticle["displayDate"]?datetime > 
9<#assign chapeu = (.vars['hat'].getData())!"" > 
10<#assign tituloCapa = (.vars['front_title'].getData())!"" > 
11<#assign subTitulo = (.vars['sub_title'].getData())!"" > 
12<#assign autor = (.vars['author'].getData())!"" > 
13<#assign local = (.vars['source'].getData())!"" > 
14<#assign imagemDestaque = (.vars['full_image'].getData())!"" > 
15<#assign imagemLegenda = (.vars['legenda_da_foto'].getData())!"" > 
16<#assign imagemCredito = (.vars['credito_da_foto'].getData())!"" > 
17<#assign corpoNoticia = (.vars['full_text'].getData())!"" > 
18<#assign urlVideo = (.vars['video'].getData())!"" > 
19<#assign idGaleria = (.vars['gallery'].getData())!"" > 
20 
21 
22<style> 
23/* 20150827 */ 
24/*p:first-child:first-letter { float: left; color: #182C75; font-size: 75px; line-height: 60px; padding-top: 4px; padding-right: 8px; padding-left: 3px; font-family: Georgia;} */ 
25.header-title:before{content:"${chapeu}";font-size:13px;display: -webkit-box;line-height: 15px;text-transform: uppercase;font-family:'Nexa'; display: block;} 
26.taglib-header .header-back-to a {margin-top: 5px;font-size: 1.8em;} 
27.taglib-header:after {content: "${dataPublicacao}";font-size: 12px;float:right;margin-bottom: 30px;} 
28.attach-title{font-family:'Nexa';text-transform:uppercase;color: #fff;font-size:12px;padding: 3px 10px;background-color: #1255A6;} 
29.attach-content{padding: 10px 0;border-top: 2px solid #1255A6;} 
30.attach-content ol{margin:0;} 
31.attach-content ol li{margin-left:10px;} 
32.mt-search{display:none;} 
33.increaseFont, .decreaseFont{cursor:pointer;} 
34.increaseFont a:hover, .decreaseFont a:hover{text-decoration: none!important;} 
35.increaseFont{font-size:24px;} 
36.increaseFont i, .decreaseFont i{font-size:14px;} 
37.full-content img { padding: 0px !important; } 
38</style> 
39 
40<h5>${subTitulo}</h5> 
41 
42<span style="font-size:11px;">${autor}</span> 
43<#if local != "" > 
44    | <span style="font-size:11px;">${local}</span> 
45</#if> 
46<br/><br/> 
47 
48<#assign imagemLegenda = (.vars['legenda_da_foto'].getData())!"" > 
49<#assign imagemCredito = (.vars['credito_da_foto'].getData())!"" > 
50 
51<#if imagemDestaque != "" > 
52	<#if imagemLegenda != "" > 
53		<#if imagemCredito != "" > 
54			<#assign imagemCredito = " - Foto por: " + imagemCredito > 
55		</#if> 
56	<#else> 
57		<#assign uuid = imagemDestaque?split("/")[5]> 
58		<#assign uuid = uuid?split("?")[0]> 
59		 
60		<#assign dlFileEntryUtil = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") > 
61		<#assign fileEntry = dlFileEntryUtil.getDLFileEntryByUuidAndGroupId(uuid, groupId) > 
62		 
63		<#assign version = fileEntry.getFileVersion().fileVersionId > 
64		<#assign fileEntryTypeId = fileEntry.getFileEntryTypeId() > 
65		<#assign fieldsMap = fileEntry.getFieldsMap(version) > 
66		 
67		<#list fieldsMap?keys as fld> 
68			<#assign imagemLegenda = (fieldsMap[fld]["image_text"].getValue())!"" > 
69			<#assign imagemCredito = (fieldsMap[fld]["image_credits"].getValue())!"" > 
70			 
71			<#if imagemLegenda != "" > 
72				<#if imagemCredito != "" > 
73					<#assign imagemCredito = " - Foto por: " + imagemCredito > 
74				</#if> 
75			</#if> 
76		</#list> 
77	</#if> 
78	 
79    <div style="position:relative;margin-bottom:20px;"> 
80        <div style="position: absolute;right: 0px;background: rgba(0,0,0,.5);color: #dcdcdc;font-size: 11px;bottom: 0;padding: 0 4px;"> 
81            ${imagemLegenda} ${imagemCredito} 
82        </div> 
83        <img alt="${imagemLegenda}" src="${imagemDestaque}&imageThumbnail=3" title="${imagemLegenda} ${imagemCredito}"/> 
84    </div> 
85</#if> 
86 
87<div style="text-align: right;"><a class="increaseFont">A<i class="icon-plus-sign"></i></a> | <a class="decreaseFont">A<i class="icon-minus-sign"></i></a></div> 
88<div class="full-content" style="text-align:justify;">${corpoNoticia}</div><br/> 
89 
90 
91<#if urlVideo != "" > 
92    <#assign urlVideo = urlVideo?split("/")[3]> 
93     
94    <object width="100%" height="360" class="hidden-phone"> 
95        <param name="movie" value="https://www.youtube.com/embed/${urlVideo}?version=3&theme=light"></param> 
96        <param name="allowScriptAccess" value="always"></param> 
97        <embed src="https://www.youtube.com/embed/${urlVideo}?version=3&theme=light" allowscriptaccess="always" width="100%" height="360"></embed> 
98    </object> 
99    <object width="100%" height="240" class="visible-phone"> 
100        <param name="movie" value="https://www.youtube.com/embed/${urlVideo}?version=3&theme=light"></param> 
101        <param name="allowScriptAccess" value="always"></param> 
102        <embed src="https://www.youtube.com/embed/${urlVideo}?version=3&theme=light" allowscriptaccess="always" width="100%" height="240"></embed> 
103    </object> <br/><br/> 
104</#if> 
105 
106 
107<#if idGaleria != "" > 
108	<@mostrarGaleria idGaleria /> 
109</#if> 
110 
111 
112<#if .vars['attach'].getSiblings()?has_content > 
113    <#if .vars['attach'].getData() != ""  > 
114    	<br><br> 
115    	<span class="attach-title">Download <i class="icon-download-alt"></i></span> 
116    	<div class="attach-content"> 
117    		<ol> 
118    			<#list .vars['attach'].getSiblings() as cur_item> 
119    				<#assign attachURL = cur_item.getData() > 
120    				<#assign uuid = attachURL?split("/")[5]> 
121    				 
122    				<#if uuid?contains("?")> 
123    					<#assign uuid = uuid?split("?")[0]> 
124    				</#if> 
125    				 
126    				<#assign dlFileEntryUtil = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") > 
127    				<#assign fileEntry = dlFileEntryUtil.getDLFileEntryByUuidAndGroupId(uuid,groupId) > 
128    				 
129    				<#assign attachTitulo = fileEntry.title > 
130    				 
131    				<a href="${attachURL}" style="color: #35862C;display: -webkit-box;padding: 5px 20px;" title="${attachTitulo}" target="_blank"> 
132    					<li style="background: #B2DFD0;" >${attachTitulo}</li> 
133    				</a> 
134    				 
135    			</#list> 
136    		</ol> 
137    	</div> 
138    </#if> 
139</#if> 
140 
141 
142<#macro mostrarGaleria idGaleria> 
143	<#assign theme_img_path = "/mt-portal-theme/images" > 
144	<style> 
145	.rg-image-nav a{ 
146		background:#000 url(${theme_img_path}/nav.png) no-repeat -20% 50%; 
147
148	.es-nav span{ 
149		background:transparent url(${theme_img_path}/nav_thumbs.png) no-repeat top left; 
150
151	.rg-loading{ 
152		background:#000 url(${theme_img_path}/ajax-loader.gif) no-repeat center center; 
153
154	.rg-view a{ 
155		background:#464646 url(${theme_img_path}/views.png) no-repeat top left; 
156
157	.mt-search{display:none;} 
158	.taglib-header .header-back-to a{font-size:1.8em;margin-top:-10px;} 
159	</style> 
160 
161	<script id="img-wrapper-tmpl" type="text/x-jquery-tmpl">	 
162		<div class="rg-image-wrapper"> 
163			{{if itemsCount > 1}} 
164				<div class="rg-image-nav"> 
165					<a href="#" class="rg-image-nav-prev">Anterior</a> 
166					<a href="#" class="rg-image-nav-next">Próxima</a> 
167				</div> 
168			{{/if}} 
169			<div class="rg-image"></div> 
170			<div class="rg-loading"></div> 
171			<div class="rg-caption-wrapper"> 
172				<div class="rg-caption" style="display:none;"> 
173					<p></p> 
174				</div> 
175			</div> 
176		</div> 
177	</script> 
178 
179	<noscript> 
180		<style> 
181			.es-carousel ul{ 
182				display:block; 
183
184		</style> 
185	</noscript> 
186 
187	<div id="rg-gallery" class="rg-gallery"> 
188		<div class="rg-thumbs"> 
189			<div class="es-carousel-wrapper"> 
190				<div class="es-nav"> 
191					<span class="es-nav-prev">Previous</span> 
192					<span class="es-nav-next">Next</span> 
193				</div> 
194				<div class="es-carousel"> 
195					<ul> 
196						<#assign journalArticleGaleria = journalArticleLocalService.getArticle( groupId, idGaleria ) > 
197						<#assign resourceprimKeyGaleria = journalArticleGaleria.getResourcePrimKey() > 
198						<#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.portlet.journal.model.JournalArticle", resourceprimKeyGaleria) > 
199 
200						<#assign documentGaleria = saxReaderUtil.read(journalArticleGaleria.getContent()) > 
201 
202						<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image']") > 
203						<#assign gal_imgs = (xPathSelector.selectNodes(documentGaleria.getRootElement()))!"" > 
204						 
205						<#assign countImg = gal_imgs?size > 
206						<#assign countImg = countImg - 1 > 
207						 
208						<#list 0..countImg as x> 
209							<#assign imagemGaleria = gal_imgs[x].getStringValue()?trim > 
210							 
211							<#assign uuid = imagemGaleria?split("/")[5]> 
212							<#assign uuid = uuid?split("?")[0]> 
213 
214							<#assign dlFileEntryUtil = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") > 
215							<#assign fileEntry = dlFileEntryUtil.getDLFileEntryByUuidAndGroupId(uuid, groupId) > 
216 
217							<#assign version = fileEntry.getFileVersion().fileVersionId > 
218							<#assign fileEntryTypeId = fileEntry.getFileEntryTypeId() > 
219							<#assign fieldsMap = fileEntry.getFieldsMap(version) > 
220 
221							<#assign imgTxt = "&nbsp;" > 
222							<#assign imgCred = "&nbsp;" > 
223 
224							<#list fieldsMap?keys as fld> 
225								<#assign imgTxt = (fieldsMap[fld]["image_text"].getValue())!"" > 
226								<#assign imgCred = (fieldsMap[fld]["image_credits"].getValue())!"" > 
227								 
228								<#if imgTxt != "" > 
229									<#if imgCred != "" > 
230										<#assign imgCred = " - Foto por: " + imgCred > 
231									</#if> 
232								</#if> 
233							</#list> 
234							 
235							<li> 
236								<a href="#"> 
237									<img src="${imagemGaleria}&imageThumbnail=1" data-large="${imagemGaleria}&imageThumbnail=3" data-save="${imagemGaleria}" alt="${imgTxt}" data-description="${imgTxt} ${imgCred}" /> 
238								</a> 
239							</li> 
240							 
241						</#list> 
242					</ul> 
243				</div> 
244			</div> 
245		</div> 
246	</div> 
247	<script> 
248		executarGaleria(); 
249	</script> 
250</#macro>