summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2009-08-18 17:06:42 +0200
committerdakkar <dakkar@thenautilus.net>2009-08-18 17:06:42 +0200
commit87f192f681e1da5e9e355d8d4a94469542fc98f1 (patch)
tree61774ef2ebacc24e18ce2bf00d4b91e5cbaa8fd5 /templates
parentfeeds for all tags (diff)
downloadthenautilus-87f192f681e1da5e9e355d8d4a94469542fc98f1.tar.gz
thenautilus-87f192f681e1da5e9e355d8d4a94469542fc98f1.tar.bz2
thenautilus-87f192f681e1da5e9e355d8d4a94469542fc98f1.zip
lang chooser
Diffstat (limited to 'templates')
-rw-r--r--templates/du2html.xsl34
1 files changed, 25 insertions, 9 deletions
diff --git a/templates/du2html.xsl b/templates/du2html.xsl
index 576529c..0c0f28a 100644
--- a/templates/du2html.xsl
+++ b/templates/du2html.xsl
@@ -50,8 +50,9 @@
</x:variable>
<x:variable name="link-names" select="e:node-set($link-names-rtf)/node()" />
- <x:output method="html" encoding="utf-8"
- doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
+ <x:output method="xml" encoding="utf-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
indent="yes"/>
<x:template match="system_message" />
@@ -120,10 +121,13 @@
</head>
<body>
<div id="content">
- <h1><x:apply-templates select="title/node()"/></h1>
+ <h1>
+ <x:apply-templates select="title/node()"/>
+ </h1>
<x:apply-templates/>
</div>
<x:apply-templates select="docinfo" mode="tags" />
+ <x:call-template name="alternate-langs" />
<x:apply-templates select="docinfo" mode="nav-block" />
<div id="dates">
<x:apply-templates select="wc:dates-for($language,$filename,'./')"/>
@@ -146,6 +150,24 @@
</span>
</x:template>
+ <x:template name="alternate-langs">
+ <x:variable name="me" select="wc:dst-uri-for('.',/document/@source,1)" />
+ <x:variable name="alts">
+ <x:for-each select="wc:changes()/wc:changes/wc:document[@uri=$me]">
+ <x:if test="@lang != $language">
+ <li><a href="{@lang}"><x:value-of select="@lang"/></a></li>
+ </x:if>
+ </x:for-each>
+ </x:variable>
+ <x:if test="normalize-space($alts) != ''">
+ <div id="alt-langs">
+ <ul>
+ <x:copy-of select="$alts"/>
+ </ul>
+ </div>
+ </x:if>
+ </x:template>
+
<x:template match="/wc:tags">
<dl>
<x:apply-templates/>
@@ -228,12 +250,6 @@
</x:if>
</x:template>
- <x:template match="docinfo" mode="nav-block">
- <div id="nav-links">
- <x:apply-templates select="field" mode="nav-block"/>
- </div>
- </x:template>
-
<x:template match="&nav-fields;" mode="nav-block">
<x:variable name="rel"><x:value-of select="normalize-space(parent::field/field_name)" /></x:variable>
<x:variable name="label">