Nota de pesar pelo falecimento do desembargador Antônio Carlos Malheiros - MPSP - Escola
Um erro ocorreu enquanto processava o modelo.
?substring(...) argument #2 had invalid value: The index must be at least 0, but was -1. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign schoolURL = schoolURL?substri... [in template "20098#20124#37528137" at line 92, column 29] ----
1<#assign prefix = "mpsp"/>
2
3<#function getCategoryProperty categoryId, key, defaultValue="">
4 <#local categoryProperty = AssetCategoryPropService.fetchCategoryProperty(categoryId, key)! />
5 <#return categoryProperty?has_content?then(categoryProperty.getValue(), defaultValue) />
6</#function>
7
8<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
9<#assign AssetCategoryPropService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") />
10<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
11<#assign journalArticle = JournalArticleLocalService.getArticle(getterUtil.getLong(groupId),.vars['reserved-article-id'].data) />
12<#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") />
13<#assign schoolGroup = GroupLocalService.getGroup(user.getCompanyId(), "MPSP - Escola") />
14<#assign isSchool = themeDisplay.getScopeGroupId() != schoolGroup.getGroupId() />
15
16<#assign originalLocale = .locale>
17<#setting locale = localeUtil.getDefault()>
18<#assign publicationDate = .vars['reserved-article-display-date'].data />
19<#assign publicationDate = publicationDate?datetime("EEE, d MMM yyyy HH:mm:ss Z")>
20<#assign publicationDate_day = publicationDate?datetime?string["dd"] />
21<#assign publicationDate_month = dateUtil.getDate(publicationDate, "MMM", locale)?lower_case />
22<#assign publicationDate_year = publicationDate?datetime?string["yy"] />
23
24<#assign hasImage = (image.getData())?? && image.getData() != "" />
25<#assign imageUrl = hasImage?string(image.getData(), "")/>
26<#assign categories = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey()) />
27<#assign hasCategories = categories?has_content />
28<#assign viewURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() />
29
30<#if hasCategories>
31 <#assign category = categories[(categories?size-1)] />
32 <#assign categoryKey = category.name?lower_case />
33 <#assign categoryId = category.categoryId?long />
34 <#assign catColor = "#" + getCategoryProperty(categoryId,"color", "000000")/>
35 <#assign catIcon = "#" + getCategoryProperty(categoryId,"icon")/>
36</#if>
37
38<div class="${prefix}-display <#if !hasImage>${prefix}-display--no-image</#if>">
39
40 <#if hasImage>
41 <#if mostrar_banner?has_content && mostrar_banner.getData() == "sim">
42 <div class="${prefix}-page-heading__image ${prefix}-page-heading__image-web-content"
43 style="background-color: #ccc; background-image: url('${imageUrl}');"
44 alt='${image.getAttribute("alt")}'>
45
46 <div class="${prefix}-page-heading__content">
47
48 <div class="${prefix}-page-heading__breadcrumb">
49 <div class="p-3 p-md-5">
50 <@liferay.breadcrumbs />
51 </div>
52 </div>
53
54 <div class="${prefix}-page-heading__overlay">
55 </div>
56
57 </div>
58
59 </div>
60 <#else>
61 <div class="<#if isSchool>${prefix}-page-heading__image ${prefix}-page-heading__image-web-content"
62 style="background-color: #ccc; background-image: url('${imageUrl}');</#if>">
63 <div class="${prefix}-page-heading__content">
64 <div class="${prefix}-page-heading__breadcrumb">
65 <div class="p-3 p-md-5">
66 <@liferay.breadcrumbs />
67 </div>
68 </div>
69 <div class="${prefix}-page-heading__overlay"></div>
70 </div>
71 </div>
72 </#if>
73 </#if>
74
75
76 <div class="${prefix}-display__container">
77 <div class="${prefix}-display__header">
78 <div class="my-lg-0 mx-lg-auto mx-sm-4">
79
80 <#assign categoryName = "">
81 <#list categories as category>
82 <#assign categoryName = category.getName() />
83 <#assign categoryKey = categoryName?lower_case />
84 </#list>
85 <#assign hasCategories = categoryName?length gt 0 />
86
87 <#if hasCategories>
88
89 <#if !hasImage>
90 <div class="mb-6 ${prefix}-display__container w-100">
91 <#assign schoolURL = themeDisplay.getURLCurrent()?substring(themeDisplay.getURLCurrent()?index_of("/", 2) + 1) />
92 <#assign schoolURL = schoolURL?substring(0, schoolURL?index_of("/")) />
93 <img style="width: 94px;"
94 src="${themeDisplay.getURLPortal()}/webdav/${schoolURL}/document_library/icones-categorias/${catIcon}"
95 alt="Ícone da categoria ${categoryKey}"/>
96 </div>
97 </#if>
98
99 <div class="${prefix}-display__tag">
100 <#assign categoryKeyClass = categoryKey?replace(" ", "-") />
101 <style>
102 .${categoryKeyClass!""} {
103 padding-left: 12px;
104 }
105
106 .${categoryKeyClass!""}:before {
107 position: absolute;
108 content: "";
109 left: 0;
110 top: calc(50% - 3px);
111 width: 6px;
112 height: 6px;
113 border-radius: 3px;
114 background-color: ${catColor};
115 }
116
117 @media (min-width: 845px) {
118 .${categoryKeyClass!""} {
119 padding-left: 18px;
120 }
121
122 .${categoryKeyClass!""}:before {
123 top: calc(50% - 5px);
124 width: 10px;
125 height: 10px;
126 border-radius: 5px;
127 }
128 }
129 </style>
130 <span title="<@liferay.language key='${prefix}.category' /> ${category.name}"
131 class="${prefix}-category position-relative color-black text-uppercase ${categoryKeyClass!""}"
132 data-category-key="${categoryKey}">
133 ${categoryName}
134 </span>
135 </div>
136 </#if>
137
138 <h1>
139 ${title.getData()}
140 </h1>
141
142 <h4>
143 ${description.getData()}
144 </h4>
145
146 <div class="${prefix}-display__socialmedia">
147 <div class="${prefix}-display__socialmedia-date">
148 <svg
149 width="17"
150 height="16"
151 viewBox="0 0 17 16"
152 fill="none"
153 xmlns="http://www.w3.org/2000/svg"
154 >
155 <path
156 fill-rule="evenodd"
157 clip-rule="evenodd"
158 d="M0 8C0 3.58172 3.6249 0 8.09644 0C12.568 0 16.1929 3.58172 16.1929 8C16.1929 12.4183 12.568 16 8.09644 16C3.6249 16 0 12.4183 0 8ZM8.09644 1.53672C4.48384 1.53672 1.55525 4.43043 1.55525 8C1.55525 11.5696 4.48384 14.4633 8.09644 14.4633C11.709 14.4633 14.6376 11.5696 14.6376 8C14.6376 4.43043 11.709 1.53672 8.09644 1.53672ZM7.31882 9.67232V4.51977H8.87407V8.13559H11.6186V9.67232H7.31882Z"
159 fill="#C40008"
160 />
161 </svg>
162 <span class="${prefix}-display__socialmedia-date-span">${publicationDate_day} ${publicationDate_month} ${publicationDate_year}</span>
163 </div>
164
165 <div class="${prefix}-display__socialmedia-icons">
166
167 <div class="${prefix}-display__socialmedia-icons-spacement"
168 onclick="share('facebook', '${viewURL}')">
169 <svg width="12" height="21" viewBox="0 0 12 21" fill="none"
170 xmlns="http://www.w3.org/2000/svg">
171 <path d="M2.57027 20.5284H6.86139V11.9355H10.7278L11.1525 7.66546H6.86139V5.50942C6.86139 4.91694 7.3417 4.43664 7.93418 4.43664H11.1525V0.145508H7.93418C4.97177 0.145508 2.57027 2.54701 2.57027 5.50942V7.66546H0.424703L0 11.9355H2.57027V20.5284Z"
172 fill="#B9BDC1"/>
173 </svg>
174 </div>
175 <div class="${prefix}-display__socialmedia-icons-spacement"
176 onclick="share('twitter', '${viewURL}')">
177 <svg width="13" height="20" viewBox="0 0 13 20" fill="none"
178 xmlns="http://www.w3.org/2000/svg">
179 <path fill-rule="evenodd" clip-rule="evenodd"
180 d="M2.25103 0.145508C3.43599 0.145508 4.3966 1.10611 4.3966 2.29107V5.50942H10.8333C12.0182 5.50942 12.9789 6.47002 12.9789 7.65498C12.9789 8.83994 12.0182 9.80054 10.8333 9.80054H4.3966V11.9461C4.3966 13.7236 5.8375 15.1645 7.61494 15.1645H10.8333C12.0182 15.1645 12.9789 16.1251 12.9789 17.31C12.9789 18.495 12.0182 19.4556 10.8333 19.4556H7.61494C3.46757 19.4556 0.105469 16.0935 0.105469 11.9461V2.29107C0.105469 1.10611 1.06607 0.145508 2.25103 0.145508Z"
181 fill="#B9BDC1"/>
182 </svg>
183 </div>
184 <!-- div class="${prefix}-display__socialmedia-icons-spacement" onclick="share('instagram','${viewURL}')">
185 <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
186 <path fill-rule="evenodd" clip-rule="evenodd" d="M10 5.45455C7.48962 5.45455 5.45455 7.48962 5.45455 10C5.45455 12.5104 7.48962 14.5455 10 14.5455C12.5104 14.5455 14.5455 12.5104 14.5455 10C14.5455 7.48962 12.5104 5.45455 10 5.45455ZM7.27273 10C7.27273 11.5062 8.49377 12.7273 10 12.7273C11.5062 12.7273 12.7273 11.5062 12.7273 10C12.7273 8.49377 11.5062 7.27273 10 7.27273C8.49377 7.27273 7.27273 8.49377 7.27273 10Z" fill="#B9BDC1" />
187 <path d="M15.4545 3.63636C14.9525 3.63636 14.5455 4.04338 14.5455 4.54545C14.5455 5.04753 14.9525 5.45455 15.4545 5.45455C15.9566 5.45455 16.3636 5.04753 16.3636 4.54545C16.3636 4.04338 15.9566 3.63636 15.4545 3.63636Z" fill="#B9BDC1" />
188 <path fill-rule="evenodd" clip-rule="evenodd" d="M3.63636 0C1.62806 0 0 1.62806 0 3.63636V16.3636C0 18.3719 1.62806 20 3.63636 20H16.3636C18.3719 20 20 18.3719 20 16.3636V3.63636C20 1.62806 18.3719 0 16.3636 0H3.63636ZM16.3636 1.81818H3.63636C2.63221 1.81818 1.81818 2.63221 1.81818 3.63636V16.3636C1.81818 17.3678 2.63221 18.1818 3.63636 18.1818H16.3636C17.3678 18.1818 18.1818 17.3678 18.1818 16.3636V3.63636C18.1818 2.63221 17.3678 1.81818 16.3636 1.81818Z" fill="#B9BDC1" />
189 </svg>
190 </div -->
191 <div class="${prefix}-display__socialmedia-icons-spacement"
192 onclick="share('linkedin','${viewURL}')">
193 <svg width="21" height="21" viewBox="0 0 21 21" fill="none"
194 xmlns="http://www.w3.org/2000/svg">
195 <path d="M3.034 1.06641C1.59036 1.06641 0.646484 2.01437 0.646484 3.26034C0.646484 4.47879 1.56225 5.45379 2.97861 5.45379H3.006C4.47788 5.45379 5.39388 4.47879 5.39388 3.26034C5.36636 2.01437 4.47788 1.06641 3.034 1.06641Z"
196 fill="#B9BDC1"/>
197 <path d="M0.894531 7.1875H5.11489V19.8846H0.894531V7.1875Z" fill="#B9BDC1"/>
198 <path d="M15.4751 6.88965C13.1983 6.88965 11.6717 9.02903 11.6717 9.02903V7.18765H7.45117V19.8848H11.6714V12.7942C11.6714 12.4146 11.6989 12.0356 11.8104 11.7642C12.1155 11.0062 12.8098 10.2209 13.9758 10.2209C15.5029 10.2209 16.1137 11.3853 16.1137 13.0922V19.8848H20.3337V12.6045C20.3337 8.70447 18.2515 6.88965 15.4751 6.88965Z"
199 fill="#B9BDC1"/>
200 </svg>
201 </div>
202 <div class="${prefix}-display__socialmedia-icons-spacement"
203 onclick="share('whatsapp','${title.getData()} ${viewURL}')">
204 <svg width="23" height="23" viewBox="0 0 23 23" fill="none"
205 xmlns="http://www.w3.org/2000/svg">
206 <path fill-rule="evenodd" clip-rule="evenodd"
207 d="M19.1276 3.84157C17.1104 1.82193 14.4276 0.709192 11.5695 0.708008C5.68004 0.708008 0.886915 5.50101 0.884546 11.392C0.883757 13.2752 1.3757 15.1135 2.31077 16.7338L0.794922 22.2705L6.45916 20.7847C8.01988 21.636 9.77697 22.0847 11.5651 22.0852H11.5696C17.4583 22.0852 22.252 17.2918 22.2542 11.4006C22.2554 8.54547 21.1451 5.86108 19.1276 3.84157ZM11.5695 20.2807H11.5658C9.97227 20.2801 8.40944 19.8518 7.04573 19.0428L6.72158 18.8503L3.36034 19.7321L4.2575 16.4549L4.04627 16.1189C3.15727 14.7049 2.68783 13.0706 2.68862 11.3927C2.69046 6.49622 6.67447 2.5126 11.573 2.5126C13.9451 2.51339 16.1749 3.43833 17.8516 5.11698C19.5283 6.79562 20.4511 9.02689 20.4503 11.3999C20.4482 16.2967 16.4644 20.2807 11.5695 20.2807ZM16.4408 13.6295C16.1739 13.4957 14.8612 12.8501 14.6164 12.7608C14.3719 12.6717 14.1937 12.6274 14.0159 12.8946C13.8378 13.1617 13.3263 13.7632 13.1705 13.9412C13.0146 14.1194 12.8591 14.1418 12.592 14.0081C12.325 13.8745 11.4648 13.5925 10.445 12.6829C9.65142 11.975 9.11564 11.1008 8.95982 10.8336C8.80426 10.5662 8.95851 10.4356 9.07695 10.2887C9.36596 9.92985 9.65536 9.55358 9.74433 9.37552C9.83343 9.19732 9.78881 9.04137 9.72196 8.90779C9.65536 8.77421 9.12144 7.46011 8.89902 6.92539C8.68213 6.40501 8.46222 6.47529 8.29823 6.46713C8.14267 6.45937 7.96461 6.45779 7.78655 6.45779C7.60861 6.45779 7.31934 6.52451 7.07455 6.79194C6.82989 7.05923 6.14027 7.70503 6.14027 9.01913C6.14027 10.3332 7.09692 11.6027 7.23037 11.7809C7.36382 11.9591 9.11301 14.6557 11.7911 15.812C12.4281 16.0873 12.9253 16.2515 13.3131 16.3745C13.9527 16.5777 14.5346 16.549 14.9947 16.4803C15.5077 16.4036 16.5741 15.8344 16.7968 15.2108C17.0192 14.5872 17.0192 14.0527 16.9523 13.9412C16.8857 13.8299 16.7077 13.7632 16.4408 13.6295Z"
208 fill="#B9BDC1" stroke="#B9BDC1" stroke-width="0.3"/>
209 </svg>
210 </div>
211
212 </div>
213
214 </div>
215
216 </div>
217
218 </div>
219
220
221 <div class="${prefix}-display__newscontent">
222 ${content.getData()}
223 </div>
224
225
226 </div>
227
228</div>
229
230<!-- Related Links -->
231<#if relatedLink?? && relatedLink.relatedLinkTitle.getData()?has_content>
232 <#if relatedLink.getSiblings()?has_content>
233
234 <div class="mt-4 mb-5">
235 <div class="mpsp-section-title mb-5 w-100">
236 <h3>Links Relacionados:</h3>
237 </div>
238 <div class="mpsp-category-navigation d-flex flex-wrap mx-n3 my-n2">
239
240 <#list relatedLink.getSiblings() as cur_relatedLink>
241
242 <div class="mpsp-category-navigation__item d-md-flex flex-wrap mx-3 my-2">
243 <div class="text-center">
244 <a class="mpsp-button mpsp-button--red mpsp-button--outline text-spaced text-uppercase"
245 href="${cur_relatedLink.getData()}"
246 target="blank">${cur_relatedLink.relatedLinkTitle.getData()}</a>
247 </div>
248 </div>
249
250 </#list>
251
252 </div>
253 </div>
254
255 </#if>
256</#if>
257
258<!-- Related Files -->
259<#if relatedFile?? && relatedFile.relatedFileTitle.getData()?has_content>
260 <#if relatedFile.getSiblings()?has_content>
261
262 <div class="mt-5 mb-5">
263
264 <div class="mpsp-section-title mb-5 mt-4 w-100">
265 <h3>Arquivos Relacionados: </h3>
266 </div>
267 <div class="mpsp-category-navigation d-flex flex-wrap mx-n3 my-n2">
268
269 <#list relatedFile.getSiblings() as cur_relatedFile>
270
271 <div class="mpsp-category-navigation__item d-md-flex flex-wrap mx-3 my-2">
272
273 <div class="text-center">
274 <a class="mpsp-button mpsp-button--red mpsp-button--outline text-spaced text-uppercase"
275 href="${cur_relatedFile.getData()}&download=true"
276 target="_blank">${cur_relatedFile.relatedFileTitle.getData()}</a>
277 </div>
278
279 </div>
280
281 </#list>
282
283 </div>
284
285 </div>
286
287 </#if>
288</#if>
289
290
291</div>