]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/on-line/xslt/toplevel_header.xsl
ocaml 3.09 transition
[helm.git] / helm / on-line / xslt / toplevel_header.xsl
index 4dc5a88c695a84a26a5c8b7774bd04a0dbca820d..88650a5a73066ccd0912ee0cfe4e97d77b8a0224 100644 (file)
@@ -5,6 +5,8 @@
   xmlns:helm="http://www.cs.unibo.it/helm"
   xmlns:html="http://www.w3.org/1999/xhtml">
 
+<xsl:include href="links_library.xsl" />
+
 <!-- add theory's breadcrumb trail -->
 <xsl:template name="breadcrumb_trail">
   <xsl:param name="path" select="''" />
@@ -13,7 +15,8 @@
     <xsl:when test="contains($path, '/')">
       <xsl:variable name="segment" select="substring-before($path,'/')" />
       <xsl:variable name="newacc" select="concat($acc, $segment, '/')" />
-      <html:a style="text-decoration: none" href="{$newacc}" helm:helm_link="href">
+      <html:a style="text-decoration: none"
+       href="{$newacc}" helm:helm_link="href">
        <xsl:value-of select="$segment" />
       </html:a>
       <xsl:text>/</xsl:text>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
-      <xsl:value-of select="$path" />
+     <xsl:variable name="path_before_body" select="substring-before($path,'.body')"/>
+     <xsl:variable name="cleanpath">
+      <xsl:choose>
+       <xsl:when test="$path_before_body = ''">
+        <xsl:value-of select="$path"/>
+       </xsl:when>
+       <xsl:otherwise>
+        <xsl:value-of select="$path_before_body"/>
+       </xsl:otherwise>
+      </xsl:choose>
+     </xsl:variable>
+     <xsl:value-of select="$cleanpath" />
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
 
 <xsl:template name="add_breadcrumb_trail">
   <xsl:param name="CICURI" select="''"/>
-<!--   <xsl:param name="prefix" select="''"/> -->
   <xsl:variable name="prefix" select="substring-before($CICURI, ':')" />
-  <html:h3 style="font-family: sans-serif">
-    <html:a style="text-decoration: none" href="{concat($prefix, ':/')}">
-      <xsl:value-of select="concat($prefix, ':')" />
-    </html:a>
-    <xsl:text>/</xsl:text>
-    <xsl:call-template name="breadcrumb_trail">
-      <xsl:with-param name="path" 
-       select="substring($CICURI, string-length($prefix)+3)" />
-      <xsl:with-param name="acc" select="concat($prefix, ':/')" />
-    </xsl:call-template>
-  </html:h3>
+  <html:table width="100%"><xsl:text>
+    </xsl:text>
+    <html:tr><xsl:text>
+      </xsl:text>
+      <html:td><xsl:text>
+       </xsl:text>
+       <html:span
+         style="font-family: sans-serif; font-weight: bold; font-size: 120%">
+         <html:a style="text-decoration: none"
+           href="{concat($prefix, ':/')}" helm:helm_link="href">
+           <xsl:value-of select="concat($prefix, ':')" />
+         </html:a>
+         <xsl:text>/</xsl:text>
+         <xsl:call-template name="breadcrumb_trail">
+           <xsl:with-param name="path" 
+             select="substring($CICURI, string-length($prefix)+3)" />
+           <xsl:with-param name="acc" select="concat($prefix, ':/')" />
+         </xsl:call-template>
+       </html:span><xsl:text>
+      </xsl:text>
+      </html:td><xsl:text>
+      </xsl:text>
+      <html:td style="text-align:right"><xsl:text>
+       </xsl:text>
+       <html:span style="font-family:sans-serif">
+         <xsl:variable name="searchLinkURL">
+           <xsl:call-template name="makeSearchLinkURL" />
+         </xsl:variable>
+         [<html:a href="{$searchLinkURL}" target="_top">search</html:a>]
+       </html:span><xsl:text>
+      </xsl:text>
+      </html:td><xsl:text>
+    </xsl:text>
+    </html:tr>
+  </html:table><xsl:text>
+  </xsl:text>
   <html:hr />
 </xsl:template>