source: indico/indico/MaKaC/webinterface/stylesheets/cdsagenda_olist.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@…>, 4 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: 13.8 KB
Line 
1<?xml version='1.0'?>
2<!-- $Id: cdsagenda_olist.xsl,v 1.14 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<table width="99%" border="0" cellpadding="0" cellspacing="0">
33<tr>
34  <td>
35
36  <xsl:call-template name="header"/>
37 
38<xsl:for-each select="./session|./contribution|./break">
39<xsl:sort select="./startDate"/>
40<xsl:variable name="day" select="substring(./startDate,0,11)"/>
41<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">
42        <a name="{$day}"/>
43        <br/><xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text><br/><xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text><b>
44        <xsl:call-template name="prettydate">
45                <xsl:with-param name="dat" select="substring(./startDate,0,11)"/>
46        </xsl:call-template>
47        </b>
48        <hr/>
49</xsl:if>
50<xsl:if test="name(.)='contribution' or name(.)='break'">
51<xsl:text disable-output-escaping="yes">
52&#60;table width="100%" cellpadding="4" cellspacing="0" border="0"&#62;
53</xsl:text>
54</xsl:if>
55<xsl:apply-templates select="."/>
56<xsl:if test="name(.)='contribution' or name(.)='break'">
57<xsl:text disable-output-escaping="yes">
58&#60;/table&#62;
59</xsl:text>
60</xsl:if>
61</xsl:for-each>
62  </td>
63</tr>
64</table>
65</xsl:template>
66
67
68
69<xsl:template match="session">
70<xsl:variable name="ids" select="./ID"/>
71<a name="{./ID}"/>
72<table width="100%" cellpadding="1" cellspacing="0" border="0">
73<tr class="headerselected" bgcolor="#000060">
74  <td valign="top" class="headerselected" align="left">
75    <font color="white">
76    <b>
77    <font size="+1" face="arial" color="white">
78    <xsl:value-of select="./title"/>   
79    </font>
80    </b>
81    </font>
82    <font size="-2">
83    (<xsl:value-of select="substring(./startDate,12,5)"/>
84    <xsl:if test="substring(./endDate,12,5) != '00:00'">-&gt;<xsl:value-of select="substring(./endDate,12,5)"/></xsl:if>)
85    </font>
86  </td>
87  <td valign="top" align="right">
88    <xsl:choose>
89    <xsl:when test="./description != '' or count(child::chair) != 0 or count(child::material) != 0 or count(child::location) != 0">
90    <table bgcolor="#f0c060" cellpadding="2" cellspacing="0" border="0" class="results">
91    <xsl:if test="./description != ''">
92    <tr>
93      <td valign="top">
94        <b><strong>
95        Description:
96        </strong></b>
97      </td>
98      <td valign="top" width="400" style="text-align: justify;">
99        <xsl:apply-templates select="./description"/>
100      </td>
101    </tr>
102    </xsl:if>
103    <xsl:if test="count(child::chair) != 0">
104    <tr>
105      <td valign="top">
106        <b><strong>
107        Chairperson:
108        </strong></b>
109      </td> 
110      <td>
111        <small>
112        <xsl:apply-templates select="./chair"/>
113        </small>
114      </td>
115    </tr>
116    </xsl:if>
117    <xsl:if test="count(child::location) != 0">
118    <tr>
119      <td valign="top">
120        <b><strong>
121        Location:
122        </strong></b>
123      </td>
124      <td>
125        <small>
126        <xsl:apply-templates select="./location"/>
127        </small>
128      </td>
129    </tr>
130    </xsl:if>
131    <xsl:if test="count(child::material) != 0">
132    <tr>
133      <td valign="top">
134        <b><strong>
135        Material:
136        </strong></b>
137      </td>
138      <td>
139        <small>
140        <xsl:for-each select="./material">
141        <xsl:apply-templates select="."><xsl:with-param name="sessionId" select="../ID"/></xsl:apply-templates>
142        </xsl:for-each>
143        </small>
144      </td>
145    </tr>
146    </xsl:if>
147    <xsl:if test="@broadcasturl != ''">
148    <tr>
149      <td valign="top">
150        <b><strong>
151          Broadcast:
152        </strong></b>
153      </td>
154      <td>
155        <small>
156        <a href="{@broadcasturl}">
157        <img src="images/camera.gif" alt="" border="0" width="33" height="24"/>
158        </a>
159        </small>
160      </td>
161    </tr>
162    </xsl:if>
163    </table>
164    </xsl:when>
165    <xsl:otherwise>
166    <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
167    </xsl:otherwise>
168    </xsl:choose>
169  </td>
170  <td style="padding-right:4px; width:23px">
171    <xsl:call-template name="displayModifIcons">
172      <xsl:with-param name="alignMenuRight">true</xsl:with-param>
173      <xsl:with-param name="item" select="."/>
174      <xsl:with-param name="confId" select="../ID"/>
175      <xsl:with-param name="sessId" select="./ID"/>
176      <xsl:with-param name="contId">null</xsl:with-param>
177      <xsl:with-param name="subContId">null</xsl:with-param>
178      <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.session</xsl:with-param>
179    </xsl:call-template>
180  </td>
181</tr>
182</table>
183<xsl:if test="count(./contribution|./break) != 0">
184<table width="100%" cellpadding="4" cellspacing="0" border="0">
185<xsl:for-each select="./contribution|./break">
186        <xsl:apply-templates select="."/>
187</xsl:for-each>
188</table>
189</xsl:if>
190<br/>
191</xsl:template>
192
193
194
195<xsl:template match="contribution">
196<xsl:variable name="idt" select="./ID"/>
197<tr>
198  <td align="center" valign="top" width="1%">
199    <font color="black">
200    <b><xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
201    <xsl:number from="agenda" level="any" format="1. "/>
202    </b>
203    </font>
204    <xsl:if test="@broadcasturl != ''">
205    <br/><a href="{@broadcasturl}">
206    <img src="images/camera.gif" border="0" width="33" height="24"/>
207    <br/>(video broadcast)</a>
208    </xsl:if>
209  </td>
210  <xsl:choose>
211  <xsl:when test="count(./location) != 0 and ./location/room!=../location/room">
212  <td align="center" valign="top" class="header" width="1%">
213    <xsl:apply-templates select="./location"/>
214  </td>
215  </xsl:when>
216  <xsl:otherwise>
217    <td width="1%" align="center" valign="top"></td>
218  </xsl:otherwise>
219  </xsl:choose>
220  <xsl:choose>
221  <xsl:when test="count(preceding-sibling::contribution) mod 2 = 1">
222  <xsl:text disable-output-escaping="yes">
223  &#60;td colspan="2" width="75%" valign="top" bgcolor="#E4E4E4"&#62;
224    &#60;table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#E4E4E4"&#62;
225  </xsl:text>
226  </xsl:when>
227  <xsl:otherwise>
228  <xsl:text disable-output-escaping="yes">
229  &#60;td colspan="2" width="75%" valign="top" bgcolor="#F6F6F6"&#62;
230    &#60;table class="tablepre" width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#F6F6F6"&#62;
231  </xsl:text>
232  </xsl:otherwise>
233  </xsl:choose>
234    <tr>
235      <td valign="top" align="left">
236        <font class="headline"><b>
237        <xsl:value-of select="./title" disable-output-escaping="yes"/>
238        </b></font> 
239        <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>
240        <xsl:if test="count(child::repno) != 0">(
241                <xsl:for-each select="./repno">
242                        <xsl:apply-templates select="."/> 
243            <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
244                </xsl:for-each>
245        )</xsl:if>
246        <xsl:if test="count(child::material) != 0">
247        (<xsl:for-each select="./material">
248        <xsl:apply-templates select="."><xsl:with-param name="contribId" select="../ID"/></xsl:apply-templates>
249        <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
250        </xsl:for-each>)
251        </xsl:if>
252      </td>
253      <td align="right">
254        <xsl:if test="count(child::speakers) != 0">
255        <xsl:apply-templates select="./speakers"/>
256        </xsl:if>
257      </td>
258      <td>
259        <xsl:if test="name(..) = 'session'">
260        <xsl:call-template name="displayModifIcons">       
261          <xsl:with-param name="item" select="."/>
262          <xsl:with-param name="confId" select="../../ID"/>
263          <xsl:with-param name="sessId" select="../ID"/>
264          <xsl:with-param name="contId" select="./ID" />
265          <xsl:with-param name="subContId">null</xsl:with-param>
266          <xsl:with-param name="alignMenuRight">true</xsl:with-param>
267        <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.contribution</xsl:with-param>
268        </xsl:call-template>
269          </xsl:if>
270          <xsl:if test="name(..) != 'session'">
271        <xsl:call-template name="displayModifIcons">       
272          <xsl:with-param name="item" select="."/>
273          <xsl:with-param name="confId" select="../ID"/>
274          <xsl:with-param name="sessId">null</xsl:with-param>
275          <xsl:with-param name="contId" select="./ID" />
276          <xsl:with-param name="subContId">null</xsl:with-param>
277          <xsl:with-param name="alignMenuRight">true</xsl:with-param>
278          <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.contribution</xsl:with-param>
279        </xsl:call-template>
280        </xsl:if>
281      </td>
282    </tr>       
283    <xsl:if test="./abstract != ''">
284    <tr>
285      <td>
286        <xsl:apply-templates select="./abstract"/>
287      </td>
288    </tr>
289    </xsl:if>
290    <xsl:for-each select="subcontribution">
291      <xsl:apply-templates select="."/>
292    </xsl:for-each>
293    <xsl:text disable-output-escaping="yes">
294    &#60;/table&#62;
295  &#60;/td&#62;
296    </xsl:text>
297</tr>
298</xsl:template>
299
300
301<xsl:template match="subcontribution">
302        <xsl:variable name="idt" select="./ID"/>
303        <tr>
304                <td align="left">
305                <li>
306                <b class="headline"><small>
307                <xsl:value-of select="./title" disable-output-escaping="yes"/>
308                </small></b>
309                <xsl:if test="./duration != '00:00'">
310                        <small><font color="red"> (<xsl:call-template name="prettyduration"><xsl:with-param name="duration" select="./duration"/></xsl:call-template>) </font></small>
311                </xsl:if>
312                <font color="black">
313        <xsl:if test="count(child::repno) != 0">(
314                <xsl:for-each select="./repno">
315                        <xsl:apply-templates select="."/> 
316            <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
317                </xsl:for-each>
318        )</xsl:if>
319                <xsl:if test="count(child::material) != 0">
320                        (<xsl:for-each select="./material">
321                        <xsl:apply-templates select="."><xsl:with-param name="contribId" select="../../ID"/><xsl:with-param name="subContId" select="../ID"/></xsl:apply-templates>
322                        <xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
323                        </xsl:for-each>)
324                </xsl:if>
325                <xsl:if test="./abstract != ''">
326                        <br/><xsl:apply-templates select="./abstract"/>
327                </xsl:if>
328                </font>
329                </li>
330                </td>
331                <td align="right">
332                <xsl:if test="count(child::speakers) != 0">
333                        <xsl:apply-templates select="./speakers"/>
334                </xsl:if>
335                </td>
336        <td>
337        <xsl:if test="name(../..) = 'session'">
338            <xsl:call-template name="displayModifIcons">       
339              <xsl:with-param name="item" select="."/>
340              <xsl:with-param name="confId" select="../../../ID"/>
341              <xsl:with-param name="sessId" select="../../ID"/>
342              <xsl:with-param name="contId" select="../ID" />
343              <xsl:with-param name="subContId" select="./ID"/>
344              <xsl:with-param name="alignMenuRight">true</xsl:with-param>
345              <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.subContribution</xsl:with-param>
346            </xsl:call-template>
347              </xsl:if>
348              <xsl:if test="name(../..) != 'session'">
349            <xsl:call-template name="displayModifIcons">       
350              <xsl:with-param name="item" select="."/>
351              <xsl:with-param name="confId" select="../../ID"/>
352              <xsl:with-param name="sessId">null</xsl:with-param>
353              <xsl:with-param name="contId" select="../ID" />
354              <xsl:with-param name="subContId" select="./ID"/>
355              <xsl:with-param name="alignMenuRight">true</xsl:with-param>
356              <xsl:with-param name="uploadURL">Indico.Urls.UploadAction.subContribution</xsl:with-param>
357            </xsl:call-template>
358            </xsl:if>
359        </td>
360        </tr>
361</xsl:template>
362
363
364<xsl:template match="break">
365<tr class="header">
366        <td align="center" valign="top" width="1%">
367                <font color="black">
368                <b><xsl:text disable-output-escaping="yes">&#38;nbsp;</xsl:text>
369                <xsl:if test="substring(./startDate,12,5) != '00:00'">
370                        <xsl:value-of select="substring(./startDate,12,5)"/> 
371                </xsl:if>
372                </b>
373                </font>
374        </td>
375        <td colspan="3">
376                <center>
377                <xsl:call-template name="displayModifIcons">
378                    <xsl:with-param name="item" select="."/>
379                </xsl:call-template>
380                <xsl:value-of select="./name" disable-output-escaping="yes"/>
381                </center>
382        </td>
383</tr>
384</xsl:template>
385
386
387<xsl:template match="chair|announcer">
388        <xsl:for-each select="./user|./UnformatedUser">
389        <xsl:apply-templates select=".">
390                <xsl:with-param name="span"></xsl:with-param>
391        </xsl:apply-templates>
392        <xsl:if test="count(following-sibling) != 0">,</xsl:if>
393        </xsl:for-each>
394</xsl:template>
395
396
397<xsl:template match="convener|speakers">
398        <xsl:for-each select="./user|./UnformatedUser">
399        <xsl:apply-templates select=".">
400                <xsl:with-param name="span"></xsl:with-param>
401        </xsl:apply-templates>
402        <xsl:if test="count(following-sibling) != 0">,<xsl:text disable-output-escaping="yes"> </xsl:text></xsl:if>
403        </xsl:for-each>
404</xsl:template>
405</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.