Voltar Reunião Anual dos Assuntos Regulamentares da Ordem dos Farmacêuticos

Ocorreu um erro no processamento do modelo.
?replace(...) expects 2 or 3 arguments but has received 5.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign eventStartDay = x?replace("",...  [in template "254#294#73774" at line 44, column 33]
----
1<#-- Configuration Variables --> 
2<#assign displayTags = false> <#-- Possible values are: true false --> 
3<#-- Template --> 
4 
5<#assign articleTitle = .vars['reserved-article-title'].data> 
6<#assign articleID = .vars['reserved-article-id'].data> 
7<#assign articleVersion = .vars['reserved-article-version'].data> 
8 
9<#if themeDisplay??> 
10	<#assign themeDisplay = themeDisplay > 
11	<#assign layout = themeDisplay.getPlid() > 
12	<#assign layoutService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") > 
13	<#assign layoutObject = layoutService.getLayout(layout?number) > 
14	 
15	<#assign portalURL = themeDisplay.getPortalURL() /> 
16	<#assign mainPath = layoutObject.getFriendlyURL(locale) > 
17	<#assign currentBaseURL = portalURL + themeDisplay.getPathFriendlyURLPublic() + layoutObject.getGroup().getFriendlyURL() + mainPath> 
18	 
19	<#assign shareURL = currentBaseURL> 
20	<#assign currentURL = themeDisplay.getURLPortal()+themeDisplay.getURLCurrent() > 
21	<#if currentURL?contains("/-/journal_content/")> 
22		<#if currentURL?contains("?")> 
23			<#assign shareURL = portalURL + currentURL?split("?")[0]> 
24		<#else> 
25			<#assign shareURL = portalURL + currentURL> 
26		</#if> 
27	</#if> 
28</#if> 
29               
30<#if Data_inicio?? && Data_inicio.getData()?has_content > 
31	<#assign Data_DateObj = dateUtil.parseDate("yyyy-MM-dd", Data_inicio.getData(), locale)> 
32	<#assign eventStartDate = dateUtil.getDate(Data_DateObj, "dd/MMM/yyyy", locale)?lower_case> 
33<#else> 
34	<#assign eventStartDate = ""> 
35</#if> 
36 
37<#assign i = 0> 
38<#assign eventStartDay = ""> 
39<#assign eventStartMonth = ""> 
40<#if eventStartDate?contains("/")> 
41	<#list eventStartDate?split("/") as x> 
42	    <#if (i==0)> 
43			<#if x?starts_with("0")> 
44				<#assign eventStartDay = x?replace(''0'', '''')> 
45			<#else> 
46				<#assign eventStartDay = x> 
47			</#if>	         
48	    <#elseif i == 1> 
49	        <#assign eventStartMonth = x> 
50	    </#if> 
51	    <#assign i = i + 1> 
52	</#list> 
53</#if> 
54 
55<#if Tipo_de_evento.getData() == "inf_d"> 
56    <#assign eventType = "O Infarmed divulga"> 
57    <#assign eventIcon = "feed"> 
58<#elseif Tipo_de_evento.getData() == "inf_o"> 
59    <#assign eventType = "O Infarmed organiza"> 
60    <#assign eventIcon = "home"> 
61<#elseif Tipo_de_evento.getData() == "inf_r"> 
62    <#assign eventType = "O Infarmed recebe"> 
63    <#assign eventIcon = "local"> 
64<#elseif Tipo_de_evento.getData() == "inf_p"> 
65    <#assign eventType = "O Infarmed participa"> 
66    <#assign eventIcon = "user"> 
67<#else> 
68    <#assign eventType = "O Infarmed divulga"> 
69    <#assign eventIcon = "feed"> 
70</#if> 
71 
72<#assign hasHours = Data.get("Hora")?? && Data.get("Hora").getData()?has_content> 
73<#assign hasLocal = Local?? && Local.getData()?has_content> 
74<#assign hasSubtitulo = Subtitulo?? && Subtitulo.getData()?has_content> 
75<#assign hasRegistLink = Link_para_inscricao?? && Link_para_inscricao.getData()?has_content> 
76<#assign hasSeparador = Separador?? && Separador.getData()?has_content> 
77<#assign hasImagem = Imagem?? && Imagem.getData()?has_content> 
78 
79<#assign hasRegistState = Estado_das_inscricoes?? && Estado_das_inscricoes.getData()?has_content> 
80 
81<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> <!-- Usado por causa das tabs --> 
82 
83<style> 
84	/* bootstrap hack: fix content width inside hidden tabs */ 
85	#${randomNamespace}Tabbable .tab-content > .tab-pane, .pill-content > .pill-pane { 
86	    display: block;    /* undo display:none          */ 
87	    height: 0;         /* height:0 is also invisible */  
88	    overflow: hidden;  /* no-overflow                */ 
89
90	#${randomNamespace}Tabbable .tab-content > .active, .pill-content > .active { 
91	    height: auto;      /* let the content decide it  */ 
92	} /* bootstrap hack end */ 
93</style> 
94 
95<style> 
96	.tabbable .tab-content.${randomNamespace}showOverflow {	 
97		overflow: visible; 
98
99	 
100	.tabbable li a.${randomNamespace}tabText {	 
101	    font-family: "Roboto", sans-serif; 
102	    font-size: 1rem; 
103
104	 
105	#eventDetail .tabbable{ 
106    	margin-top: 30px; 
107
108     
109    #eventDetail .tabbable .nav-tabs li a{ 
110    	font-family: "Roboto", sans-serif; 
111        font-size: 1rem; 
112
113	 
114</style> 
115 
116<div class="hide" style="display:none !important; mso-hide:all;"> 
117    <h1 style="color:#ffffff;"> Acessibilidade </h1> 
118    <a href="#titulo"></a> 
119</div> 
120 
121<div id="eventDetail"> 
122	<div class="hero-banner simple-banner break-free"> 
123		<div class="container-medium inside"> 
124			<div class="banner-group"> 
125			    <#if hasImagem> 
126			        <div class="banner-image" style="background-image: url(${Imagem.getData()})"> 
127			        </div> 
128			    <#else> 
129			        <div class="banner-image" style="background-image: url(/infarmed-theme/images/tmp/event1.jpg)" "> 
130			        </div> 
131			    </#if> 
132				<div class="banner-text "> 
133					<div class="text-wrap "> 
134						<article class="event event-detail-header "> 
135							<div class="event-link "> 
136								<time class="date ">										 
137								    <#if eventStartDay != ""> 
138                    	<strong>${eventStartDay}</strong> 
139								    </#if> 
140									<#if eventStartMonth != ""> 
141									     <span>${eventStartMonth}</span> 
142									</#if> 
143								</time> 
144								<header class="event-header "> 
145									<div class="event-type "> 
146										<div class="wrap "> 
147											<span class="font-icon ico-${eventIcon}"></span>${eventType} 
148										</div> 
149									</div> 
150									<h1 id="titulo" class="title "> 
151										${articleTitle} 
152									</h1> 
153								</header> 
154							</div> 
155						</article> 
156					</div> 
157				</div> 
158			</div> 
159		</div> 
160		<div class="banner-meta-wrap "> 
161			<div class="container-medium inside "> 
162				<div class="event-wrap-footer "> 
163					<div class="event event-detail-footer "> 
164						<div class="event-meta "> 
165						    <#if hasHours> 
166							    <time>${Data.get("Hora").getData()}</time> 
167							</#if> 
168							<#if hasLocal> 
169							    <div class="location "> 
170    							    ${Local.getData()} 
171    							</div> 
172							</#if> 
173						</div> 
174					</div> 
175					<div class="action-call"> 
176					    <#if hasRegistState> 
177    					    <#if Estado_das_inscricoes.getData() != "notPresent"> 
178        					    <#if Estado_das_inscricoes.getData() == "openRegistation"> 
179        					        <#if hasRegistLink> 
180        					            <#assign cur_Link_URL = Link_para_inscricao.getData()> 
181                                    	<#assign URL_target = ""> 
182                                    	<#if !cur_Link_URL?starts_with("/") && !cur_Link_URL?contains("infarmed.pt")> 
183                                    		<#assign URL_target = "_blank">					 
184                                    	</#if> 
185                                    	<#if !cur_Link_URL?starts_with("/") && !cur_Link_URL?starts_with("http")> 
186                                    		<#assign cur_Link_URL = "http://" + cur_Link_URL> 
187                                    	</#if> 
188            					        <a href="${cur_Link_URL}" target="${URL_target}"> 
189            					    <#else> 
190            					        <a href="#"> 
191            					    </#if> 
192                						    <span class="button large filled rounded ">Inscrições abertas</span> 
193                						</a> 
194        					    <#else> 
195        					        <span style="cursor:default;" class="button large filled rounded ">Inscrições encerradas</span> 
196        					    </#if> 
197        					</#if> 
198        				</#if> 
199					</div> 
200					<#if themeDisplay??> 
201						<div class="actions "> 
202							<a href="javascript:${randomNamespace}printPage();" class="print">Imprimir  
203							    <div class="fa fa-print" aria-hidden="true"> 
204							    </div> 
205							</a> 
206							<#if themeDisplay??> 
207	    						<#assign portletPreferencesService = serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService") > 
208	    						<#assign portletPreferencesInLayout = portletPreferencesService.getPortletPreferencesByPlid(layout?number)> 
209	    						<#assign portletInstanceId = "56_INSTANCE_0000"> 
210	    						<#list portletPreferencesInLayout as curPortletPreferences> 
211	    							<#if curPortletPreferences.getPortletId()?starts_with("56")>			 
212	    								<#assign preferencesXML = saxReaderUtil.read(curPortletPreferences.getPreferences())> 
213	    								<#if preferencesXML.selectSingleNode("/portlet-preferences/preference[name[text()=\"articleId\"]]/value")??> 
214	    									<#assign XMLnode = preferencesXML.selectSingleNode("/portlet-preferences/preference[name[text()=\"articleId\"]]/value")> 
215	    									<#if XMLnode.getText() == articleID> 
216	    										<#assign portletInstanceId = curPortletPreferences.getPortletId()> 
217	    										<#break> 
218	    									</#if> 
219	    								</#if> 
220	    							</#if> 
221	    						</#list> 
222	    						<script> 
223	    							function ${randomNamespace}printPage() { 
224										if(window.location.href.indexOf("viewMode=print")>=0){ 
225											window.print(); 
226
227										else{ 
228	                                        window.open('${friendlyURLs[themeDisplay.getLanguageId()]!""}?p_p_state=pop_up&_${portletInstanceId}_page=1&_${portletInstanceId}_viewMode=print', '', "directories=0,height=480,left=80,location=1,menubar=1,resizable=1,scrollbars=yes,status=0,toolbar=0,top=180,width=640"); 
229
230
231	    						</script> 
232							</#if> 
233							<div class="share-inline"> 
234								<#assign fbPageURLToShare = "https://www.facebook.com/sharer/sharer.php"> 
235								<#assign fbPageURLToShare = httpUtil.addParameter(fbPageURLToShare, "u", shareURL)> 
236								<#assign fbPageURLToShare = httpUtil.addParameter(fbPageURLToShare, "title", articleTitle)> 
237								<#assign fbPageURLToShare = httpUtil.addParameter(fbPageURLToShare, "description", "Infarmed")> 
238								<#if hasImagem?? && hasImagem> 
239									<#assign fbPageURLToShare = httpUtil.addParameter(fbPageURLToShare, "picture", portalURL + Imagem.getData())> 
240								<#else> 
241									<#assign fbPageURLToShare = httpUtil.addParameter(fbPageURLToShare, "picture", portalURL + "/infarmed-theme/images/infarmed-coloured.png")> 
242								</#if> 
243								<#assign twitterPageURLToShare = "https://twitter.com/intent/tweet"> 
244								<#assign twitterPageURLToShare = httpUtil.addParameter(twitterPageURLToShare, "text", articleTitle)> 
245								<#assign twitterPageURLToShare = httpUtil.addParameter(twitterPageURLToShare, "url", shareURL)> 
246								 
247								<#assign linkedinPageURLToShare = "https://www.linkedin.com/shareArticle"> 
248								<#assign linkedinPageURLToShare = httpUtil.addParameter(linkedinPageURLToShare, "mini", true)> 
249								<#assign linkedinPageURLToShare = httpUtil.addParameter(linkedinPageURLToShare, "url", shareURL)> 
250								<#assign linkedinPageURLToShare = httpUtil.addParameter(linkedinPageURLToShare, "title", articleTitle)> 
251								<#assign linkedinPageURLToShare = httpUtil.addParameter(linkedinPageURLToShare, "summary", "Infarmed")> 
252								 
253								<#assign emailToURLToShare = "mailto:?subject="> 
254								<#assign emailToURLToShare = emailToURLToShare + urlCodec.encodeURL(articleTitle, true)> <#-- Não seguiu a abordagem anterior porque o encode dos espaços fica com '+' em vez de '%20' -->						 
255								<#assign emailToURLToShare = emailToURLToShare + "&body=" + urlCodec.encodeURL(shareURL, true)> 
256								 
257								<span class="label-text"><@liferay.language key="share" /></span> 
258								<ul> 
259									<li><a href="${fbPageURLToShare}" title="Facebook" target="_blank"><div class="fa fa-facebook"></div></a></li> 
260									<li><a href="${linkedinPageURLToShare}" title="LinkedIn" target="_blank"><div class="fa fa-linkedin"></div></a></li> 
261									<li><a href="${twitterPageURLToShare}" title="Twitter" target="_blank"><div class="fa fa-twitter"></div></a></li> 
262									<li><a href="${emailToURLToShare}" title="E-mail"><div class="fa fa-envelope-o"></div></a></li> 
263								</ul> 
264							</div> 
265						</div> 
266					</#if> 
267				</div> 
268			</div> 
269		</div> 
270	</div> 
271	<div class="container-medium "> 
272		<div class="event-detail-body "> 
273			<div class="cms-editor "> 
274			    <#if hasSubtitulo> 
275			        <p><strong>${Subtitulo.getData()}</strong></p> 
276			    </#if> 
277				<p>${Corpo_do_conteudo.getData()} 
278				</p> 
279			</div> 
280			 
281			<#if Separador.getSiblings()?size lte 1> 
282				<#assign hasAnexoSingleSeparador = Separador.get("Anexo")?? && Separador.get("Anexo").getSiblings()?has_content && Separador.get("Anexo").getSiblings()[0].getData()?has_content> 
283				<#if hasAnexoSingleSeparador> 
284					<section class="section "> 
285						<header class="section-header "> 
286							<#if Separador.getData()?has_content> 
287								<h2 class="title black ">${Separador.getData()}</h2> 
288							<#else> 
289								<h2 class="title black ">Anexos</h2> 
290							</#if> 
291							 
292						</header> 
293						<div class="section-content "> 
294								<ul class="list-links"> 
295									<#list Separador.get("Anexo").getSiblings() as cur_Anexo> 
296										<#if cur_Anexo?? && cur_Anexo.getData()?has_content && cur_Anexo.getData() != ""> 
297											<#assign GetterUtil = staticUtil["com.liferay.portal.kernel.util.GetterUtil"]/> 
298											<#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
299											<#assign docAttrs = cur_Anexo.getData()?split("/")> 
300											<#assign groupId = docAttrs[2]> 
301											<#if docAttrs[5]?index_of("?") != -1> 
302												<#assign uuid = docAttrs[5]?substring(0, docAttrs[5]?index_of("?"))> 
303											<#else> 
304												<#assign uuid = docAttrs[5]> 
305											</#if> 
306											<#if DLFileEntryLocalService.getFileEntryByUuidAndGroupId(uuid, GetterUtil.getLong(groupId))??> 
307												<#assign entry = DLFileEntryLocalService.getFileEntryByUuidAndGroupId(uuid, GetterUtil.getLong(groupId))> 
308										 
309												<#assign anexoDesc = entry.getDescription()> 
310												<li> 
311													<a href="${cur_Anexo.getData()}" target="_blank"> 
312														<#if cur_Anexo.get("Nome_a_apresentar")?? && cur_Anexo.get("Nome_a_apresentar").getData()?has_content> 
313															${cur_Anexo.get("Nome_a_apresentar").getData()} 
314														<#else> 
315															${anexoDesc} 
316														</#if> 
317													</a> 
318												</li> 
319											</#if> 
320										</#if> 
321									</#list> 
322								</ul> 
323						</div> 
324					</section> 
325				</#if> 
326			<#else> 
327				<div class="tabbable" id="${randomNamespace}Tabbable"> <!-- Only required for left/right tabs --> 
328					<ul class="nav nav-tabs" id="${randomNamespace}TabbedContent"> 
329						<#if Separador.getSiblings()?has_content> 
330							<#list Separador.getSiblings() as cur_Tab> 
331								<#if cur_Tab_index==0> 
332									<li class="active"> 
333								<#else> 
334									<li> 
335								</#if> 
336										<a href="#${randomNamespace}tab${cur_Tab_index}" data-toggle="tab">${cur_Tab.getData()}</a> 
337									</li> 
338							</#list> 
339						</#if> 
340					</ul> 
341 
342					<div class="tab-content ${randomNamespace + "showOverflow"}"> 
343						<#if Separador.getSiblings()?has_content> 
344							<#list Separador.getSiblings() as cur_Tab> 
345								<#assign active = ""> 
346								<#if cur_Tab_index==0> 
347									<#assign active = "active"> 
348								</#if> 
349								<#assign tabID = randomNamespace + "tab" + cur_Tab_index> 
350								<div class="tab-pane ${active}" id="${tabID}"> 
351									<@drawTabContent cur_Tab tabID/> 
352								</div> 
353							</#list> 
354						</#if> 
355					</div> 
356				</div> 
357			</#if> 
358			<#if displayTags> 
359				<@drawTags/> 
360			</#if> 
361		</div> 
362		<div class="page-bottom-actions "> 
363			<a href="javascript:window.history.back();" class="back "> 
364			    <div class="fa fa-angle-left " aria-hidden="true "></div> Voltar 
365			</a> 
366		</div> 
367	</div> 
368</div> 
369 
370<script> 
371	$( document ).ready(function() { 
372		$('#${randomNamespace}TabbedContent a').click(function (e) { 
373			e.preventDefault(); 
374			$(this).tab('show'); 
375		}) 
376	}); 
377</script> 
378 
379<script src="https://maxcdn.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>  
380 
381<#macro drawTabContent tab tabID> 
382	<div class="section-content "> 
383		<#assign hasAnexo = tab.get("Anexo")?? && tab.get("Anexo").getSiblings()?has_content && tab.get("Anexo").getSiblings()[0].getData()?has_content> 
384        <#if hasAnexo> 
385			<ul class="list-links"> 
386				<#list tab.get("Anexo").getSiblings() as cur_Anexo> 
387					<#if cur_Anexo?? && cur_Anexo.getData()?has_content && cur_Anexo.getData() != ""> 
388						<#assign GetterUtil = staticUtil["com.liferay.portal.kernel.util.GetterUtil"]/> 
389						<#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
390						<#assign docAttrs = cur_Anexo.getData()?split("/")> 
391						<#assign groupId = docAttrs[2]> 
392						<#if docAttrs[5]?index_of("?") != -1> 
393							<#assign uuid = docAttrs[5]?substring(0, docAttrs[5]?index_of("?"))> 
394						<#else> 
395							<#assign uuid = docAttrs[5]> 
396						</#if> 
397						<#if DLFileEntryLocalService.getFileEntryByUuidAndGroupId(uuid, GetterUtil.getLong(groupId))??> 
398							<#assign entry = DLFileEntryLocalService.getFileEntryByUuidAndGroupId(uuid, GetterUtil.getLong(groupId))> 
399					 
400							<#assign anexoDesc = entry.getDescription()> 
401							<li> 
402								<a href="${cur_Anexo.getData()}" target="_blank"> 
403									<#if cur_Anexo.get("Nome_a_apresentar")?? && cur_Anexo.get("Nome_a_apresentar").getData()?has_content> 
404										${cur_Anexo.get("Nome_a_apresentar").getData()} 
405									<#else> 
406										${anexoDesc} 
407									</#if> 
408								</a> 
409							</li> 
410						</#if> 
411					</#if> 
412				</#list> 
413			</ul> 
414		</#if> 
415	</div> 
416</#macro> 
417 
418<#macro drawTags> 
419	<#if themeDisplay??> 
420		<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") > 
421		<#assign assetEntryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")> 
422		<#assign assetTagService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService")> 
423		 
424		<#assign journalArticleObject = journalArticleService.fetchArticle(scopeGroupId?number, articleID, articleVersion?number)> 
425 
426		<#assign entryObject = assetEntryService.getEntry("com.liferay.journal.model.JournalArticle", journalArticleObject.getResourcePrimKey())> 
427		<#assign articleTags = assetTagService.getAssetEntryAssetTags(entryObject.getEntryId())> 
428				 
429		<#if articleTags?has_content> 
430			<section class="section "> 
431				<header class="section-header "> 
432					<h2 class="title "><@liferay.language key="topics" /></h2> 
433				</header> 
434				<div class="section-content "> 
435					<ul id="${randomNamespace}contentTagsList" class="topic-list contentTagsList" style="max-height:6em; overflow-y:hidden; padding-right: 10px;"> 
436						<div id="${randomNamespace}tagsCarret" class="hidden tagsCarret fa fa-caret-down fa-2x" aria-hidden="true"></div> 
437						<#list articleTags as articleTag> 
438							<#assign tagSearchURL = "?p_p_id=3&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_3_struts_action=%2Fsearch%2Fsearch&_3_assetTagNames=" + articleTag.getName()> 
439							<li><a href="${currentBaseURL}${tagSearchURL}" class="button rounded small">${articleTag.getName()}</a></li> 
440						</#list> 
441					</ul> 
442				</div> 
443			</section>		 
444 
445			<script> 
446				$(document).ready(function() { 
447					var contentTags = $("#${randomNamespace}contentTagsList"); 
448					var tagsCarrets = $("#${randomNamespace}tagsCarret"); 
449			 
450					if(contentTags.overflown()) { 
451						tagsCarrets.removeClass("hidden"); 
452
453					 
454					tagsCarrets.click(function(){ 
455						if($(this).hasClass('fa-caret-down')){ 
456							$(this).removeClass('fa-caret-down'); 
457							$(this).addClass('fa-caret-up'); 
458						} else{ 
459							$(this).removeClass('fa-caret-up'); 
460							$(this).addClass('fa-caret-down'); 
461
462						if(this.parentElement.style.maxHeight == 'none' ){ 
463							this.parentElement.style.maxHeight = '6em'; 
464						} else{ 
465							this.parentElement.style.maxHeight = 'none'; 
466
467					}); 
468				}); 
469			</script>			 
470		</#if> 
471	</#if> 
472</#macro>