Pular para o conteúdo
Um erro ocorreu enquanto processava o modelo.
Expression lifecycleLabel is undefined on line 93, column 69 in 20154#20194#8153110.
1<#-- 
2	Nome: Serviços - Mosaico (SEDUC) - MIGRAÇÃO 
3	Idioma: Freemarker 
4	Descrição: 
5	Data Alteração: 2022 05 10 
6	Tarefa: #47348 
7	Obs.: 
8		-  
9--> 
10 
11<style> 
12.mosaico-item { 
13	height:150px; 
14	padding: 12px 12px 0px 8px;> 
15
16.ico-service { 
17  border: 4px solid #fff; 
18  display: table !important; 
19  border-radius: 100%; 
20  padding: 10px; 
21
22.ico-service i {color:#fff;font-size:100px;padding:10px;display: table-cell !important;} 
23.back-service{height: 100% !important;background-size: cover !important;/*padding: 15px;width: 48.1%;float: right;*/} 
24.service-title{ 
25    font-size: 45px; 
26    color: #fff; 
27    text-transform: uppercase; 
28    font-weight: bold; 
29    display: -webkit-inline-box; 
30    vertical-align: top; 
31    line-height: 120px; 
32    margin-left: 20px; 
33
34.service-title small{font-size: 14px;line-height: 18px;margin-top: -40px;position: absolute;} 
35.cor .icon-wrapper { 
36  border: 2px solid #fff; 
37  width: 64px; 
38  height: 64px; 
39  display: table !important; 
40  border-radius: 50px; 
41  margin: 0 auto; 
42  padding: 5px; 
43
44.cor a, .cor .service-icon{color:#fff;} 
45.cor a:hover{color:#fff;text-decoration:none;} 
46.service-menu-container .span3{width: 24.9999999% !important;} 
47.service-menu-container [class*="span"]{margin-left: 0 !important} 
48.service-menu-container [class*="span"]:first-child {margin-left: 0 !important;} 
49.pagetitle-content input[type="text"] { 
50    color: #fff; 
51    background: rgba(255,255,255,0.3); 
52    border: 0; 
53    padding: 3px 5px; 
54    margin-top: 5px; 
55
56.lfr-token-list{display:none;} 
57.search-layout{display:none;} 
58.control-group{margin-bottom:0 !important;} 
59.pagetitle-content form{margin-bottom:0;display:-webkit-inline-box;margin-left: 20px;} 
60.pagetitle-content{padding:5px 0 0 !important;} 
61.no-margin { margin: 0px !important; } 
62.service-ciclo-vida { width: 100% !important; height: 230px !important; } 
63.service-ciclo-vida-titulo { margin: 40px 0px 0px 20px; } 
64.service-ciclo-vida-titulo span { float: left; } 
65</style> 
66 
67<#assign categories = [] /> 
68<#assign exists = false /> 
69<#assign count = 1 /> 
70<#assign lum = 0.1 /> 
71<#assign asc = true /> 
72<#assign estruturaCabecalhoServicosID = 27252 /> 
73 
74<#assign lifecycle = httpUtil.getParameter(portalUtil.getCurrentCompleteURL(request), 'ciclo') /> 
75<#if (lifecycle == 'cv_comunidade') > 
76	<#assign lifecycleLabel = 'Comunidade' /> 
77<#elseif (lifecycle == 'cv_servidor') > 
78	<#assign lifecycleLabel = 'Servidor' /> 
79<#elseif (lifecycle == 'cv_estudante') > 
80	<#assign lifecycleLabel = 'Estudante' /> 
81<#elseif (lifecycle == 'cv_ouvidoria') > 
82	<#assign lifecycleLabel = 'Ouvidoria' /> 
83</#if> 
84 
85<#if (lifecycle != '') > 
86    <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
87	<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") /> 
88	<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
89	<#assign csStructureKey = ddmStructureLocalService.getDDMStructure(estruturaCabecalhoServicosID).getStructureKey() /> 
90	<#assign headerList = journalArticleLocalService.getStructureArticles(themeDisplay.getSiteGroupId(), csStructureKey) /> 
91    <#list headerList as header > 
92		<#if (!header.getArticleId()?string?starts_with("/")) > 
93			<#if (header.getTitle(locale)?lower_case == lifecycleLabel?lower_case) > 
94				<#assign document = saxReaderUtil.read(header.getContent())  /> 
95				<#assign rootElement = document.getRootElement()  /> 
96				<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='icon']/dynamic-content")  /> 
97				<#assign icon = xPathSelector.selectSingleNode(rootElement).getStringValue()  /> 
98				<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='category']/dynamic-content")  /> 
99				<#assign category = xPathSelector.selectSingleNode(rootElement).getStringValue()  /> 
100				<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='color']/dynamic-content")  /> 
101                <#assign color = xPathSelector.selectSingleNode(rootElement).getStringValue()  /> 
102				<style>.cor{background:${color};} </style> 
103				<div class="row-fluid" style="margin-top: -20px;"> 
104					<div class="span12 cor contrast-cor1 no-margin service-ciclo-vida service-ciclo-vida-icone"> 
105						<div class="service-ciclo-vida-titulo"> 
106							<span> 
107								<div class="ico-service"> 
108									<i class="${icon}"></i> 
109								</div> 
110							</span> 
111							<span class="service-title contrast-cor1">${category!}<br/><small>Selecione a área relacionada ao serviço</small></span> 
112						</div> 
113					</div> 
114				</div> 
115				<#break> 
116			</#if> 
117		</#if> 
118    </#list> 
119</#if> 
120 
121<div class="service-container" style="padding:0;margin-bottom:80px;background:none;"> 
122<#if (lifecycle != '') > 
123	<#if (entries?has_content) > 
124    	<section class="service-menu-container row-fluid" style="display: inherit;"> 
125    	<#list entries as curEntry > 
126    		<#assign entryTags = curEntry.getTags() /> 
127    		 
128    		<#list entryTags as tag > 
129			 
130				<#if (tag.name?lower_case == lifecycle?lower_case) > 
131					 
132					<#assign entryCats = curEntry.getCategories() /> 
133					 
134					<#list entryCats as entryCat > 
135						<#if (entryCat?has_content) > 
136							 
137							<#if (categories?size > 0) > 
138								<#list categories as cat > 
139									<#if (cat == entryCat.name?trim) > 
140										<#assign exists = true /> 
141									</#if> 
142								</#list> 
143							</#if> 
144							 
145							<#if (exists == true) > 
146								<#assign exists = false /> 
147								<#break> 
148							<#else> 
149								 
150								<#assign categories = categories + [entryCat.name?trim] /> 
151							 
152								<#assign icon = entryCat.getDescriptionCurrentValue() /> 
153            					<#assign icon = icon?split(" ")[0] /> 
154            					 
155            					<#if (icon == "") > 
156            						<#assign icon = "icon-mt-mt" /> 
157            					</#if> 
158								 
159								<#assign renderer = curEntry.getAssetRenderer()  /> 
160								<#assign link = renderer.getURLViewInContext(renderRequest, renderResponse, '')  /> 
161								 
162								<div class="span3 cor mosaico-item"> 
163									<a href="${link}?ciclo=${lifecycle!}"> 
164										<div class="icon-wrapper"> 
165											<i class="service-icon ${icon}"></i> 
166										</div> 
167										<h5 style="font-size:1.1em;font-weight:normal;text-transform:uppercase;">${entryCat.name?trim}<h5> 
168									</a> 
169								</div> 
170								 
171								<#if (count > 1) > 
172								    <#if (asc) > 
173								        <#assign lum = lum + 0.2 /> 
174								    <#else> 
175								        <#assign lum = lum - 0.2 /> 
176								    </#if> 
177								</#if> 
178								 
179								<script type="text/javascript"> 
180                                    var items = document.querySelectorAll(".cor"); 
181                                    var lastchild = items[items.length-1]; 
182                                     
183                                    lastchild.style.backgroundColor = ColorLuminance("${color}", ${lum}); 
184                                     
185                                     
186                                     
187                                    function ColorLuminance(hex, lum) { 
188                                     
189                                    	// validate hex string 
190                                    	hex = String(hex).replace(/[^0-9a-f]/gi, ''); 
191                                    	if (hex.length < 6) { 
192                                    		hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; 
193
194                                    	lum = lum || 0; 
195                                     
196                                    	// convert to decimal and change luminosity 
197                                    	var rgb = "#", c, i; 
198                                    	for (i = 0; i < 3; i++) { 
199                                    		c = parseInt(hex.substr(i*2,2), 16); 
200                                    		c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); 
201                                    		rgb += ("00"+c).substr(c.length); 
202
203                                     
204                                    	return rgb; 
205
206                                </script> 
207								 
208								<#assign count = count+1 /> 
209								<#if (count>4) > 
210									<#assign count = 1 /> 
211									<#if (asc) > 
212									    <#assign asc = false /> 
213									<#else> 
214									    <#assign asc = true /> 
215									</#if> 
216								</#if> 
217							 
218							</#if> 
219							 
220						</#if> 
221					</#list> 
222					<#break> 
223				</#if> 
224    		</#list> 
225    	</#list> 
226    	</section> 
227	</#if> 
228<#else> 
229    <style>.cor{background:#056CAF;}.service-menu-container{margin-top:-20px;}</style> 
230    <section class="service-menu-container row-fluid" style="display: inherit;"> 
231    <#list entries as curEntry >		 
232		<#assign entryCats = curEntry.getCategories() />  
233		 
234		<#list entryCats as entryCat > 
235			<#if (entryCat?has_content) > 
236				 
237				<#if (categories?size > 0) > 
238					<#list categories as cat > 
239						<#if (cat == entryCat.name?trim) > 
240							<#assign exists = true /> 
241						</#if> 
242					</#list> 
243				</#if> 
244				 
245				<#if (exists == true) > 
246					<#assign exists = false /> 
247					<#break> 
248				<#else> 
249					 
250					<#assign categories = categories + [entryCat.name?trim] /> 
251					<#assign icon = entryCat.getDescriptionCurrentValue() /> 
252					<#assign icon = icon?split(" ")[0] /> 
253					 
254					<#if (icon == "") > 
255						<#assign icon = "icon-mt-governo" /> 
256					</#if> 
257					 
258					<#assign renderer = curEntry.getAssetRenderer()  /> 
259					<#assign link = renderer.getURLViewInContext(renderRequest, renderResponse, '')  /> 
260					 
261					<div class="span3 cor mosaico-item"> 
262						<a href="${link}?ciclo="> 
263							<div class="icon-wrapper"> 
264								<i class="service-icon ${icon}"></i> 
265							</div> 
266							<h5 style="font-size:1.1em;font-weight:normal;text-transform:uppercase;">${entryCat.name?trim}<h5> 
267						</a> 
268					</div> 
269					 
270					<#if (count > 1) > 
271					    <#if (asc) > 
272					        <#assign lum = lum + 0.2 /> 
273					    <#else> 
274					        <#assign lum = lum - 0.2 /> 
275					    </#if> 
276					</#if> 
277					 
278					<script type="text/javascript"> 
279                        var items = document.querySelectorAll(".cor"); 
280                        var lastchild = items[items.length-1]; 
281                         
282                        lastchild.style.backgroundColor = ColorLuminance("#00609E", ${lum}); 
283 
284                        function ColorLuminance(hex, lum) { 
285                         
286                        	// validate hex string 
287                        	hex = String(hex).replace(/[^0-9a-f]/gi, ''); 
288                        	if (hex.length < 6) { 
289                        		hex = hex[0]+hex[0]+hex[1]+hex[1]+hex[2]+hex[2]; 
290
291                        	lum = lum || 0; 
292                         
293                        	// convert to decimal and change luminosity 
294                        	var rgb = "#", c, i; 
295                        	for (i = 0; i < 3; i++) { 
296                        		c = parseInt(hex.substr(i*2,2), 16); 
297                        		c = Math.round(Math.min(Math.max(0, c + (c * lum)), 255)).toString(16); 
298                        		rgb += ("00"+c).substr(c.length); 
299
300                        	return rgb; 
301
302                    </script> 
303					 
304					<#assign count = count+1 /> 
305					<#if (count>4) > 
306						<#assign count = 1 /> 
307						<#if (asc) > 
308						    <#assign asc = false /> 
309						<#else> 
310						    <#assign asc = true /> 
311						</#if> 
312					</#if> 
313				 
314				</#if> 
315				 
316			</#if> 
317		</#list> 
318    </#list> 
319    </section> 
320</#if> 
321</div> 
322 
323<script> 
324    searchInterno(); 
325</script>