Záznamy z jednání zastupitelstva Středočeského kraje
Agregátor obsahu
Agregátor obsahu
Při zpracování šablony došlo k chybě.
The following has evaluated to null or missing: ==> playlistitem.id.videoId [in template "10154#10192#19115628" at line 262, column 82] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${playlistitem.id.videoId} [in template "10154#10192#19115628" at line 262, column 80] ----
1<#-- Read custom properties from portal-ext.properties -->
2<#assign
3 youtubePlaylistId = propsUtil.get("youtube.playlist.key")
4 youtubePlaylistChannel = propsUtil.get("youtube.playlist.channelId")
5 youtubePlaylistPart = propsUtil.get("youtube.playlist.part")
6 youtubePlaylistMaxResults = propsUtil.get("youtube.playlist.maxResults")
7 youtubePlaylistOrder = propsUtil.get("youtube.playlist.order")
8/>
9
10
11<#setting url_escaping_charset='ISO-8859-1'>
12<style type="text/css">
13 .clear {
14 clear: both;
15 }
16</style>
17<#if request.getParameter("nextPageToken")?has_content>
18 <#assign playlistUrl = httpUtil.URLtoString("https://www.googleapis.com/youtube/v3/search?key=${youtubePlaylistId}&channelId=${youtubePlaylistChannel}&part=${youtubePlaylistPart}&order=${youtubePlaylistOrder}&maxResults=${youtubePlaylistMaxResults}&pageToken=${request.getParameter(\"nextPageToken\")}")>
19<#elseif request.getParameter("prevPageToken")?has_content>
20 <#assign playlistUrl = httpUtil.URLtoString("https://www.googleapis.com/youtube/v3/search?key=${youtubePlaylistId}&channelId=${youtubePlaylistChannel}&part=${youtubePlaylistPart}&order=${youtubePlaylistOrder}&maxResults=${youtubePlaylistMaxResults}&pageToken=${request.getParameter(\"prevPageToken\")}")>
21<#else>
22 <#assign playlistUrl = httpUtil.URLtoString("https://www.googleapis.com/youtube/v3/search?key=${youtubePlaylistId}&channelId=${youtubePlaylistChannel}&part=${youtubePlaylistPart}&order=${youtubePlaylistOrder}&maxResults=${youtubePlaylistMaxResults}")>
23</#if>
24<#assign playlist = jsonFactoryUtil.createJSONObject(playlistUrl)>
25<#attempt>
26 <#assign playlistjson = playlist?replace("\\\\u(....)", "&#x$1;", "r")?eval>
27<#recover>
28 <#--<#stop "Nelze nahrát playlist z youtube">-->
29</#attempt>
30
31
32<#--
33 * Pagination macros.
34 *
35 * The use of these macros requires either an model attribute called "paginationData" to be set or if you want to call
36 * it something else, or have more than one list of items that needs paginating, you can use the "bind" macro to set
37 * the current pagination data that subsequent calls to other macros will use.
38 *
39 * Either way, the pagination data object is expected to contain (at least) the following properties:
40 *
41 * pageNumber -> The current page number
42 * pageSize -> The number of items in each page
43 * pagesAvailable -> The total number of pages
44 * sortDirection -> The sorting direction (ascending or descending)
45 * sortField -> The field currently sorted by
46 *
47 *
48 * Page links consist of the current request url and a query string that looks like:
49 *
50 * ?field=&page=&size=&direction=
51 *
52 *
53 * Localization messages are looked up using the following keys:
54 *
55 * pagination.first -> Text for the first page link (default "� First")
56 * pagination.last -> Text for the last page link (default "Last �")
57 * pagination.next -> Text for the next page link (default "Next �")
58 * pagination.previous -> Text for the previous page link (default "� Previous")
59 * pagination.counter -> Text for the page counter (default "{0} of {1}")
60-->
61
62<#--
63 * Default pagination values
64-->
65<#if playlistjson?has_content>
66<#assign paginationDatajson = "{
67 \"pageNumber\": ${request.getParameter(\"page\")!0},
68 \"pageSize\": ${playlistjson.pageInfo.resultsPerPage},
69 \"pagesAvailable\": ${(playlistjson.pageInfo.totalResults/playlistjson.pageInfo.resultsPerPage)?ceiling},
70 \"sortDirection\": \"ASC\",
71 \"sortField\": \"date\"}"
72>
73<#assign paginationData = paginationDatajson?eval >
74
75<#--
76 * Assign the current data to the object called "paginationData" if set.
77-->
78<#if paginationData??>
79 <#assign data = paginationData />
80</#if>
81
82<#--
83 * Bind pagination data to the current data set these macros are using.
84-->
85<#macro bind paginationData>
86 <#assign data = paginationData />
87</#macro>
88
89<#--
90 * Outputs the first page link
91-->
92<#macro first>
93 <#if (data.pageNumber < 1)>
94 <#local classAttr = "class=\"disabled\"" />
95 <#else>
96 <#local classAttr = "" />
97 </#if>
98 <#local text>� First</#local>
99 <@page 0, text, classAttr/>
100</#macro>
101
102<#--
103 * Outputs the last page link
104-->
105<#macro last>
106 <#if (data.pageNumber >= data.pagesAvailable - 1)>
107 <#local classAttr = "class=\"disabled\"" />
108 <#else>
109 <#local classAttr = "" />
110 </#if>
111 <#local text>Last �</#local>
112 <@page data.pagesAvailable - 1, text, classAttr/>
113</#macro>
114
115<#--
116 * Outputs the next page link
117-->
118<#macro next>
119 <#if (data.pageNumber >= data.pagesAvailable - 1)>
120 <#local pageNumber = data.pageNumber />
121 <#local classAttr = "class=\"disabled\"" />
122 <#else>
123 <#local pageNumber = data.pageNumber + 1 />
124 <#local classAttr = "" />
125 </#if>
126 <#local text>Následující ></#local>
127 <@page pageNumber, text, classAttr, "next"/>
128</#macro>
129
130<#--
131 * Outputs the previous page link
132-->
133<#macro previous>
134 <#if (data.pageNumber < 1)>
135 <#local pageNumber = data.pageNumber />
136 <#local classAttr = "class=\"disabled\"" />
137 <#else>
138 <#local pageNumber = data.pageNumber - 1 />
139 <#local classAttr = "" />
140 </#if>
141 <#local text>< Předchozí</#local>
142 <@page pageNumber, text, classAttr, "previous"/>
143</#macro>
144
145<#--
146 * Outputs the page numbers and links
147 *
148 * @param maxPages (Optional) The maximum number of page links to show
149 * @param separator (Optional) The separator between page links
150-->
151<#macro numbers maxPages = 9 separator = " | ">
152 <#local pagesBefore = (maxPages / 2)?floor />
153 <#local pagesAfter = (maxPages / 2)?floor />
154 <#if maxPages % 2 == 0>
155 <#local pagesBefore = pagesBefore - 1 />
156 </#if>
157 <#local pageNumMin = data.pageNumber - pagesBefore />
158 <#local pageNumMax = data.pageNumber + pagesBefore />
159 <#if (pageNumMin < 0)>
160 <#local pageNumMax = pageNumMax + (0 - pageNumMin) />
161 <#local pageNumMin = 0 />
162 </#if>
163 <#if (pageNumMax >= data.pagesAvailable)>
164 <#local pageNumMin = pageNumMin - (pageNumMax - data.pagesAvailable) />
165 <#local pageNumMax = data.pagesAvailable - 1 />
166 <#if (pageNumMin < 0)>
167 <#local pageNumMin = 0 />
168 </#if>
169 <#if (pageNumMax < 0)>
170 <#local pageNumMax = 0 />
171 </#if>
172 </#if>
173 <#list pageNumMin..pageNumMax as pageNumber>
174 <#if pageNumber == data.pageNumber>
175 <#local classAttr = "class=\"selected\"" />
176 <#else>
177 <#local classAttr = "" />
178 </#if>
179 <@page pageNumber, "", classAttr/><#if pageNumber_has_next>${separator}</#if>
180 </#list>
181</#macro>
182
183<#--
184 * Outputs a link to a specific page.
185 *
186 * @param pageNumber To page number ot link to
187 * @param text (Optional) The link text (Defaults to page number if not set)
188 * @param attributes (Optional) Any HTML attributes to add to the element
189-->
190<#macro page pageNumber text = "" attributes = "" youtubePagination = "">
191 <#if text == "">
192 <#local text = (pageNumber + 1)?string />
193 </#if>
194 <#if (attributes != "" && attributes?starts_with(" ") == false)>
195 <#local attributes = " " + attributes />
196 </#if>
197 <#if youtubePagination == "next">
198 <a href="?field=${data.sortField?url}&page=${pageNumber}&size=${data.pageSize}&direction=${data.sortDirection?url}&nextPageToken=${playlistjson.nextPageToken!0}"${attributes}>${text?html}</a>
199 <#elseif youtubePagination == "previous">
200 <a href="?field=${data.sortField?url}&page=${pageNumber}&size=${data.pageSize}&direction=${data.sortDirection?url}&prevPageToken=${playlistjson.prevPageToken!0}"${attributes}>${text?html}</a>
201 <#else>
202 <a href="?field=${data.sortField?url}&page=${pageNumber}&size=${data.pageSize}&direction=${data.sortDirection?url}"${attributes}>${text?html}</a>
203 </#if>
204</#macro>
205
206<#macro if if then else=""><#if if>${then}<#else>${else}</#if></#macro>
207
208<#--
209 * Outputs the current page number and the total pages
210-->
211<#macro counter>
212 <#if data.pagesAvailable == 0>
213 <#local pagesAvailable = 1 />
214 <#else>
215 <#local pagesAvailable = data.pagesAvailable />
216 </#if>
217 Zobrazeno ${data.pageNumber*data.pageSize+1} až <@if ((data.pageNumber+1)*data.pageSize < playlistjson.pageInfo.totalResults) ""+((data.pageNumber+1)*data.pageSize) ""+(playlistjson.pageInfo.totalResults) /> z celkem ${playlistjson.pageInfo.totalResults} záznamů
218</#macro>
219
220<#--
221 * Outputs a link to sort by a field.
222 * @param field The field to sort by. If field is different to the current sort field, the link will change the sort
223 * field but not the sort direction. If the field is the same as the current sort field, the link will change the sort
224 * direction.
225 * @param text (Optional) The link text. If no text is specified the field name is used with a upper case first letter.
226 * @param attributes (Optional) Any HTML attributes to add to the element
227 * @param directions (Optional) An array of two items. The words being used in data.sortDirection to describe
228 * the sorting direction of ascending or descending. Default: ["Asc", "Desc"]. So we can compare the current sorting
229 * direction and switch to the converse.
230-->
231<#macro sort field text = "" attributes = "" directions = ["Asc", "Desc"]>
232 <#if field == data.sortField>
233 <#-- Change sort direction -->
234 <#if data.sortDirection?lower_case == directions[0]?lower_case>
235 <#local direction = directions[1] />
236 <#else>
237 <#local direction = directions[0] />
238 </#if>
239 <#else>
240 <#-- Change sort field (leave sort direction) -->
241 <#local direction = data.sortDirection />
242 </#if>
243 <#if text == "">
244 <#local text = field?cap_first />
245 </#if>
246 <#if (attributes != "" && attributes?starts_with(" ") == false)>
247 <#local attributes = " " + attributes />
248 </#if>
249 <a href="?field=${field?url}&page=${data.pageNumber}&size=${data.pageSize}&direction=${direction?url}"${attributes}>${text?html}</a>
250</#macro>
251<main class="gov-page video-list">
252 <div>
253 <div class="video-list">
254 <#list playlistjson.items as playlistitem>
255 <#if (playlistitem.snippet.thumbnails)?? && (playlistitem.snippet.thumbnails.medium)?? >
256 <#assign snippetThumbnailUrl = "${playlistitem.snippet.thumbnails.medium.url}" />
257 <#elseif (cur_Carousel.getTitle(locale))??/>
258 <#assign snippetThumbnailUrl = "" />
259 </#if>
260
261 <div>
262 <a href="https://www.youtube.com/embed/${playlistitem.id.videoId}" data-type="youtube" data-id="${playlistitem.id.videoId}" class="lightbox" title="${playlistitem.snippet.title}">
263 <img alt="${playlistitem.snippet.title}" height="150" src="${snippetThumbnailUrl}" width="260" />
264 </a>
265 <p>${playlistitem.snippet.title}</p>
266 </div>
267 </#list>
268 </div>
269 </div>
270</main>
271<#--<div class="clear" />
272<nav style="float:right;">
273 <@previous />
274 <@next />
275</nav>-->
276<@counter />
277<div class="clear" />
278<#else>
279<main class="gov-page video-list">
280 <div>
281 <div class="video-list">
282 Nelze nahrát video playlist z youtube
283 </div>
284 </div>
285</main>
286</#if>
Ze Středozemě - IE
Středočeské noviny
Středočeský magazín
Galerie videa
Titulek 1
Záznam ze 14. jednání zastupitelstva Středočeského kraje ze dne 28.03.2022
Záznam ze 14. jednání zastupitelstva Středočeského kraje ze dne 28.03.2022
Záznam ze 14. jednání zastupitelstva Středočeského kraje ze dne 28.03.2022
Záznam ze 14. jednání zastupitelstva Středočeského kraje ze dne 28.03.2022