source: indico/indico/MaKaC/webinterface/stylesheets/cdsagenda.xsl @ 036d56

burotelhello-world-walkthroughipv6new-webexprov-dual-interfacev0.97-seriesv0.98-seriesv0.98.2v0.98.3v0.98b1v0.98b2v0.99v1.0v1.1
Last change on this file since 036d56 was 036d56, checked in by Pedro Ferreira <jose.pedro.ferreira@…>, 3 years ago

[FIXED] cdsagenda broken meeting styles

  • The cdsagenda, cdsagenda_inline_minutes and cdsagenda_olist showed a strange behaviour when being resized. That was due to a center tag that made them look bad in those situations.
  • Altough this was fixed, there is still another center tag in cdsagenda_inline_minutes and cdsagenda_olist that should probably be taken off as well, as the center tag is deprecated. -fixes #6
  • Property mode set to 100755
File size: 14.0 KB
Line 
1<?xml version='1.0'?>
2<!-- $Id: cdsagenda.xsl,v 1.26 2009/06/19 12:44:11 jose Exp $
3
4     This file is part of CDS Indico.
5     Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN.
6
7     CDS Indico is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License as
9     published by the Free Software Foundation; either version 2 of the
10     License, or (at your option) any later version.
11
12     CDS Indico is distributed in the hope that it will be useful, but
13     WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with CDS Indico; if not, write to the Free Software Foundation, Inc.,
19     59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
20-->
21
22<xsl:stylesheet version='1.0' 
23   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
24
25<xsl:include href="include/date.xsl"/>
26<xsl:include href="include/common.xsl"/>
27<xsl:include href="include/agenda.xsl"/>
28<xsl:output method="html"/>
29
30<!-- Global object: Agenda -->
31<xsl:template match="iconf">
32
33<table width="99%" border="0" cellpadding="0" cellspacing="0">
34<tr>
35  <td>
36  <xsl:call-template name="header"/>
37
38<xsl:for-each select="./session|./contribution|./break">
39<xsl:variable name="day" select="substring(./startDate,0,11)"/>
40<xsl:if test="count(preceding::session[position()=1 and substring(./startDate,0,11)=$day]) = 0 and count(preceding::contribution[position()=1 and substring(./startDate,0,11)=$day]) = 0 and count(preceding::break[position()=1 and substring(./startDate,0,11)=$day]) = 0">
41        <a name="{$day}"/>
42        <br/><xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text><br/><xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text><b>
43        <xsl:call-template name="prettydate">
44                <xsl:with-param name="dat" select="substring(./startDate,0,11)"/>
45        </xsl:call-template>
46        </b>
47        <hr/>
48</xsl:if>
49<xsl:if test="name(.)='contribution' or name(.)='break'">
50<xsl:text disable-output-escaping="yes">
51&#60;table width="100%" cellpadding="4" cellspacing="0" border="0"&#62;
52</xsl:text>
53</xsl:if>
54<xsl:apply-templates select="."/>
55<xsl:if test="name(.)='contribution' or name(.)='break'">
56<xsl:text disable-output-escaping="yes">
57&#60;/table&#62;
58</xsl:text>
59</xsl:if>
60</xsl:for-each>
61  </td>
62</tr>
63</table>
64</xsl:template>
65
66
67
68<xsl:template match="session">
69<xsl:variable name="ids" select="./ID"/>
70<a name="{./ID}"/>
71<table width="100%" cellpadding="1" cellspacing="0" border="0">
72<tr class="headerselected" bgcolor="#000060">
73  <td valign="top" class="headerselected" align="left">
74
75    <font color="white">
76    <b>
77    <font size="+1" face="arial" color="white">
78    <xsl:value-of select="./title" disable-output-escaping="yes"/>     
79    </font>
80    </b>
81    </font>
82    <font size="-2">
83    (<xsl:value-of select="substring(./startDate,12,5)"/>
84    -&gt;<xsl:value-of select="substring(./endDate,12,5)"/>)
85    </font>
86  </td>
87  <td valign="top" align="right">
88    <xsl:choose>
89    <xsl:when test="./description != '' or count(child::convener) != 0 or count(child::material) != 0 or count(child::location) != 0">
90    <table bgcolor="#f0c060" cellpadding="0" cellspacing="0" border="0" class="results">
91    <xsl:if test="./description != ''">
92    <tr>
93      <td valign="top" colspan="2" width="400"  style="text-align: justify">
94        <i><small><xsl:apply-templates select="./description"/></small></i>
95      </td>
96    </tr>
97    </xsl:if>
98    <xsl:if test="count(child::convener) != 0">
99    <tr>
100      <td valign="top">
101        <b><strong>
102        Chairperson:
103        </strong></b>
104      </td> 
105      <td>
106        <small>
107        <xsl:apply-templates select="./convener"/>
108        </small>
109      </td>
110    </tr>
111    </xsl:if>
112    <xsl:if test="count(child::location) != 0 and  (./location/name != ../location/name or ./location/room != ../location/room)">
113    <tr>
114      <td valign="top">
115        <b><strong>
116        Location:
117        </strong></b>
118      </td>
119      <td>
120        <small>
121        <xsl:apply-templates select="./location"/>
122        </small>
123      </td>
124    </tr>
125    </xsl:if>
126    <xsl:if test="count(child::material) != 0">
127    <tr>
128      <td valign="top">
129        <b><strong>
130        Material:
131        </strong></b>
132      </td>
133      <td>
134        <small>
135        <xsl:for-each select="./material">
136        <xsl:apply-templates select="."><xsl:with-param name="sessionId" select="../ID"/></xsl:apply-templates>
137        </xsl:for-each>
138        </small>
139      </td>
140    </tr>
141    </xsl:if>
142    <xsl:if test="@broadcasturl != ''">
143    <tr>
144      <td valign="top">
145        <b><strong>
146          Broadcast:
147        </strong></b>
148      </td>
149      <td>
150        <small>
151        <a href="{@broadcasturl}">
152        <img src="images/camera.gif" alt="" border="0" width="33" height="24"/>
153        </a>
154        </small>
155      </td>
156    </tr>
157    </xsl:if>
158    </table>
159    </xsl:when>
160    <xsl:otherwise>
161    <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
162    </xsl:otherwise>
163    </xsl:choose>
164  </td>
165  <td style="padding-right:4px; width:23px">
166    <xsl:call-template name="displayModifIcons">
167      <xsl:with-param name="alignMenuRight">true</xsl:with-param>
168      <xsl:with-param name="item" select="."/>
169      <xsl:with-param name="confId" select="../ID"/>
170      <xsl:with-param name="sessId" select="./ID"/>
171      <xsl:with-param name="contId">null</xsl:with-param>
172      <xsl:with-param name="subContId">null</xsl:with-param>
173      <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.session</xsl:with-param>
174    </xsl:call-template>
175  </td>
176</tr>
177</table>
178<xsl:if test="count(./contribution|./break) != 0">
179<table width="100%" cellpadding="4" cellspacing="0" border="0">
180<xsl:for-each select="./contribution|./break">
181        <xsl:apply-templates select="."/>
182</xsl:for-each>
183</table>
184</xsl:if>
185<br/>
186</xsl:template>
187
188
189
190<xsl:template match="contribution">
191<xsl:variable name="idt" select="./ID"/>
192<tr>
193  <td valign="top" width="1%">
194    <font color="black">
195    <b><xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
196    <xsl:value-of select="substring(./startDate,12,5)"/> 
197    </b>
198    </font>
199    <xsl:if test="@broadcasturl != ''">
200    <br/><a href="{@broadcasturl}">
201    <img src="images/camera.gif" border="0" width="33" height="24"/>
202    <br/>(video broadcast)</a>
203    </xsl:if>
204  </td>
205  <xsl:choose>
206  <xsl:when test="(./location/name != ../location/name and ./location/name != '') or (./location/room != ../location/room and ./location/room != '' and ./location/room != '0--')">
207  <td align="center" valign="top" class="header" width="1%">
208    <xsl:apply-templates select="./location"/>
209  </td>
210  </xsl:when>
211  <xsl:otherwise>
212    <td width="1%" align="center" valign="top"></td>
213  </xsl:otherwise>
214  </xsl:choose>
215  <xsl:choose>
216  <xsl:when test="count(preceding-sibling::contribution) mod 2 = 1">
217  <xsl:text disable-output-escaping="yes">
218  &#60;td colspan="2" width="75%" valign="top" bgcolor="#E4E4E4"&#62;
219    &#60;table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#E4E4E4"&#62;
220  </xsl:text>
221  </xsl:when>
222  <xsl:otherwise>
223  <xsl:text disable-output-escaping="yes">
224  &#60;td colspan="2" width="75%" valign="top" bgcolor="#F6F6F6"&#62;
225    &#60;table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#F6F6F6"&#62;
226  </xsl:text>
227  </xsl:otherwise>
228  </xsl:choose>
229    <tr>
230      <td valign="top" align="left">
231        <font class="headline"><b>
232        <xsl:value-of select="./title" disable-output-escaping="yes"/>
233        </b></font> 
234        <xsl:if test="./duration != '00:00'"><small><font color="red"> (<xsl:call-template name="prettyduration"><xsl:with-param name="duration" select="./duration"/></xsl:call-template>) </font></small></xsl:if>
235        <xsl:if test="count(child::repno) != 0">(
236                <xsl:for-each select="./repno">
237                        <xsl:apply-templates select="."/> 
238            <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
239                </xsl:for-each>
240        )</xsl:if>
241        <xsl:if test="count(child::material) != 0">
242        (<xsl:for-each select="./material">
243        <xsl:apply-templates select="."><xsl:with-param name="contribId" select="../ID"/></xsl:apply-templates>
244        <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
245        </xsl:for-each>)
246        </xsl:if>
247      </td>
248      <td align="right">
249        <xsl:if test="count(child::speakers) != 0">
250        <xsl:apply-templates select="./speakers"/>
251        </xsl:if>
252      </td>
253      <td>
254        <xsl:if test="name(..) = 'session'">
255        <xsl:call-template name="displayModifIcons">       
256          <xsl:with-param name="item" select="."/>
257          <xsl:with-param name="confId" select="../../ID"/>
258          <xsl:with-param name="sessId" select="../ID"/>
259          <xsl:with-param name="contId" select="./ID" />
260          <xsl:with-param name="subContId">null</xsl:with-param>
261          <xsl:with-param name="alignMenuRight">true</xsl:with-param>
262        <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.contribution</xsl:with-param>
263        </xsl:call-template>
264          </xsl:if>
265          <xsl:if test="name(..) != 'session'">
266        <xsl:call-template name="displayModifIcons">       
267          <xsl:with-param name="item" select="."/>
268          <xsl:with-param name="confId" select="../ID"/>
269          <xsl:with-param name="sessId">null</xsl:with-param>
270          <xsl:with-param name="contId" select="./ID" />
271          <xsl:with-param name="subContId">null</xsl:with-param>
272          <xsl:with-param name="alignMenuRight">true</xsl:with-param>
273          <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.contribution</xsl:with-param>
274        </xsl:call-template>
275        </xsl:if>
276      </td>
277    </tr>       
278    <xsl:if test="./abstract != ''">
279    <tr>
280      <td colspan="3" style="text-align: justify">
281        <xsl:apply-templates select="./abstract"/>
282      </td>
283    </tr>
284    </xsl:if>
285    <xsl:for-each select="subcontribution">
286      <xsl:apply-templates select="."/>
287    </xsl:for-each>
288    <xsl:text disable-output-escaping="yes">
289    &#60;/table&#62;
290  &#60;/td&#62;
291    </xsl:text>
292</tr>
293</xsl:template>
294
295
296<xsl:template match="subcontribution">
297        <xsl:variable name="idt" select="./ID"/>
298        <tr>
299                <td align="left">
300                <ul>
301                <li>
302                <b class="headline"><small>
303                <xsl:value-of select="./title" disable-output-escaping="yes"/>
304                </small></b>
305                <xsl:if test="./duration != '00:00'">
306                        <small><font color="red"> (<xsl:call-template name="prettyduration"><xsl:with-param name="duration" select="./duration"/></xsl:call-template>) </font></small>
307                </xsl:if>
308                <font color="black">
309        <xsl:if test="count(child::repno) != 0">(
310                <xsl:for-each select="./repno">
311                        <xsl:apply-templates select="."/> 
312            <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
313                </xsl:for-each>
314        )</xsl:if>
315                <xsl:if test="count(child::material) != 0">
316                        (<xsl:for-each select="./material">
317                        <xsl:apply-templates select="."><xsl:with-param name="contribId" select="../../ID"/><xsl:with-param name="subContId" select="../ID"/></xsl:apply-templates>
318                        <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
319                        </xsl:for-each>)
320                </xsl:if>
321                <xsl:if test="./abstract != ''">
322                        <br/><small><xsl:apply-templates select="./abstract"/></small>
323                </xsl:if>
324                </font>
325                </li>
326                </ul>
327
328                </td>
329                <td align="right">
330                <xsl:if test="count(child::speakers) != 0">
331                        <xsl:apply-templates select="./speakers"/>
332                </xsl:if>
333                </td>
334        <td>
335        <xsl:if test="name(../..) = 'session'">
336            <xsl:call-template name="displayModifIcons">       
337              <xsl:with-param name="item" select="."/>
338              <xsl:with-param name="confId" select="../../../ID"/>
339              <xsl:with-param name="sessId" select="../../ID"/>
340              <xsl:with-param name="contId" select="../ID" />
341              <xsl:with-param name="subContId" select="./ID"/>
342              <xsl:with-param name="alignMenuRight">true</xsl:with-param>
343              <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.subContribution</xsl:with-param>
344            </xsl:call-template>
345              </xsl:if>
346              <xsl:if test="name(../..) != 'session'">
347            <xsl:call-template name="displayModifIcons">       
348              <xsl:with-param name="item" select="."/>
349              <xsl:with-param name="confId" select="../../ID"/>
350              <xsl:with-param name="sessId">null</xsl:with-param>
351              <xsl:with-param name="contId" select="../ID" />
352              <xsl:with-param name="subContId" select="./ID"/>
353              <xsl:with-param name="alignMenuRight">true</xsl:with-param>
354              <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.subContribution</xsl:with-param>
355            </xsl:call-template>
356            </xsl:if>
357        </td>
358        </tr>
359</xsl:template>
360
361
362<xsl:template match="break">
363<tr class="header">
364        <td align="center" valign="top" width="1%">
365                <font color="black">
366                <b><xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
367                <xsl:value-of select="substring(./startDate,12,5)"/> 
368                </b>
369                </font>
370        </td>
371        <td colspan="3">
372
373                <xsl:call-template name="displayModifIcons">
374                    <xsl:with-param name="item" select="."/>
375                </xsl:call-template>
376
377                <xsl:value-of select="./name" disable-output-escaping="yes"/>
378        <xsl:if test="./duration != '00:00'"><small><font color="red"> (<xsl:call-template name="prettyduration"><xsl:with-param name="duration" select="./duration"/></xsl:call-template>) </font></small></xsl:if>
379        </td>
380</tr>
381</xsl:template>
382
383
384<xsl:template match="chair|announcer|convener">
385        <xsl:for-each select="./user|./UnformatedUser">
386        <xsl:apply-templates select=".">
387                <xsl:with-param name="span"></xsl:with-param>
388        </xsl:apply-templates>
389        <xsl:if test="count(following-sibling::user) != 0">,</xsl:if>
390        </xsl:for-each>
391</xsl:template>
392
393
394<xsl:template match="convener|speakers">
395        <xsl:for-each select="./user|./UnformatedUser">
396        <xsl:apply-templates select=".">
397                <xsl:with-param name="span"></xsl:with-param>
398        </xsl:apply-templates>
399        <xsl:if test="count(following-sibling::user) != 0">,<xsl:text disable-output-escaping="yes"> </xsl:text></xsl:if>
400        </xsl:for-each>
401</xsl:template>
402
403
404</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.