Pular para o conteúdo
Voltar

Que Ouvidoria queremos?

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