svn commit: r611254 - in /lenya/trunk/src/webapp/lenya: resources/css/default.css xslt/util/introduction.xsl xslt/util/welcome.xsl
[email protected] Fri, 11 Jan 2008 18:38:20 -0000
Newsgroups
gmane.comp.cms.lenya.cvs
Message-ID
<[email protected] >
Author: andreas
Date: Fri Jan 11 10:38:16 2008
New Revision: 611254
URL: http://svn.apache.org/viewvc?rev=611254&view=rev
Log:
Simplified layout of overview pages
Modified:
lenya/trunk/src/webapp/lenya/resources/css/default.css
lenya/trunk/src/webapp/lenya/xslt/util/introduction.xsl
lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl
Modified: lenya/trunk/src/webapp/lenya/resources/css/default.css
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/resources/css/default.css?rev=611254&r1=611253&r2=611254&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/resources/css/default.css (original)
+++ lenya/trunk/src/webapp/lenya/resources/css/default.css Fri Jan 11 10:38:16 2008
@@ -125,33 +125,37 @@
color: black;
}
-.lenya-publication-item, .lenya-publication-item-createpublication {
+.lenya-publication-item {
padding: 0px 10px;
margin: 20px 0px;
-}
-
-.lenya-publication-item {
border-bottom: solid 1px #DDDCCF;
}
-.lenya-publication-item-createpublication {
- margin-bottom: 2em;
-}
-
.lenya-sidebar a {
text-decoration: none;
}
.lenya-sidebar ul {
- margin: 10px 0px;
- padding: 10px 0px 10px 20px;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding: 0;
list-style: none;
}
.lenya-sidebar li {
- padding: 0px;
- margin: 3px 0px;
- border-bottom: solid 1px #DDDCCF;
+ padding: 0;
+ margin: 3px 0;
+}
+
+.lenya-sidebar h2, .lenya-sidebar h3, .lenya-sidebar p, .lenya-sidebar table, .lenya-sidebar ul {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+.lenya-sidebar h2 {
+ font-size: medium;
+ margin-top: 2em;
+ margin-bottom: .5em;
}
.lenya-sidebar-heading {
Modified: lenya/trunk/src/webapp/lenya/xslt/util/introduction.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/util/introduction.xsl?rev=611254&r1=611253&r2=611254&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/util/introduction.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/util/introduction.xsl Fri Jan 11 10:38:16 2008
@@ -6,9 +6,9 @@
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -19,178 +19,181 @@
<!-- $Id: publication.xsl 473861 2006-11-12 03:51:14Z gregor $ -->
<xsl:stylesheet
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1"
- xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
- xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
- xmlns="http://www.w3.org/1999/xhtml"
->
-
-
-<xsl:key name="workflows" match="lenya:resource-type" use="@workflow"/>
-
-<xsl:template match="/*">
-<page:page>
- <page:title><a href="../index.html">Apache Lenya</a> »
- <i18n:translate>
- <i18n:text>... Publication</i18n:text>
- <i18n:param><xsl:value-of select="lenya:publication/lenya:name"/></i18n:param>
- </i18n:translate>
- </page:title>
- <page:head/>
- <page:body>
- <div class="lenya-sidebar">
- <div class="lenya-sidebar-heading"><i18n:text>This Publication</i18n:text></div>
- <ul>
- <li><a href="authoring/"><i18n:text>Login as Editor</i18n:text></a></li>
- <li><a href="live/"><i18n:text>Live View</i18n:text></a></li>
- </ul>
- <div class="lenya-publication-item"><a href="../index.html"><i18n:text>Other Publications</i18n:text></a></div>
- <div class="lenya-publication-item"><a href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></a></div>
- <div class="lenya-publication-item"><a href="http://wiki.apache.org/lenya">Wiki</a></div>
- </div>
-
- <div class="lenya-frontpage">
- <h2><i18n:text>Publication properties</i18n:text>:</h2>
- <xsl:apply-templates select="lenya:publication"/>
- <xsl:apply-templates select="page:page"/>
-
- </div>
- </page:body>
-</page:page>
-</xsl:template>
-
-<xsl:template match="lenya:publication">
- <table class="lenya-table-list-noborder">
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Name</i18n:text></th>
- <td class="border"><xsl:value-of select="lenya:name"/></td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Revision</i18n:text></th>
- <td class="border"><xsl:value-of select="lenya:version"/></td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Description</i18n:text></th>
- <td class="border"><xsl:value-of select="lenya:description"/></td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Available languages</i18n:text></th>
- <td class="border">
- <xsl:for-each select="lenya:languages/lenya:language">
- <xsl:choose>
- <xsl:when test="@default">
- <strong><xsl:value-of select="."/></strong>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="position() != last()">
- <xsl:text>, </xsl:text>
- </xsl:if>
- </xsl:for-each>
- </td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Available resource types</i18n:text></th>
- <td class="border">
- <xsl:if test="lenya:templates/lenya:template">
- <i18n:text>Inherited: see template publication</i18n:text><br/>
- </xsl:if>
- <xsl:for-each
- select="lenya:resource-types/lenya:resource-type[generate-id(.)=generate-id(key('workflows', @workflow)[1])]"
- >
- <xsl:sort select="@workflow"/>
- <xsl:for-each select="key('workflows', @workflow)">
- <xsl:sort select="@name"/>
- <xsl:value-of select="@name"/>
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:lenya="http://apache.org/cocoon/lenya/publication/1.1"
+ xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns="http://www.w3.org/1999/xhtml"
+ >
+
+
+ <xsl:key name="workflows" match="lenya:resource-type" use="@workflow"/>
+
+ <xsl:template match="/*">
+ <page:page>
+ <page:title><a href="../index.html">Apache Lenya</a> »
+ <i18n:translate>
+ <i18n:text>... Publication</i18n:text>
+ <i18n:param><xsl:value-of select="lenya:publication/lenya:name"/></i18n:param>
+ </i18n:translate>
+ </page:title>
+ <page:head/>
+ <page:body>
+ <div class="lenya-sidebar">
+ <h2><i18n:text>This Publication</i18n:text></h2>
+ <ul>
+ <li><a href="authoring/"><i18n:text>Login as Editor</i18n:text></a></li>
+ <li><a href="live/"><i18n:text>Live View</i18n:text></a></li>
+ </ul>
+ <h2><i18n:text>Links</i18n:text></h2>
+ <ul>
+ <li><a href="../index.html"><i18n:text>Other Publications</i18n:text></a></li>
+ <li><a href="http://lenya.apache.org/docs/index.html"><i18n:text>Documentation</i18n:text></a></li>
+ <li><a href="http://wiki.apache.org/lenya">Wiki</a></li>
+ </ul>
+ </div>
+
+ <div class="lenya-frontpage">
+ <h2><i18n:text>Publication properties</i18n:text>:</h2>
+ <xsl:apply-templates select="lenya:publication"/>
+ <xsl:apply-templates select="page:page"/>
+
+ </div>
+ </page:body>
+ </page:page>
+ </xsl:template>
+
+ <xsl:template match="lenya:publication">
+ <table class="lenya-table-list-noborder">
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Name</i18n:text></th>
+ <td class="border"><xsl:value-of select="lenya:name"/></td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Revision</i18n:text></th>
+ <td class="border"><xsl:value-of select="lenya:version"/></td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Description</i18n:text></th>
+ <td class="border"><xsl:value-of select="lenya:description"/></td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Available languages</i18n:text></th>
+ <td class="border">
+ <xsl:for-each select="lenya:languages/lenya:language">
+ <xsl:choose>
+ <xsl:when test="@default">
+ <strong><xsl:value-of select="."/></strong>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
- <xsl:text> (Workflow: </xsl:text>
- <xsl:value-of select="@workflow"/>
- <xsl:text>)</xsl:text>
- <xsl:if test="position() != last()">
- <xsl:text>;</xsl:text><br />
+ </td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Available resource types</i18n:text></th>
+ <td class="border">
+ <xsl:if test="lenya:templates/lenya:template">
+ <i18n:text>Inherited: see template publication</i18n:text><br/>
</xsl:if>
- </xsl:for-each>
- </td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Required Lenya version</i18n:text></th>
- <td class="border"><xsl:value-of select="lenya:lenya-version"/></td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Required Lenya revision</i18n:text></th>
- <td class="border"><xsl:value-of select="lenya:lenya-revision"/></td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Required Cocoon version</i18n:text></th>
- <td class="border"><xsl:value-of select="lenya:cocoon-version"/></td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Modules used</i18n:text></th>
- <td class="border">
- <xsl:if test="lenya:templates/lenya:template">
- <i18n:text>Inherited: see template publication</i18n:text><br/>
- </xsl:if>
- <xsl:for-each select="lenya:modules/lenya:module">
- <xsl:value-of select="@name"/>
- <xsl:if test="position() != last()">
- <xsl:text>, </xsl:text>
+ <xsl:for-each
+ select="lenya:resource-types/lenya:resource-type[generate-id(.)=generate-id(key('workflows', @workflow)[1])]"
+ >
+ <xsl:sort select="@workflow"/>
+ <xsl:for-each select="key('workflows', @workflow)">
+ <xsl:sort select="@name"/>
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ <xsl:text> (Workflow: </xsl:text>
+ <xsl:value-of select="@workflow"/>
+ <xsl:text>)</xsl:text>
+ <xsl:if test="position() != last()">
+ <xsl:text>;</xsl:text><br />
+ </xsl:if>
+ </xsl:for-each>
+ </td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Required Lenya version</i18n:text></th>
+ <td class="border"><xsl:value-of select="lenya:lenya-version"/></td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Required Lenya revision</i18n:text></th>
+ <td class="border"><xsl:value-of select="lenya:lenya-revision"/></td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Required Cocoon version</i18n:text></th>
+ <td class="border"><xsl:value-of select="lenya:cocoon-version"/></td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Modules used</i18n:text></th>
+ <td class="border">
+ <xsl:if test="lenya:templates/lenya:template">
+ <i18n:text>Inherited: see template publication</i18n:text><br/>
</xsl:if>
- </xsl:for-each>
- </td>
- </tr>
- <tr>
- <th style="white-space: nowrap;"><i18n:text>Template used</i18n:text></th>
- <td class="border">
- <xsl:choose>
- <xsl:when test="lenya:template">
- <a href="../{lenya:template/@id}/introduction.html">
- <xsl:value-of select="lenya:template/@id"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <i18n:text>none</i18n:text>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- </table>
-</xsl:template>
-
-<xsl:template match="page:page">
-<!-- FIXME: aggregate-fallback seems to return the last document twice.
- The position predicate is just a quick workaround and needs to be fixed! -->
- <xsl:for-each select="page:body[position() < last()]">
- <xsl:apply-templates select="*"/>
- </xsl:for-each>
-</xsl:template>
-
-<!-- we are aggretating into a new context:
- (another good reason to move to xhtml2) -->
-<xsl:template match="xhtml:h1">
- <h2><xsl:apply-templates select="@*|node()"/></h2>
-</xsl:template>
-<xsl:template match="xhtml:h2">
- <h3><xsl:apply-templates select="@*|node()"/></h3>
-</xsl:template>
-<xsl:template match="xhtml:h3">
- <h4><xsl:apply-templates select="@*|node()"/></h4>
-</xsl:template>
-<xsl:template match="xhtml:h4">
- <h5><xsl:apply-templates select="@*|node()"/></h5>
-</xsl:template>
-<xsl:template match="xhtml:h5|xhtml:h6">
- <h6><xsl:apply-templates select="@*|node()"/></h6>
-</xsl:template>
-
-<xsl:template match="@*|node()">
- <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
-</xsl:template>
-
+ <xsl:for-each select="lenya:modules/lenya:module">
+ <xsl:value-of select="@name"/>
+ <xsl:if test="position() != last()">
+ <xsl:text>, </xsl:text>
+ </xsl:if>
+ </xsl:for-each>
+ </td>
+ </tr>
+ <tr>
+ <th style="white-space: nowrap;"><i18n:text>Template used</i18n:text></th>
+ <td class="border">
+ <xsl:choose>
+ <xsl:when test="lenya:template">
+ <a href="../{lenya:template/@id}/introduction.html">
+ <xsl:value-of select="lenya:template/@id"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <i18n:text>none</i18n:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ </table>
+ </xsl:template>
+
+ <xsl:template match="page:page">
+ <!-- FIXME: aggregate-fallback seems to return the last document twice.
+ The position predicate is just a quick workaround and needs to be fixed! -->
+ <xsl:for-each select="page:body[position() < last()]">
+ <xsl:apply-templates select="*"/>
+ </xsl:for-each>
+ </xsl:template>
+
+ <!-- we are aggretating into a new context:
+ (another good reason to move to xhtml2) -->
+ <xsl:template match="xhtml:h1">
+ <h2><xsl:apply-templates select="@*|node()"/></h2>
+ </xsl:template>
+ <xsl:template match="xhtml:h2">
+ <h3><xsl:apply-templates select="@*|node()"/></h3>
+ </xsl:template>
+ <xsl:template match="xhtml:h3">
+ <h4><xsl:apply-templates select="@*|node()"/></h4>
+ </xsl:template>
+ <xsl:template match="xhtml:h4">
+ <h5><xsl:apply-templates select="@*|node()"/></h5>
+ </xsl:template>
+ <xsl:template match="xhtml:h5|xhtml:h6">
+ <h6><xsl:apply-templates select="@*|node()"/></h6>
+ </xsl:template>
+
+ <xsl:template match="@*|node()">
+ <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
+ </xsl:template>
+
</xsl:stylesheet>
Modified: lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl?rev=611254&r1=611253&r2=611254&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl (original)
+++ lenya/trunk/src/webapp/lenya/xslt/util/welcome.xsl Fri Jan 11 10:38:16 2008
@@ -43,34 +43,34 @@
<xsl:template match="lenya:publications">
<div class="lenya-sidebar">
- <div class="lenya-sidebar-heading"><i18n:text>Publications</i18n:text></div>
- <div class="lenya-publication-item-createpublication">
- <a href="index.html?lenya.usecase=templating.createPublicationFromTemplate">
- <i18n:text>create-publication</i18n:text> »
- </a>
- </div>
- <!-- do not list publications with @show="false"
- (can be used to hide template publications -->
- <table class="lenya-table-list-noborder" style="margin: 0 1em">
- <tr>
- <th><i18n:text>ID</i18n:text></th>
- <th><i18n:text>Name</i18n:text></th>
- </tr>
- <xsl:for-each select="lenya:publication[not(@show) or @show != 'false']">
+ <h2><i18n:text>Publications</i18n:text></h2>
+ <p>
+ <a href="index.html?lenya.usecase=templating.createPublicationFromTemplate">
+ <i18n:text>create-publication</i18n:text> »
+ </a>
+ </p>
+ <table class="lenya-table-list-noborder">
<tr>
- <td>
- <a class="lenyaPubId">
- <xsl:attribute name="href"><xsl:value-of select="@dirname"/><xsl:text>/introduction.html</xsl:text></xsl:attribute>
- <xsl:attribute name="title"><xsl:value-of select="lenya:description"/></xsl:attribute>
- <xsl:value-of select="@dirname"/>
- </a>
- </td>
- <td>
- <span class="lenyaPubName"><xsl:value-of select="lenya:name"/></span>
- </td>
+ <th><i18n:text>ID</i18n:text></th>
+ <th><i18n:text>Name</i18n:text></th>
</tr>
- </xsl:for-each>
- </table>
+ <!-- do not list publications with @show="false"
+ (can be used to hide template publications) -->
+ <xsl:for-each select="lenya:publication[not(@show) or @show != 'false']">
+ <tr>
+ <td>
+ <a class="lenyaPubId">
+ <xsl:attribute name="href"><xsl:value-of select="@dirname"/><xsl:text>/introduction.html</xsl:text></xsl:attribute>
+ <xsl:attribute name="title"><xsl:value-of select="lenya:description"/></xsl:attribute>
+ <xsl:value-of select="@dirname"/>
+ </a>
+ </td>
+ <td>
+ <span class="lenyaPubName"><xsl:value-of select="lenya:name"/></span>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
</div>
</xsl:template>