Imprensa
Fechar
Buscas recentes
Links rápidos
Um erro ocorreu enquanto processava o modelo.
Java method "com.sun.proxy.$Proxy1092.getTaxonomyVocabularyTaxonomyCategoriesPage(Long, Boolean, String, com.liferay.portal.vulcan.aggregation.Aggregation, com.liferay.portal.kernel.search.filter.Filter, com.liferay.portal.vulcan.pagination.Pagination, com.liferay.portal.kernel.search.Sort[])" takes 7 arguments, but 6 was given. ---- FTL stack trace ("~" means nesting-related): - Failed at: categories = taxonomyCategoryResource... [in template "44549#44620#98653" at line 75, column 3] ----
1<#assign
2 structuredContentResource = resourceLocator.locate("/headless-delivery/v1.0", "StructuredContent")
3 vocabularyResource = resourceLocator.locate("/headless-admin-taxonomy/v1.0", "TaxonomyVocabulary")
4 taxonomyCategoryResource = resourceLocator.locate("/headless-admin-taxonomy/v1.0", "TaxonomyCategory")
5/>
6
7<#function getVocabularyCategoriesIds vocabularyEnName vocabularyPtName>
8 <#local filter>
9 name eq '${vocabularyEnName}' or name eq '${vocabularyPtName}'
10 </#local>
11 <#local
12 vocabulary = vocabularyResource.getSiteTaxonomyVocabulariesPage(
13 groupId, null, null, vocabularyResource.toFilter(filter), null, null).getItems()?first
14 vocabularyId = vocabulary.getId()
15
16 categories = taxonomyCategoryResource
17 .getTaxonomyVocabularyTaxonomyCategoriesPage(vocabularyId, null, null, null, null, null).getItems()
18 />
19 <#return categories?map(category -> category.getId()?number)/>
20</#function>
21
22<#function getPressTopicsFilterEndpoint structuredContent>
23 <#local
24 structuredContentCategoriesIds = structuredContent.getTaxonomyCategoryBriefs()
25 ?map(taxonomyCategoryBrief -> taxonomyCategoryBrief.getTaxonomyCategoryId())
26
27 pressTopicsCategoriesId = getVocabularyCategoriesIds("Press topics", "Temas de imprensa")
28 categoryId = structuredContentCategoriesIds?filter(c -> pressTopicsCategoriesId?seq_contains(c))?first
29 />
30 <#return "/-/categories/" + categoryId/>
31</#function>
32
33<#function getCustomDisplayPageUrl structuredContent>
34 <#local
35 structuredContentFields = structuredContent.getContentFields()
36 customDisplayPageField = structuredContentFields?filter(f -> f.getName() == "customDisplayPage")?first
37 />
38 <#return customDisplayPageField.getContentFieldValue().getLink()/>
39</#function>
40
41<#function getPressViewUrl structuredContent>
42 <#local
43 friendlyUrl = "/w/" + structuredContent.getFriendlyUrlPath()
44
45 categoryFilterEndpoint = getPressTopicsFilterEndpoint(structuredContent)
46 customDisplayPageUrl = getCustomDisplayPageUrl(structuredContent)!""
47 />
48 <#return customDisplayPageUrl?has_content?then(customDisplayPageUrl, friendlyUrl) + categoryFilterEndpoint/>
49</#function>
50
51<#assign images_path = "/documents/d/guest/" />
52<#assign total = searchContainer.getTotal() />
53<#assign start = searchContainer.getStart() />
54<#assign delta = searchContainer.getDelta() />
55<#assign totalPages = (total/delta)?ceiling />
56<#assign currentPage = ((start+1)/delta)?ceiling />
57<#assign isFirstPage = currentPage == 1 />
58<#assign isLastPage = currentPage == totalPages />
59<#assign iteratorURL = searchContainer.getIteratorURL().toString() />
60<#assign iteratorURL += iteratorURL?contains("?")?then("", "?") />
61<#assign firstPageURL = iteratorURL + '&start=1'/>
62<#assign lastPageURL = iteratorURL + '&start=' + totalPages?string/>
63<#assign previousURL = iteratorURL + '&start=' + (currentPage - 1)?string />
64<#assign nextURL = iteratorURL + '&start=' + (currentPage + 1)?string />
65
66<#assign startPage = (currentPage < 3)?then(1, currentPage - 1) />
67<#assign endPage = 2 + startPage />
68<#assign endPage = (totalPages < endPage)?then(totalPages, endPage) />
69<#assign diff = startPage - endPage + 2 />
70<#assign startPage -= (startPage - diff > 0)?then(diff, 0) />
71
72<#assign
73 vocabulariesPage = vocabularyResource.getSiteTaxonomyVocabulariesPage(groupId, null, null, vocabularyResource.toFilter("name eq 'Press topics' or name eq 'Temas de imprensa'"), null, null)
74 vocabularyId = vocabulariesPage.getItems()[0].getId()
75 categories = taxonomyCategoryResource.getTaxonomyVocabularyTaxonomyCategoriesPage(vocabularyId, null, null, null, null, null).getItems()
76 categoriesIds = categories?map(cat -> cat.getId())
77/>
78
79<div class="vale-widget-resultados-busca-imprensa">
80 <div class="d-sm-flex justify-content-between flex-wrap">
81 <#if entries?has_content >
82 <#list entries as entry >
83 <#if entry.getTitle()?has_content >
84 <#assign
85 structuredContent = structuredContentResource.getStructuredContent(entry.getClassPK())
86 url = getPressViewUrl(structuredContent)
87 structuredContentDataField = structuredContent.getContentFields()?filter(
88 field -> field.name == "data"
89 )?first
90 data = structuredContentDataField.getContentFieldValue().getData()?datetime.iso
91 date_localized = dateUtil.formatDate("yyyyMMdd", data?string("yyyyMMdd"), locale)
92 taxonomyCategory = structuredContent.getTaxonomyCategoryBriefs()?filter(
93 category -> categoriesIds?seq_contains(category.getTaxonomyCategoryId()?string)
94 )?first
95 categoryName = taxonomyCategory.getTaxonomyCategoryName()
96 />
97 <a class="text-decoration-none" href="${url}">
98 <div
99 class="box d-flex mb-6"
100 >
101 <div class="yellow-bar h-100"></div>
102 <div
103 class=" d-flex flex-column justify-content-between h-100 p-3 overflow-hidden"
104 >
105 <div>
106 <p class="font-weight-medium text-verde-aqua mb-2">${categoryName}</p>
107 <p class="title text-verde-vale">${entry.getHighlightedTitle()}</p>
108 </div>
109 <p class="texto-sm text-cinza-escuro">
110 ${date_localized}
111 </p>
112 </div>
113 </div>
114 </a>
115 </#if>
116 </#list>
117 </#if>
118 </div>
119 <div class="line-divider"></div>
120 <div class="pagination d-flex justify-content-center my-5">
121 <a
122 class="pagination-option text-decoration-none mr-sm-5 ${isFirstPage?then('disabled', '')}"
123 href="${previousURL}"
124 disabled="${isFirstPage?string}"
125 >
126 <img
127 class="btn btn-primary border-amarelo-vale bg-amarelo-vale mr-2 p-1 rounded-circle"
128 src="${images_path}seta-2-esq_bra"
129 alt="button-prev"
130 />
131 <span class="btn btn-link text-amarelo-vale p-0 d-none d-sm-inline">
132 <@liferay.language key="previous" />
133 </span>
134 </a>
135
136 <#if (startPage > 1)>
137 <a
138 class="mr-2"
139 href="${firstPageURL}"
140 >
141 <span
142 class="pagination-item btn btn-primary p-1 rounded-circle"
143 alt="first-page-button"
144 >1
145 </span>
146 </a>
147 <#if currentPage != 3>
148 <span class="elipsis h-100 mt-auto mr-2">...</span>
149 </#if>
150 </#if>
151
152 <#list startPage..endPage as i>
153 <a
154 class="mr-2 ${(i == currentPage)?then('disabled', '')}"
155 href="${iteratorURL + '&start=' + i?string}"
156 >
157 <span
158 class="pagination-item ${(currentPage == i)?then('is-active', '')} btn btn-primary p-1 rounded-circle"
159 alt="first-page-button"
160 >${i}
161 </span>
162 </a>
163 </#list>
164
165 <#if (endPage < totalPages)>
166 <#if currentPage != totalPages - 2>
167 <span class="elipsis h-100 mt-auto mr-2">...</span>
168 </#if>
169 <a
170 class="mr-2"
171 href="${lastPageURL}"
172 >
173 <span
174 class="pagination-item btn btn-primary p-1 rounded-circle"
175 alt="last-page-button"
176 >${totalPages}
177 </span>
178 </a>
179 </#if>
180
181 <a
182 class="pagination-option text-decoration-none ml-sm-5 ${isLastPage?then('disabled', '')}"
183 href="${nextURL}"
184 disabled="${isLastPage?string}"
185 >
186 <span class="btn btn-link text-amarelo-vale mr-2 p-0 d-none d-sm-inline">
187 <@liferay.language key="next" />
188 </span>
189 <img
190 class="btn btn-primary border-amarelo-vale bg-amarelo-vale p-1 rounded-circle"
191 src="${images_path}seta-2-dir_bra"
192 alt="button-next"
193 />
194 </a>
195 </div>
196</div>
197
198<style>
199 .vale-widget-resultados-busca-imprensa .box {
200 background-image: url("/documents/d/guest/box-flutuante_com-borda");
201 background-size: cover;
202 aspect-ratio: 65/37;
203 width: 21.5625rem;
204}
205
206.vale-widget-resultados-busca-imprensa .yellow-bar {
207 background-color: var(--amarelo-vale);
208 flex-basis: 20px;
209 flex-grow: 0;
210 flex-shrink: 0;
211}
212
213.vale-widget-resultados-busca-imprensa .pagination img {
214 width: 2.03125rem;
215}
216
217.vale-widget-resultados-busca-imprensa .pagination-item {
218 color: var(--cinza-escuro);
219 background-color: var(--branco);
220 border: 2px solid var(--cinza-escuro);
221 line-height: 1.30625rem;
222 opacity: 0.6;
223 width: 2.03125rem;
224 height: 2.03125rem;
225}
226
227.vale-widget-resultados-busca-imprensa .pagination-item:hover {
228 box-shadow: 0px 0px 6px #55555594;
229}
230
231.vale-widget-resultados-busca-imprensa .pagination-item.is-active {
232 color: var(--branco);
233 background-color: var(--amarelo-vale);
234 border-color: var(--amarelo-vale);
235 opacity: 1;
236}
237
238.vale-widget-resultados-busca-imprensa .pagination-item.is-active:hover {
239 box-shadow: 0px 0px 6px #ecb11f94;
240}
241
242.vale-widget-resultados-busca-imprensa .title {
243 display: -webkit-box;
244 line-clamp: 3;
245 overflow: hidden;
246 -webkit-line-clamp: 3;
247 -webkit-box-orient: vertical;
248}
249
250.vale-widget-resultados-busca-imprensa .elipsis {
251 opacity: 0.6;
252}
253
254.vale-widget-resultados-busca-imprensa ~ form .pagination-bar {
255 display: none;
256}
257
258.vale-widget-resultados-busca-imprensa .pagination .disabled {
259 pointer-events: none;
260}
261
262.vale-widget-resultados-busca-imprensa .pagination .pagination-option.disabled {
263 opacity: 0.5;
264}
265
266.line-divider {
267 background-color: var(--cinza-escuro);
268 color: var(--cinza-escuro);
269 height: 1px;
270 width: 100%;
271 opacity: 0.2;
272}
273
274@media screen and (max-width: 992px) {
275 .vale-widget-resultados-busca-imprensa .box {
276 width: 20.625rem;
277 }
278}
279
280@media screen and (max-width: 768px) {
281 .vale-widget-resultados-busca-imprensa .box {
282 width: 15.625rem;
283 }
284
285 .vale-widget-resultados-busca-imprensa .title {
286 line-clamp: 2;
287 -webkit-line-clamp: 2;
288 }
289
290 .vale-widget-resultados-busca-imprensa .yellow-bar {
291 flex-basis: 10px;
292 }
293}
294
295@media screen and (max-width: 576px) {
296 .vale-widget-resultados-busca-imprensa .box {
297 width: 100%;
298 }
299
300 .vale-widget-resultados-busca-imprensa .title {
301 line-clamp: 3;
302 -webkit-line-clamp: 3;
303 }
304}
305
306</style>
Veja também
Reparação
Nosso compromisso na reparação das comunidades e pessoas impactadas pelo rompimento da barragem B1 é constante. Veja as ações sociais, ambientais e de segurança tomadas pela Vale.