default_Meta.xsl
14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" >
<xsl:template name="fnc_mkMeta">
<xsl:param name="param_link_url"/>
<xsl:param name="param_ident" />
<xsl:param name="param_value" />
<div class="MetaContent">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="/content/XMLSite_Head/url/@m">
display:block;z-index:2;
</xsl:when>
<xsl:otherwise>
display:none;z-index:-1;
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<div id="metaHead" class="metaHead">
<span class="right">
<a id="metaClose" class="buttonClose" href="{$param_link_url}">
<img class="buttonTransparent" src="include/Forest/mensch.coop/Images/buttonTransparent.png"/>
</a>
</span>
<p class="metaHead">
<xsl:choose>
<xsl:when test="$param_ident='c'">
<xsl:apply-templates select="/content/Language/lang[@name='clipboard']"/>
</xsl:when>
<xsl:when test="$param_ident='h'">
<xsl:apply-templates select="/content/Language/lang[@name='help']"/>
</xsl:when>
<xsl:when test="$param_ident='t'">
<xsl:if test="//BasisClipboard/BasisClipboard[@BasisClipboard='TagContentList']">
<a class="metaHead" href="javascript:fnc_showTagcloud()"><xsl:apply-templates select="/content/Language/lang[@name='tagcloud']"/></a>
</xsl:if>
<xsl:apply-templates select="/content/Language/lang[@name='tagcloud']"/>
</xsl:when>
<xsl:when test="$param_ident='i'">
<xsl:apply-templates select="/content/Language/lang[@name='infobox']"/>
</xsl:when>
<xsl:when test="$param_ident='s'">
<xsl:apply-templates select="/content/Language/lang[@name='search']"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="/content/Language/lang[@name='metaLayer']"/>
</xsl:otherwise>
</xsl:choose>
</p>
</div>
<div id="tag" class="metaTag">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="$param_ident='t'">
display:block;
</xsl:when>
<xsl:otherwise>
display:none;
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$param_ident='t' and $param_value != 0">
<xsl:for-each select="//BasisClipboard[@BasisClipboard='TagContentList']">
<span id="Taglist">
<xsl:apply-templates select=".">
<xsl:with-param name="param_show" select="1" />
</xsl:apply-templates>
</span>
<p id="TagcloudHidden" style="display:none;">
<xsl:apply-templates select="../List/BasisElementAddons/TagCloud"/>
</p>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<p class="center">
<xsl:choose>
<xsl:when test="//BasisClipboard[@last]">
<xsl:choose>
<xsl:when test="//BasisClipboard[@last]/BasisElement">
<xsl:apply-templates select="//BasisClipboard[@last]/BasisElement/BasisElementAddons/TagCloud">
<xsl:with-param name="param_url">
<xsl:call-template name="function_get_showSingle">
<xsl:with-param name="param_url" select="//BasisClipboard[@last]/@parameter"/>
<xsl:with-param name="param_id" select="//BasisClipboard[@last]/BasisElement/@ID"/>
</xsl:call-template>
</xsl:with-param>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="//BasisClipboard[@last]/BasisClipboard">
<xsl:apply-templates select="//BasisClipboard[@last]/BasisClipboard/List/BasisElementAddons/TagCloud"/> </xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="//BasisClipboard[@last]/List/BasisElementAddons/TagCloud"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="BasisClipboard/BasisElement">
<xsl:apply-templates select="BasisClipboard/BasisElement/BasisElementAddons/TagCloud"/>
</xsl:when>
<xsl:when test="BasisClipboard/BasisClipboard/BasisElement">
<xsl:apply-templates select="BasisClipboard/BasisClipboard/BasisElement/BasisElementAddons/TagCloud"/>
</xsl:when>
<xsl:when test="BasisClipboard/BasisClipboard">
<xsl:apply-templates select="BasisClipboard/BasisClipboard/List/BasisElementAddons/TagCloud"/>
</xsl:when>
<xsl:when test="BasisClipboard">
<xsl:apply-templates select="BasisClipboard/List/BasisElementAddons/TagCloud"/>
</xsl:when>
<xsl:when test="BasisElement">
<xsl:apply-templates select="BasisElement/BasisElementAddons/TagCloud"/>
</xsl:when>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</p>
</xsl:otherwise>
</xsl:choose>
</div>
<div id="info">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="$param_ident='i'">
display:block;
</xsl:when>
<xsl:otherwise>
display:none;
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:call-template name="fnc_mkInfo">
<xsl:with-param name="param_id"><xsl:call-template name="fnc_lastID"/></xsl:with-param>
</xsl:call-template>
</div>
<div id="search">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="$param_ident='s'">
display:block;
</xsl:when>
<xsl:otherwise>
display:none;
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:call-template name="fnc_mkSearch"/>
</div>
<div id="help">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="$param_ident='s'">
display:block;
</xsl:when>
<xsl:otherwise>
display:none;
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:call-template name="fnc_mkHelp"/>
</div>
<div id="clipboard">
<xsl:attribute name="style">
<xsl:choose>
<xsl:when test="$param_ident='s'">
display:block;
</xsl:when>
<xsl:otherwise>
display:none;
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<a class="buttonedit button" href="{concat($var_link_hostIndex,'?p[]=ProfilePreferenceManager&p[]=Clipboard&p[]=editBC')}" title="editiere Meine Sammlung">
<xsl:value-of select="$space"/>
</a>
</div>
<div id="jsMeta">
<xsl:attribute name="style">
display:none;
</xsl:attribute>
<xsl:value-of select="$space" />
</div>
</div>
</xsl:template>
<xsl:template name="fnc_lastID">
<xsl:choose>
<xsl:when test="//BasisClipboard[@last]">
<xsl:choose>
<xsl:when test="//BasisClipboard[@last]/BasisElement">
<xsl:value-of select="//BasisClipboard[@last]/BasisElement/@ID"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//BasisClipboard[@last]/../@ID"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="BasisClipboard/BasisElement">
<xsl:value-of select="BasisClipboard/BasisElement/@ID"/>
</xsl:when>
<xsl:when test="BasisClipboard/BasisClipboard/BasisElement">
<xsl:value-of select="BasisClipboard/BasisClipboard/BasisElement/@ID"/>
</xsl:when>
<xsl:when test="BasisElement">
<xsl:value-of select="BasisElement/@ID"/>
</xsl:when>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="fnc_mkSearch">
<!-- toDo: ohne js implementation -->
<!-- http://localhost/losp/service.php?output=xml&p[0]=showSingle&p[1]=ID&p[2]=5&p[]=TopicBC&p[]=showAll&c[5][TopicBC][0][ListCondition-in][Name][1]=homi -->
<form name="Formular" method="post" enctype="multipart/form-data" onsubmit="fnc_search();return false;">
<p>
<label class="editText"><xsl:apply-templates select="/content/Language/lang[@name='searchAim']"/></label>
<select id="searchAim" name="searchAim" size="1">
<option value="TopicBC"><xsl:apply-templates select="/content/Language/lang[@name='TopicBE']"/></option>
<option value="ProfileBC"><xsl:apply-templates select="/content/Language/lang[@name='Profile']"/>/<xsl:apply-templates select="/content/Language/lang[@name='GroupProfileBE']"/></option>
</select>
</p>
<p>
<label class="editText"><xsl:apply-templates select="/content/Language/lang[@name='searchValue']"/></label>
<input id="searchValue" name="searchValue" type="text"/>
<div class="post_fnc ok left" title="{$lang_search}">
<input class="post_fnc" type="submit" name="" title="{$lang_search}"/>
</div>
</p>
</form>
</xsl:template>
<xsl:template name="fnc_mkHelp">
<!-- toDo: dynamische Hilfe seite, automatische erstellung der indexe (s. js) -->
<p>
<span class="bold"><xsl:apply-templates select="/content/Language/lang[@name='chooseHelp']"/></span>
</p>
<ul>
<li>
<a href="javascript:fnc_xmlChooserShowHelp('192')">Erstellung von Content (eines Elementes)</a>
</li>
<ul>
<li>
<a href="javascript:fnc_xmlChooserShowHelp('881')">Erstellung von einer Kampagne (eines Elementes)</a>
</li>
<li>
<a href="javascript:fnc_xmlChooserShowHelp('897')">Der Texteditor</a>
</li>
</ul>
<li>
<a href="javascript:fnc_xmlChooserShowHelp('191')">Die Metaebene</a>
</li>
</ul>
</xsl:template>
<xsl:template name="fnc_mkInfo">
<xsl:param name="param_id"/>
<xsl:choose>
<xsl:when test="number($param_id)=$param_id">
<xsl:for-each select="//BasisElement[@ID=$param_id and (@view='showSingle' or @view='showBoth' or ../../XMLSite_Display)]">
<p class="head">
<xsl:apply-templates select="/content/Language/lang[@name='infobox']"/>
-
<xsl:value-of select="Headline/Element" />
</p>
<ul class="infobox">
<li>
<span class="bold"><xsl:apply-templates select="/content/Language/lang[@name='elem']"/>-ID:<xsl:text> </xsl:text></span>
<xsl:value-of select="@ID"/>
</li>
<li>
<span class="bold"><xsl:apply-templates select="/content/Language/lang[@name='creation']"/>:</span><br/>
<span class="info">
<xsl:apply-templates select="/content/Language/lang[@name='from']"/><xsl:call-template name="fnc_mkAuthorLink"><xsl:with-param name="param_style" select="0" /></xsl:call-template>
<xsl:value-of select="$space"/><xsl:apply-templates select="/content/Language/lang[@name='at']"/> <xsl:call-template name="fnc_mkFullDate">
<xsl:with-param name="param_date">
<xsl:choose>
<xsl:when test="CreateDate">
<xsl:value-of select="CreateDate"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="Element[@objvar='CreateDate']" />
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</span>
</li>
<xsl:if test="BasisElementAddons/Infobox/BELastEdits/Action[1]">
<li>
<span class="bold"><xsl:apply-templates select="/content/Language/lang[@name='lastModification']"/>:</span><br/>
<span class="info">
<xsl:apply-templates select="/content/Language/lang[@name='from']"/> <xsl:value-of select="BasisElementAddons/Infobox/BELastEdits/Action[1]/@NickName"/>
<xsl:value-of select="$space"/><xsl:apply-templates select="/content/Language/lang[@name='at']"/><xsl:call-template name="fnc_mkFullDate">
<xsl:with-param name="param_date" select="BasisElementAddons/Infobox/BELastEdits/Action[1]/@CDate"/>
</xsl:call-template>
</span>
</li>
</xsl:if>
</ul>
<ul class="infobox">
<li class="bold"><xsl:apply-templates select="/content/Language/lang[@name='lastDirectUnder']"/>:</li>
<xsl:apply-templates select="BasisElementAddons/Infobox/LastLinkerBC">
<xsl:with-param name="param_short" select="2" />
</xsl:apply-templates>
<xsl:apply-templates select="BasisElementAddons/Infobox/LastBasisElementBC">
<xsl:with-param name="param_short" select="2" />
</xsl:apply-templates>
</ul>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
Fehler ich bin keine ID <xsl:value-of select="$param_id"/>! Fehler wird schnellst möglichst behoben!
</xsl:otherwise>
</xsl:choose>
<xsl-value-of select="$space"/>
</xsl:template>
<xsl:template match="TagCloud">
<xsl:param name="param_url" select="../../../@parameter"/>
<xsl:param name="param_kind">0</xsl:param>
<xsl:param name="param_meta">0</xsl:param>
<xsl:param name="param_list"/>
<xsl:param name="param_inputBE"/>
<xsl:choose>
<xsl:when test="@edit and $param_meta=0">
<xsl:apply-templates select="Element">
<xsl:with-param name="param_inputBE" select="$param_inputBE"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="var_get_TagContentList">
<xsl:call-template name="function_get_TagContentList" >
<xsl:with-param name="param_url">
<xsl:choose>
<xsl:when test="$param_url">
<xsl:value-of select="$param_url"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('?',../../Link/@parameter)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:if test="TreeTagList/Tag">
<xsl:for-each select="TreeTagList/Tag">
<xsl:variable name="var_size"><xsl:value-of select="@size" /></xsl:variable>
<xsl:value-of select="' '"/>
<strong style="font-size:{2*$var_size}%;">
<a class="tagCloud" href="{$var_get_TagContentList}{@TagID}&m[tag]=1{$var_link_lang}" title="{@count} mal wurde dieser Tag bis zur {../../@depth} Subebene verwendet ">
<xsl:value-of select="@TagName" />
</a>
</strong>
</xsl:for-each>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="RootTagList">
<xsl:param name="param_url"/>
<xsl:variable name="var_get_TagContentList">
<xsl:call-template name="function_get_TagContentList" >
<xsl:with-param name="param_url" select="$param_url"/>
</xsl:call-template>
</xsl:variable>
<xsl:for-each select="Tag">
<a href="{$var_get_TagContentList}{@TagID}&m[tag]=1" title="{@count} mal wurde dieser Tag bis zur {../../@depth} Subebene verwendet ">
<xsl:value-of select="@TagName" />
</a>
<xsl:if test="position() != last()"><xsl:text>, </xsl:text></xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>