Pular para o conteúdo

Publicador de conteúdo Publicador de conteúdo

TESTE MTI

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