1<#assign cesServicesLocalService = serviceLocator.findService("pt.ama.bde.service.db.entities.service.CESServiceBDELocalService")>
2<#assign serviceCode = cesServicesLocalService.getServiceByLayoutUuid(themeDisplay.getLayout().getUuid())/>
3
4<#assign ccaService = serviceLocator.findService("pt.ama.service.cca.api.CCAService")>
5
6<#assign hasOnline = false />
7<#if RealizarOnline?? && RealizarOnline.getData()?? && RealizarOnline.getData() != "" >
8 <#assign hasOnline = true />
9</#if>
10<#assign hasPres = false />
11<#if RealizarPresencialmente?? && RealizarPresencialmente.getData()?? && RealizarPresencialmente.getData() != "" >
12 <#assign hasPres = true />
13</#if>
14
15<#assign hasPhone = false />
16<#if phone?? && phone.phonetitle?? && phone.phonetitle.getData()?? && phone.phonetitle.getData() != "" >
17 <#assign hasPhone = true />
18</#if>
19<#assign hasVideo = false />
20<#if video?? && video.videotitle?? && video.videotitle.getData()?? && video.videotitle.getData() != "" >
21 <#assign hasVideo = true />
22</#if>
23
24
25<#if hasOnline || hasPres> <#-- existe pelo menos 1 canal de atendimento -->
26 <section class="blocoLateral ept-list--channels ept-mt--l">
27 <h2 class="ept-heading2 d-none d-lg-block ept-pl--s ept-fds__heading"><@liferay.language key="pt.ama.bde.ces.fichaservico.canais.title" /></h2>
28 <div class="ept-list--acc accordion d-flex flex-row ept-mt--m" id="eptChannelsAcc">
29 <#-- menu list for desktop only -->
30 <div class="ept-sep d-none d-lg-block"></div>
31 <ul class="ept-list list-unstyled d-none d-lg-block ept-channels__left">
32 <#-- Alterar online -->
33 <#if hasOnline>
34 <li>
35 <a class="ept-list__item ept-list__link" id="eptAccOnlineDesk" data-toggle="collapse" href="#eptAccOnlineContent" role="button" aria-expanded="true" aria-controls="eptAccOnlineContent">${RealizarOnline.getData()}</a>
36 </li>
37 </#if>
38 <#-- Alterar presencialmente -->
39 <#if hasPres>
40 <li>
41 <a class="ept-list__item ept-list__link" id="eptAccPresDesk" data-toggle="collapse" href="#eptAccPresContent" role="button" aria-expanded="false" aria-controls="eptAccPresContent">${RealizarPresencialmente.getData()}</a>
42 </li>
43 </#if>
44
45 <#if hasPhone>
46 <li>
47 <a class="ept-list__item ept-list__link" id="eptAccPhoneDesk" data-toggle="collapse" href="#eptAccPhoneContent" role="button" aria-expanded="false" aria-controls="eptAccPhoneContent">${phone.phonetitle.getData()}</a>
48 </li>
49 </#if>
50
51 <#if hasVideo>
52 <li>
53 <a class="ept-list__item ept-list__link" id="eptAccVideoDesk" data-toggle="collapse" href="#eptAccVideoContent" role="button" aria-expanded="false" aria-controls="eptAccVideoContent">${video.videotitle.getData()}</a>
54 </li>
55 </#if>
56 </ul>
57 <#-- menu list for desktop only -->
58 <ul class="ept-list list-unstyled ept-channels__right">
59 <#-- Alterar online -->
60 <#if hasOnline>
61 <li>
62 <a class="ept-list__item ept-list__link d-lg-none" id="eptAccOnline" data-toggle="collapse" href="#eptAccOnlineContent" role="button" aria-expanded="true" aria-controls="eptAccOnlineContent">
63 ${RealizarOnline.getData()}
64 <svg class="icon36 ept-list__icon--closed" aria-hidden="true" focusable="false">
65 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_baixo"></use>
66 </svg>
67 <svg class="icon36 ept-list__icon--open" aria-hidden="true" focusable="false">
68 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_cima"></use>
69 </svg>
70 </a>
71 <div id="eptAccOnlineContent" class="ept-channels__cont collapse show" aria-labelledby="eptAccOnline" data-parent="#eptChannelsAcc">
72 <#if discservice?? && discservice.getData()?? && discservice.getData() != "">
73 <div class="ept-channels__info checkedlist d-flex flex-row ept-mb--s">
74 <svg class="icon36 ept-channels__icon" aria-hidden="true" focusable="false">
75 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#info"></use>
76 </svg>
77 <div>${discservice.getData()}</div>
78 </div>
79 </#if>
80 <div>
81 <#if externalUrl?? && externalUrl.getData()?has_content >
82 <form action="${externalUrl.getData()}" method="POST">
83 <button type="submit" class="ept-btn ept-btn--wicon-r ept-mb--m">
84 <#if titulobotao?? && titulobotao.getData()?has_content >
85 ${titulobotao.getData()}
86 <#else>
87 <@liferay.language key="pt.ama.bde.ces.fichaservico.blocoLateral.realizarAgora" />
88 </#if>
89 <svg class="icon36" aria-hidden="true" focusable="false">
90 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_direita"></use>
91 </svg>
92 </button>
93 </form>
94 <#elseif serviceCode?? && serviceCode.serviceUrl?has_content> <!-- Realizar Agora -->
95 <#if serviceCode.serviceUrl?contains ("http") && !serviceCode.serviceUrl?contains ("https://pmsp.digital.gov.pt") && !serviceCode.serviceUrl?contains ("https://pmsp.eportugal.gov.pt")>
96 <form action="${serviceCode.serviceUrl}" method="POST">
97 <#else>
98 <form action="https://area-reservada.digital.gov.pt/fundacoes-form" method="POST">
99 <input type="hidden" name="serviceCode" value="${serviceCode.cesCode}">
100 <input type="hidden" id="varFillAuthorityLocationBasket" name="varFillAuthorityLocationBasket" value="">
101 </#if>
102 <button type="submit" class="ept-btn ept-btn--wicon-r ept-mb--m">
103 <#if titulobotao?? && titulobotao.getData()?has_content >
104 ${titulobotao.getData()}
105 <#else>
106 <@liferay.language key="pt.ama.bde.ces.fichaservico.blocoLateral.realizarAgora" />
107 </#if>
108 <svg class="icon36" aria-hidden="true" focusable="false">
109 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_direita"></use>
110 </svg>
111 </button>
112 </form>
113 </#if>
114 </div>
115 <!-- Ir para Simulador -->
116
117 <button type="button" class="ept-btn ept-btn--wicon-r" id="gotoSOEP" onClick="gotoSOEP()">
118 <@liferay.language key="pt.ama.bde.ces.fichaservico.blocoLateral.gotoSOEP" />
119 <svg class="icon36" aria-hidden="true" focusable="false">
120 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_direita"></use>
121 </svg>
122 </button>
123 </div>
124 </li>
125 </#if>
126 <#-- Alterar presencialmente -->
127 <#if hasPres>
128 <li>
129 <a class="ept-list__item ept-list__link d-lg-none" id="eptAccPres" data-toggle="collapse" href="#eptAccPresContent" role="button" aria-expanded="false" aria-controls="eptAccPresContent">
130 ${RealizarPresencialmente.getData()}
131 <svg class="icon36 ept-list__icon--closed" aria-hidden="true" focusable="false">
132 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_baixo"></use>
133 </svg>
134 <svg class="icon36 ept-list__icon--open" aria-hidden="true" focusable="false">
135 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_cima"></use>
136 </svg>
137 </a>
138 <div id="eptAccPresContent" class="ept-list__content collapse" aria-labelledby="eptAccPres" data-parent="#eptChannelsAcc">
139 <#if bacaoAtendimento?? && bacaoAtendimento.getData()?? && bacaoAtendimento.getData() != "">
140 <h3 class="ept-heading4">${bacaoAtendimento.getData()}</h3>
141 <#if ConteudoBalcaoatendimento?? && ConteudoBalcaoatendimento.getData()?? && ConteudoBalcaoatendimento.getData() != "">
142 <div class="ept-mt--s checkedlist">
143 ${ConteudoBalcaoatendimento.getData()}
144 </div>
145 </#if>
146 </#if>
147 <#if espacoempresa?? && espacoempresa.getData()?? && espacoempresa.getData() != "">
148 <#if bacaoAtendimento?? && bacaoAtendimento.getData()?? && bacaoAtendimento.getData() != "">
149 <h3 class="ept-heading4 ept-mb--m">
150 <#else>
151 <h3 class="ept-heading4">
152 </#if>
153 ${espacoempresa.getData()}
154 </h3>
155 <#if ConteudoEspacoempresa?? && ConteudoEspacoempresa.getData()?? && ConteudoEspacoempresa.getData() != "">
156 <div class="ept-mt--s checkedlist">
157 ${ConteudoEspacoempresa.getData()}
158 </div>
159 </#if>
160 </#if>
161 </div>
162 </li>
163 </#if>
164 <#if hasPhone>
165 <li>
166 <a class="ept-list__item ept-list__link d-lg-none" id="eptAccPhone" data-toggle="collapse" href="#eptAccPhoneContent" role="button" aria-expanded="false" aria-controls="eptAccPhoneContent">
167 ${phone.phonetitle.getData()}
168 <svg class="icon36 ept-list__icon--closed" aria-hidden="true" focusable="false">
169 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_baixo"></use>
170 </svg>
171 <svg class="icon36 ept-list__icon--open" aria-hidden="true" focusable="false">
172 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_cima"></use>
173 </svg>
174 </a>
175 <div id="eptAccPhoneContent" class="ept-list__content collapse" aria-labelledby="eptAccPhone" data-parent="#eptChannelsAcc">
176
177 <div class="ept-channels__info checkedlist d-flex flex-row ept-mb--s">
178 <svg class="icon36 ept-channels__icon" aria-hidden="true" focusable="false">
179 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#info"></use>
180 </svg>
181 <div>${phone.phonedesc.getData()}</div>
182 </div>
183
184 <a class="ept-btn ept-btn--wicon-r ept-btn--link ept-mb--m" href="tel: ${phone.phonebuttonname.phoneurl.getData()}">
185
186 ${phone.phonebuttonname.getData()}
187
188 <svg class="icon36" aria-hidden="true" focusable="false">
189 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_direita"></use>
190 </svg>
191 </a>
192
193 </div>
194 </li>
195 </#if>
196 <#if hasVideo>
197 <input type="hidden" id="cesCodeVideoTemplate_var" name="cesCodeVideoTemplate_var" value="">
198 <li>
199 <a class="ept-list__item ept-list__link d-lg-none" id="eptAccVideo" data-toggle="collapse" href="#eptAccVideoContent" role="button" aria-expanded="false" aria-controls="eptAccVideoContent">
200 ${video.videotitle.getData()}
201 <svg class="icon36 ept-list__icon--closed" aria-hidden="true" focusable="false">
202 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_baixo"></use>
203 </svg>
204 <svg class="icon36 ept-list__icon--open" aria-hidden="true" focusable="false">
205 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_cima"></use>
206 </svg>
207 </a>
208 <div id="eptAccVideoContent" class="ept-list__content collapse" aria-labelledby="eptAccVideo" data-parent="#eptChannelsAcc">
209
210 <div class="ept-channels__info checkedlist d-flex flex-row ept-mb--s">
211 <svg class="icon36 ept-channels__icon" aria-hidden="true" focusable="false">
212 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#info"></use>
213 </svg>
214 <div>${video.videodesc.getData()}</div>
215 </div>
216
217 <button id="buttonvideo" type="button" class="ept-btn ept-btn--wicon-r ept-mb--m">
218 ${video.videobuttonname.getData()}
219 <svg class="icon36" aria-hidden="true" focusable="false">
220 <use xlink:href="${themeDisplay.getPathThemeImages()}/redesign/icons/sprite.svg#seta_direita"></use>
221 </svg>
222 </button>
223
224
225 </div>
226 </li>
227 </#if>
228 </ul>
229 </div>
230 </section>
231</#if>
232
233<script>
234 $( document ).ready(function() {
235 $("#buttonvideo").on("click", function(e) {
236 $("#cesCodeVideoTemplate_var").val('${serviceCode.cesCode}');
237 wa.openVideocallWindow();
238 });
239 });
240</script>