1 | <?xml version="1.0"?> |
---|
2 | <dbx:transform |
---|
3 | xmlns:dbx="http://www.windhouwer.nl/sloot/dbx" |
---|
4 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
---|
5 | xmlns:cat="http://www.isocat.org/" |
---|
6 | > |
---|
7 | <dbx:param name="login"/> |
---|
8 | <dbx:param name="view"/> |
---|
9 | <dbx:param name="props"/> |
---|
10 | |
---|
11 | <dbx:process> |
---|
12 | <cat:workspace user="{$login}"> |
---|
13 | <dbx:choose> |
---|
14 | <dbx:when test="$login!='guest'"> |
---|
15 | <dbx:for-each table="core_user"> |
---|
16 | <dbx:where field="login" select="$login" type="string"/> |
---|
17 | <dbx:variable name="user" field="id"/> |
---|
18 | <cat:private href="{string($props//site)}rest/user/{$login}/private"> |
---|
19 | <dbx:for-each table="core_data_category_selection"> |
---|
20 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
21 | <dbx:sort field="name" function="upper"/> |
---|
22 | <cat:dcs> |
---|
23 | <dbx:attribute name="id" field="id"/> |
---|
24 | <dbx:attribute name="name" field="name"/> |
---|
25 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
26 | <dbx:attribute name="mode" value="ru"/> |
---|
27 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
28 | </cat:dcs> |
---|
29 | </dbx:for-each> |
---|
30 | <dbx:for-each table="core_dcr_board" min="1" max="1"> |
---|
31 | <dbx:variable name="gname" field="name"/> |
---|
32 | <dbx:for-each table="link_group_members" min="0" max="1"> |
---|
33 | <dbx:where field="group" select="$current/id" type="integer"/> |
---|
34 | <dbx:where field="member" select="$user" type="integer"/> |
---|
35 | <dbx:where field="role" value="chair" type="string"/> |
---|
36 | <cat:dcrb> |
---|
37 | <dbx:attribute name="id" field="group"/> |
---|
38 | <dbx:attribute name="name" select="$gname"/> |
---|
39 | <dbx:attribute name="mode" value="ru"/> |
---|
40 | <dbx:attribute name="href" value="{string($props//site)}rest/dcrb"/> |
---|
41 | <dbx:variable name="size" query=" |
---|
42 | SELECT |
---|
43 | COUNT(*) |
---|
44 | FROM |
---|
45 | link_group_members |
---|
46 | WHERE |
---|
47 | "group" = {$current/group} |
---|
48 | ; |
---|
49 | "/> |
---|
50 | <dbx:attribute name="size" select="$size"/> |
---|
51 | <dbx:for-each table="core_change_request"> |
---|
52 | <dbx:sort field="id"/> |
---|
53 | <cat:cr> |
---|
54 | <dbx:attribute name="id" field="id"/> |
---|
55 | <dbx:attribute name="name" field="name"/> |
---|
56 | <dbx:attribute name="mode" value="ru"/> |
---|
57 | <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> |
---|
58 | <dbx:attribute name="status" field="status"/> |
---|
59 | </cat:cr> |
---|
60 | </dbx:for-each> |
---|
61 | </cat:dcrb> |
---|
62 | </dbx:for-each> |
---|
63 | </dbx:for-each> |
---|
64 | <dbx:for-each table="core_thematic_domain_group"> |
---|
65 | <dbx:sort field="order"/> |
---|
66 | <dbx:variable name="gname" field="name"/> |
---|
67 | <dbx:for-each table="link_group_members" min="0" max="1"> |
---|
68 | <dbx:where field="group" select="$current/id" type="integer"/> |
---|
69 | <dbx:where field="member" select="$user" type="integer"/> |
---|
70 | <dbx:where field="role" value="chair" type="string"/> |
---|
71 | <cat:tdg> |
---|
72 | <dbx:attribute name="id" field="group"/> |
---|
73 | <dbx:attribute name="name" select="$gname"/> |
---|
74 | <dbx:attribute name="mode" value="ru"/> |
---|
75 | <dbx:attribute name="href" value="{string($props//site)}rest/tdg/{$current/group}"/> |
---|
76 | <dbx:variable name="size" query=" |
---|
77 | SELECT |
---|
78 | COUNT(*) |
---|
79 | FROM |
---|
80 | link_group_members |
---|
81 | WHERE |
---|
82 | "group" = {$current/group} |
---|
83 | ; |
---|
84 | "/> |
---|
85 | <dbx:attribute name="size" select="$size"/> |
---|
86 | <dbx:for-each table="view_link_dcs_access" min="0" max="*"> |
---|
87 | <dbx:where field="account" select="$current/group"/> |
---|
88 | <dbx:sort field="name" function="upper"/> |
---|
89 | <dbx:variable name="rights" field="rights"/> |
---|
90 | <dbx:for-each table="core_data_category_selection" min="1" max="1"> |
---|
91 | <dbx:where field="id" select="$current/dcs" type="integer"/> |
---|
92 | <cat:dcs> |
---|
93 | <dbx:attribute name="id" field="id"/> |
---|
94 | <dbx:attribute name="name" field="name"/> |
---|
95 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
96 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
97 | <dbx:attribute name="mode" select="$rights"/> |
---|
98 | </cat:dcs> |
---|
99 | </dbx:for-each> |
---|
100 | </dbx:for-each> |
---|
101 | <dbx:for-each table="core_change_request"> |
---|
102 | <dbx:where field="tdg" select="$current/group" type="integer"/> |
---|
103 | <dbx:sort field="id"/> |
---|
104 | <cat:cr> |
---|
105 | <dbx:attribute name="id" field="id"/> |
---|
106 | <dbx:attribute name="name" field="name"/> |
---|
107 | <dbx:attribute name="mode" value="ru"/> |
---|
108 | <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> |
---|
109 | <dbx:attribute name="status" field="status"/> |
---|
110 | </cat:cr> |
---|
111 | </dbx:for-each> |
---|
112 | </cat:tdg> |
---|
113 | </dbx:for-each> |
---|
114 | </dbx:for-each> |
---|
115 | <dbx:for-each table="core_adhoc_group"> |
---|
116 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
117 | <dbx:sort field="name" function="upper"/> |
---|
118 | <cat:group> |
---|
119 | <dbx:attribute name="id" field="id"/> |
---|
120 | <dbx:attribute name="name" field="name"/> |
---|
121 | <dbx:attribute name="mode" value="rud"/> |
---|
122 | <dbx:attribute name="href" value="{string($props//site)}rest/group/{$current/id}"/> |
---|
123 | <dbx:variable name="size" query=" |
---|
124 | SELECT |
---|
125 | COUNT(*) |
---|
126 | FROM |
---|
127 | link_group_members |
---|
128 | WHERE |
---|
129 | "group" = {$current/id} |
---|
130 | ; |
---|
131 | "/> |
---|
132 | <dbx:attribute name="size" select="$size"/> |
---|
133 | <dbx:for-each table="view_link_dcs_access" min="0" max="*"> |
---|
134 | <dbx:where field="account" select="$current/id"/> |
---|
135 | <dbx:sort field="name" function="upper"/> |
---|
136 | <dbx:variable name="rights" field="rights"/> |
---|
137 | <dbx:for-each table="core_data_category_selection"> |
---|
138 | <dbx:where field="id" select="$current/dcs" type="integer"/> |
---|
139 | <cat:dcs> |
---|
140 | <dbx:attribute name="id" field="id"/> |
---|
141 | <dbx:attribute name="name" field="name"/> |
---|
142 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
143 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
144 | <dbx:attribute name="mode" select="$rights"/> |
---|
145 | </cat:dcs> |
---|
146 | </dbx:for-each> |
---|
147 | </dbx:for-each> |
---|
148 | </cat:group> |
---|
149 | </dbx:for-each> |
---|
150 | <dbx:for-each table="view_cr_submission_group"> |
---|
151 | <dbx:where field="member" select="$current/id" type="integer"/> |
---|
152 | <dbx:where field="role" value="chair" type="string"/> |
---|
153 | <dbx:sort field="cr"/> |
---|
154 | <dbx:for-each table="core_change_request"> |
---|
155 | <dbx:where field="id" select="$current/cr" type="integer"/> |
---|
156 | <cat:cr> |
---|
157 | <dbx:attribute name="id" field="id"/> |
---|
158 | <dbx:attribute name="name" field="name"/> |
---|
159 | <dbx:attribute name="mode" value="r"/> |
---|
160 | <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> |
---|
161 | <dbx:attribute name="status" field="status"/> |
---|
162 | <dbx:variable name="size" query=" |
---|
163 | SELECT |
---|
164 | COUNT(*) |
---|
165 | FROM |
---|
166 | link_group_members |
---|
167 | WHERE |
---|
168 | "group" = {$current/id} |
---|
169 | ; |
---|
170 | "/> |
---|
171 | <dbx:attribute name="size" select="$size"/> |
---|
172 | </cat:cr> |
---|
173 | </dbx:for-each> |
---|
174 | </dbx:for-each> |
---|
175 | </cat:private> |
---|
176 | <cat:shared href="{string($props//site)}rest/user/{$login}/shared"> |
---|
177 | <!-- |
---|
178 | <dbx:for-each table="link_data_category_selection_users"> |
---|
179 | <dbx:where field="user" select="$current/id" type="integer"/> |
---|
180 | <dbx:for-each table="core_data_category_selection"> |
---|
181 | <dbx:where field="id" select="$current/dcs" type="integer"/> |
---|
182 | <cat:dcs> |
---|
183 | <dbx:attribute name="id" field="id"/> |
---|
184 | <dbx:attribute name="name" field="name"/> |
---|
185 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
186 | <dbx:attribute name="mode" value="r"/> |
---|
187 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
188 | </cat:dcs> |
---|
189 | </dbx:for-each> |
---|
190 | </dbx:for-each> |
---|
191 | --> |
---|
192 | <dbx:for-each table="core_dcr_board" min="1" max="1"> |
---|
193 | <dbx:variable name="gname" field="name"/> |
---|
194 | <dbx:for-each table="link_group_members" min="0" max="1"> |
---|
195 | <dbx:where field="group" select="$current/id" type="integer"/> |
---|
196 | <dbx:where field="member" select="$user" type="integer"/> |
---|
197 | <dbx:where field="role" operator="ne" value="chair" type="string"/> <!-- role is NOT chair --> |
---|
198 | <dbx:where field="status" value="accepted" type="string"/> |
---|
199 | <dbx:variable name="size" query=" |
---|
200 | SELECT |
---|
201 | COUNT(*) |
---|
202 | FROM |
---|
203 | link_group_members |
---|
204 | WHERE |
---|
205 | "group" = {$current/id} |
---|
206 | ; |
---|
207 | "/> |
---|
208 | <dbx:attribute name="size" select="$size"/> |
---|
209 | <cat:dcrb> |
---|
210 | <dbx:attribute name="id" field="group"/> |
---|
211 | <dbx:attribute name="name" select="$gname"/> |
---|
212 | <dbx:attribute name="mode" value="r"/> |
---|
213 | <dbx:attribute name="href" value="{string($props//site)}rest/dcrb"/> |
---|
214 | <dbx:for-each table="view_cr_decision_group_dcrb"> |
---|
215 | <dbx:where field="member" select="$user" type="integer"/> |
---|
216 | <dbx:sort field="cr"/> |
---|
217 | <dbx:for-each table="core_change_request"> |
---|
218 | <dbx:where field="id" select="$current/cr" type="integer"/> |
---|
219 | <cat:cr> |
---|
220 | <dbx:attribute name="id" field="id"/> |
---|
221 | <dbx:attribute name="name" field="name"/> |
---|
222 | <dbx:attribute name="mode" value="ru"/> |
---|
223 | <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> |
---|
224 | <dbx:attribute name="status" field="status"/> |
---|
225 | <dbx:variable name="size" query=" |
---|
226 | SELECT |
---|
227 | COUNT(*) |
---|
228 | FROM |
---|
229 | link_group_members |
---|
230 | WHERE |
---|
231 | "group" = {$current/id} |
---|
232 | ; |
---|
233 | "/> |
---|
234 | <dbx:attribute name="size" select="$size"/> |
---|
235 | </cat:cr> |
---|
236 | </dbx:for-each> |
---|
237 | </dbx:for-each> |
---|
238 | </cat:dcrb> |
---|
239 | </dbx:for-each> |
---|
240 | </dbx:for-each> |
---|
241 | <dbx:for-each table="core_thematic_domain_group"> |
---|
242 | <dbx:sort field="order"/> |
---|
243 | <dbx:variable name="gname" field="name"/> |
---|
244 | <dbx:variable name="tdg" field="id"/> |
---|
245 | <dbx:for-each table="link_group_members" min="0" max="1"> |
---|
246 | <dbx:where field="group" select="$current/id" type="integer"/> |
---|
247 | <dbx:where field="member" select="$user" type="integer"/> |
---|
248 | <dbx:where field="role" value="chair" operator="ne" type="string"/> <!-- role is NOT chair --> |
---|
249 | <dbx:where field="status" value="accepted" type="string"/> |
---|
250 | <cat:tdg> |
---|
251 | <dbx:attribute name="id" field="group"/> |
---|
252 | <dbx:attribute name="name" select="$gname"/> |
---|
253 | <dbx:attribute name="mode" value="r"/> |
---|
254 | <dbx:attribute name="href" value="{string($props//site)}rest/tdg/{$current/group}"/> |
---|
255 | <dbx:variable name="size" query=" |
---|
256 | SELECT |
---|
257 | COUNT(*) |
---|
258 | FROM |
---|
259 | link_group_members |
---|
260 | WHERE |
---|
261 | "group" = {$current/group} |
---|
262 | ; |
---|
263 | "/> |
---|
264 | <dbx:attribute name="size" select="$size"/> |
---|
265 | <dbx:for-each table="view_link_dcs_access" min="0" max="*"> |
---|
266 | <dbx:where field="account" select="$current/group"/> |
---|
267 | <dbx:sort field="name" function="upper"/> |
---|
268 | <dbx:variable name="rights" field="rights"/> |
---|
269 | <dbx:for-each table="core_data_category_selection"> |
---|
270 | <dbx:where field="id" select="$current/dcs" type="integer"/> |
---|
271 | <cat:dcs> |
---|
272 | <dbx:attribute name="id" field="id"/> |
---|
273 | <dbx:attribute name="name" field="name"/> |
---|
274 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
275 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
276 | <dbx:attribute name="mode" select="$rights"/> |
---|
277 | </cat:dcs> |
---|
278 | </dbx:for-each> |
---|
279 | </dbx:for-each> |
---|
280 | <dbx:for-each table="view_cr_decision_group_tdg"> |
---|
281 | <dbx:where field="member" select="$user" type="integer"/> |
---|
282 | <dbx:sort field="cr"/> |
---|
283 | <dbx:for-each table="core_change_request"> |
---|
284 | <dbx:where field="id" select="$current/cr" type="integer"/> |
---|
285 | <dbx:where field="tdg" select="$tdg" type="integer"/> |
---|
286 | <cat:cr> |
---|
287 | <dbx:attribute name="id" field="id"/> |
---|
288 | <dbx:attribute name="name" field="name"/> |
---|
289 | <dbx:attribute name="mode" value="ru"/> |
---|
290 | <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> |
---|
291 | <dbx:attribute name="status" field="status"/> |
---|
292 | <dbx:variable name="size" query=" |
---|
293 | SELECT |
---|
294 | COUNT(*) |
---|
295 | FROM |
---|
296 | link_group_members |
---|
297 | WHERE |
---|
298 | "group" = {$current/id} |
---|
299 | ; |
---|
300 | "/> |
---|
301 | <dbx:attribute name="size" select="$size"/> |
---|
302 | </cat:cr> |
---|
303 | </dbx:for-each> |
---|
304 | </dbx:for-each> |
---|
305 | </cat:tdg> |
---|
306 | </dbx:for-each> |
---|
307 | </dbx:for-each> |
---|
308 | <dbx:for-each table="core_adhoc_group"> |
---|
309 | <dbx:where field="owner" operator="ne" select="$current/id" type="integer"/> |
---|
310 | <dbx:sort field="name" function="upper"/> |
---|
311 | <dbx:variable name="gname" field="name"/> |
---|
312 | <dbx:for-each table="link_group_members" min="0" max="1"> |
---|
313 | <dbx:where field="group" select="$current/id" type="integer"/> |
---|
314 | <dbx:where field="member" select="$user" type="integer"/> |
---|
315 | <dbx:where field="status" value="accepted" type="string"/> <!-- status is accepted --> |
---|
316 | <cat:group> |
---|
317 | <dbx:attribute name="id" field="group"/> |
---|
318 | <dbx:attribute name="name" select="$gname"/> |
---|
319 | <dbx:attribute name="mode" value="r"/> |
---|
320 | <dbx:attribute name="href" value="{string($props//site)}rest/group/{$current/group}"/> |
---|
321 | <dbx:variable name="size" query=" |
---|
322 | SELECT |
---|
323 | COUNT(*) |
---|
324 | FROM |
---|
325 | link_group_members |
---|
326 | WHERE |
---|
327 | "group" = {$current/group} |
---|
328 | ; |
---|
329 | "/> |
---|
330 | <dbx:attribute name="size" select="$size"/> |
---|
331 | <dbx:for-each table="view_link_dcs_access" min="0" max="*"> |
---|
332 | <dbx:where field="account" select="$current/group"/> |
---|
333 | <dbx:sort field="name" function="upper"/> |
---|
334 | <dbx:variable name="rights" field="rights"/> |
---|
335 | <dbx:for-each table="core_data_category_selection" min="1" max="1"> |
---|
336 | <dbx:where field="id" select="$current/dcs" type="integer"/> |
---|
337 | <cat:dcs> |
---|
338 | <dbx:attribute name="id" field="id"/> |
---|
339 | <dbx:attribute name="name" field="name"/> |
---|
340 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
341 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
342 | <dbx:attribute name="mode" select="$rights"/> |
---|
343 | </cat:dcs> |
---|
344 | </dbx:for-each> |
---|
345 | </dbx:for-each> |
---|
346 | </cat:group> |
---|
347 | </dbx:for-each> |
---|
348 | </dbx:for-each> |
---|
349 | <dbx:for-each table="view_cr_submission_group"> |
---|
350 | <dbx:where field="member" select="$current/id" type="integer"/> |
---|
351 | <dbx:where field="role" operator="ne" value="chair" type="string"/> |
---|
352 | <dbx:sort field="cr"/> |
---|
353 | <dbx:for-each table="core_change_request"> |
---|
354 | <dbx:where field="id" select="$current/cr" type="integer"/> |
---|
355 | <cat:cr> |
---|
356 | <dbx:attribute name="id" field="id"/> |
---|
357 | <dbx:attribute name="name" field="name"/> |
---|
358 | <dbx:attribute name="mode" value="r"/> |
---|
359 | <dbx:attribute name="href" value="{string($props//site)}rest/cr/{$current/id}"/> |
---|
360 | <dbx:attribute name="status" field="status"/> |
---|
361 | <dbx:variable name="size" query=" |
---|
362 | SELECT |
---|
363 | COUNT(*) |
---|
364 | FROM |
---|
365 | link_group_members |
---|
366 | WHERE |
---|
367 | "group" = {$current/id} |
---|
368 | ; |
---|
369 | "/> |
---|
370 | <dbx:attribute name="size" select="$size"/> |
---|
371 | <dbx:for-each table="core_data_category_selection"> |
---|
372 | <dbx:where field="id" select="$current/dcs" type="integer"/> |
---|
373 | <cat:dcs> |
---|
374 | <dbx:attribute name="id" field="id"/> |
---|
375 | <dbx:attribute name="name" field="name"/> |
---|
376 | <dbx:attribute name="mode" value="r"/> |
---|
377 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
378 | </cat:dcs> |
---|
379 | </dbx:for-each> |
---|
380 | </cat:cr> |
---|
381 | </dbx:for-each> |
---|
382 | </dbx:for-each> |
---|
383 | </cat:shared> |
---|
384 | </dbx:for-each> |
---|
385 | </dbx:when> |
---|
386 | </dbx:choose> |
---|
387 | <cat:public> |
---|
388 | <cat:views> |
---|
389 | <dbx:for-each table="core_thematic_domain_group"> |
---|
390 | <dbx:where field="name" select="$view" type="string" when="$view!='isocat'"/> |
---|
391 | <dbx:sort field="order"/> |
---|
392 | <cat:tdg> |
---|
393 | <dbx:attribute name="id" field="id"/> |
---|
394 | <dbx:attribute name="name" field="name"/> |
---|
395 | <dbx:attribute name="mode" value="r"/> |
---|
396 | <dbx:attribute name="href" value="{string($props//site)}rest/tdg/{$current/id}"/> |
---|
397 | <dbx:variable name="size" query=" |
---|
398 | SELECT |
---|
399 | COUNT(*) |
---|
400 | FROM |
---|
401 | link_group_members |
---|
402 | WHERE |
---|
403 | "group" = {$current/id} |
---|
404 | ; |
---|
405 | "/> |
---|
406 | <dbx:attribute name="size" select="$size"/> |
---|
407 | <dbx:for-each table="core_profile"> |
---|
408 | <dbx:where field="tdg" select="$current/id" type="integer"/> |
---|
409 | <dbx:sort field="order"/> |
---|
410 | <cat:profile> |
---|
411 | <dbx:attribute name="id" field="id"/> |
---|
412 | <dbx:attribute name="name" field="name"/> |
---|
413 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
414 | <dbx:attribute name="mode" value="r"/> |
---|
415 | <dbx:attribute name="href" value="{string($props//site)}rest/profile/{$current/id}"/> |
---|
416 | </cat:profile> |
---|
417 | </dbx:for-each> |
---|
418 | <dbx:for-each table="core_data_category_selection"> |
---|
419 | <dbx:where field="owner" select="$current/id" type="integer"/> |
---|
420 | <dbx:where field="private" value="false"/> |
---|
421 | <dbx:sort field="name" function="upper"/> |
---|
422 | <cat:dcs> |
---|
423 | <dbx:attribute name="id" field="id"/> |
---|
424 | <dbx:attribute name="name" field="name"/> |
---|
425 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
426 | <dbx:attribute name="mode" value="r"/> |
---|
427 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
428 | </cat:dcs> |
---|
429 | </dbx:for-each> |
---|
430 | <dbx:for-each table="view_link_dcs_access" min="0" max="*"> |
---|
431 | <dbx:where field="account" select="$current/id"/> |
---|
432 | <dbx:sort field="name" function="upper"/> |
---|
433 | <dbx:for-each table="core_data_category_selection"> |
---|
434 | <dbx:where field="id" select="$current/dcs" type="integer"/> |
---|
435 | <dbx:where field="private" value="false"/> |
---|
436 | <cat:dcs> |
---|
437 | <dbx:attribute name="id" field="id"/> |
---|
438 | <dbx:attribute name="name" field="name"/> |
---|
439 | <dbx:attribute name="mode" value="r"/> |
---|
440 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
441 | </cat:dcs> |
---|
442 | </dbx:for-each> |
---|
443 | </dbx:for-each> |
---|
444 | </cat:tdg> |
---|
445 | </dbx:for-each> |
---|
446 | </cat:views> |
---|
447 | <!-- groups with one or more public DCS --> |
---|
448 | <dbx:variable name="groups" query=" |
---|
449 | SELECT DISTINCT |
---|
450 | core_adhoc_group.*, upper(core_adhoc_group.name) |
---|
451 | FROM |
---|
452 | core_adhoc_group |
---|
453 | JOIN |
---|
454 | link_dcs_access |
---|
455 | ON |
---|
456 | link_dcs_access.account = core_adhoc_group.id |
---|
457 | JOIN |
---|
458 | core_data_category_selection |
---|
459 | ON |
---|
460 | core_data_category_selection.id = link_dcs_access.dcs |
---|
461 | WHERE |
---|
462 | core_data_category_selection.private = false |
---|
463 | ORDER BY |
---|
464 | upper(core_adhoc_group.name) |
---|
465 | ; |
---|
466 | "/> |
---|
467 | <dbx:for-each select="$groups//row"> |
---|
468 | <dbx:choose> |
---|
469 | <dbx:when test="$view='isocat' or $view=$current/name"> |
---|
470 | <cat:group> |
---|
471 | <dbx:attribute name="id" field="id"/> |
---|
472 | <dbx:attribute name="name" field="name"/> |
---|
473 | <dbx:attribute name="mode" value="r"/> |
---|
474 | <dbx:attribute name="href" value="{string($props//site)}rest/group/{$current/id}"/> |
---|
475 | <dbx:variable name="size" query=" |
---|
476 | SELECT |
---|
477 | COUNT(*) |
---|
478 | FROM |
---|
479 | link_group_members |
---|
480 | WHERE |
---|
481 | "group" = {$current/id} |
---|
482 | ; |
---|
483 | "/> |
---|
484 | <dbx:attribute name="size" select="$size"/> |
---|
485 | <dbx:variable name="dcss" query=" |
---|
486 | SELECT DISTINCT |
---|
487 | core_data_category_selection.*, upper(core_data_category_selection.name) |
---|
488 | FROM |
---|
489 | core_data_category_selection |
---|
490 | JOIN |
---|
491 | link_dcs_access |
---|
492 | ON |
---|
493 | link_dcs_access.dcs= core_data_category_selection.id |
---|
494 | WHERE |
---|
495 | core_data_category_selection.private = false |
---|
496 | AND |
---|
497 | link_dcs_access.account = {$current/id} |
---|
498 | ORDER BY |
---|
499 | upper(core_data_category_selection.name) |
---|
500 | ; |
---|
501 | "/> |
---|
502 | <dbx:for-each select="$dcss//row"> |
---|
503 | <cat:dcs> |
---|
504 | <dbx:attribute name="id" field="id"/> |
---|
505 | <dbx:attribute name="name" field="name"/> |
---|
506 | <dbx:attribute name="parent" field="parent" when="normalize-space($current/parent)!=''"/> |
---|
507 | <dbx:attribute name="mode" value="r"/> |
---|
508 | <dbx:attribute name="href" value="{string($props//site)}rest/dcs/{$current/id}"/> |
---|
509 | </cat:dcs> |
---|
510 | </dbx:for-each> |
---|
511 | </cat:group> |
---|
512 | </dbx:when> |
---|
513 | </dbx:choose> |
---|
514 | </dbx:for-each> |
---|
515 | </cat:public> |
---|
516 | </cat:workspace> |
---|
517 | </dbx:process> |
---|
518 | |
---|
519 | <dbx:postprocess> |
---|
520 | <dbx:stylesheet template="identity"> |
---|
521 | <!-- |
---|
522 | <xsl:template match="*[name()='profile' or name()='dcs']" mode="copy"> |
---|
523 | --> |
---|
524 | <xsl:template match="cat:profile | cat:dcs" mode="copy"> |
---|
525 | <xsl:copy> |
---|
526 | <xsl:apply-templates select="@* except @parent"/> |
---|
527 | <xsl:apply-templates select="node()"/> |
---|
528 | <xsl:apply-templates mode="copy" select="//*[name()=current()/name()][@parent=current()/@id]"/> |
---|
529 | </xsl:copy> |
---|
530 | </xsl:template> |
---|
531 | |
---|
532 | <xsl:template match="*[self::cat:profile | self::cat:dcs][exists(@parent)]"/> |
---|
533 | |
---|
534 | <xsl:template match="*[self::cat:profile | self::cat:dcs][empty(@parent)]"> |
---|
535 | <xsl:apply-templates mode="copy" select="."/> |
---|
536 | </xsl:template> |
---|
537 | |
---|
538 | <xsl:template match="cat:cr"> |
---|
539 | <xsl:if test="empty(preceding::cat:cr[empty(parent::cat:dcrb)][@id=current()/@id])"> |
---|
540 | <xsl:copy> |
---|
541 | <xsl:apply-templates select="@*|node()"/> |
---|
542 | </xsl:copy> |
---|
543 | </xsl:if> |
---|
544 | </xsl:template> |
---|
545 | |
---|
546 | <xsl:template match="cat:views[empty(*)]"/> |
---|
547 | </dbx:stylesheet> |
---|
548 | </dbx:postprocess> |
---|
549 | |
---|
550 | </dbx:transform> |
---|
551 | |
---|