]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mowgli/home/xsl/common.xsl
- list of people
[helm.git] / helm / mowgli / home / xsl / common.xsl
index caa6cf85cd0b69c3fb7d19ff8331da625cff5917..f33f8ea7040a272451460e7a31986ab35e419858 100644 (file)
@@ -3,6 +3,8 @@
 <xsl:stylesheet version="1.0"
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
+<xsl:param name="current-date" select="'???'"/>
+
 <xsl:template name="head">
   <xsl:param name="path_to_top" select="'.'"/>
   <br />
     <tr>
       <td align="left" valign="top">
         <div class="small">
-          This pages are hosted by the
+          This page is hosted by the
           <a href="http:/www.cs.unibo.it">Department of Computer Science</a>,
           <a href="http://www.unibo.it">University of Bologna</a>.
+         <br />
+         Last updated <b><xsl:value-of select="$current-date"/></b>.
         </div>
       </td>
       <td align="right" valign="top">
  </xsl:choose>
 </xsl:template>
 
+<xsl:template name="print_interval">
+ <xsl:param name="begin"/>
+ <xsl:param name="end"/>
+ <xsl:variable name="byear" select="substring($begin,1,4)"/>
+ <xsl:variable name="bmonth" select="substring($begin,5,2)"/>
+ <xsl:variable name="bday" select="substring($begin,7,2)"/>
+ <xsl:variable name="eyear" select="substring($end,1,4)"/>
+ <xsl:variable name="emonth" select="substring($end,5,2)"/>
+ <xsl:variable name="eday" select="substring($end,7,2)"/>
+ <xsl:choose>
+  <xsl:when test="$byear != $eyear">
+   <xsl:call-template name="print_date">
+    <xsl:with-param name="date" select="$begin"/>
+   </xsl:call-template>
+   <xsl:call-template name="print_date">
+    <xsl:text> - </xsl:text>
+    <xsl:with-param name="date" select="$end"/>
+   </xsl:call-template>
+  </xsl:when>
+  <xsl:when test="$bmonth != $emonth">
+   <xsl:call-template name="print_month">
+    <xsl:with-param name="month" select="$bmonth"/>
+   </xsl:call-template>
+   <xsl:text> </xsl:text>
+   <xsl:call-template name="print_day">
+    <xsl:with-param name="day" select="$bday"/>
+   </xsl:call-template>
+   <xsl:text> - </xsl:text>
+   <xsl:call-template name="print_month">
+    <xsl:with-param name="month" select="$emonth"/>
+   </xsl:call-template>
+   <xsl:text> </xsl:text>
+   <xsl:call-template name="print_day">
+    <xsl:with-param name="day" select="$eday"/>
+   </xsl:call-template>
+   <xsl:text>, </xsl:text>
+   <xsl:value-of select="$byear"/>
+  </xsl:when>
+  <xsl:when test="$bday != $eday">
+   <xsl:call-template name="print_month">
+    <xsl:with-param name="month" select="$bmonth"/>
+   </xsl:call-template>
+   <xsl:text> </xsl:text>
+   <xsl:call-template name="print_day">
+    <xsl:with-param name="day" select="$bday"/>
+   </xsl:call-template>
+   <xsl:text> - </xsl:text>
+   <xsl:call-template name="print_day">
+    <xsl:with-param name="day" select="$eday"/>
+   </xsl:call-template>
+   <xsl:text>, </xsl:text>
+   <xsl:value-of select="$byear"/>
+  </xsl:when>
+  <xsl:otherwise>
+   <xsl:call-template name="print_date">
+    <xsl:with-param name="date" select="$begin"/>
+   </xsl:call-template>
+  </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="color_of_deadline_kind">
+ <xsl:param name="kind"/>
+ <xsl:choose>
+  <xsl:when test="$kind = 'submission'">
+   <xsl:text>red</xsl:text>
+  </xsl:when>
+  <xsl:when test="$kind = 'notification'">
+   <xsl:text>green</xsl:text>
+  </xsl:when>
+  <xsl:when test="$kind = 'registration'">
+   <xsl:text>blue</xsl:text>
+  </xsl:when>
+  <xsl:when test="$kind = 'camera-ready'">
+   <xsl:text>maroon</xsl:text>
+  </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
 </xsl:stylesheet>