Some changes for the CategorisedObjectList: Now the the items are sorted according to the sorting in the secondary category system.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2851 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c235738e2e
commit
b4cd75d64f
|
|
@ -253,7 +253,8 @@ public class CategorisedDataCollectionRenderer extends CMSDataCollectionRenderer
|
|||
|
||||
final Iterator properties = getProperties().iterator();
|
||||
while (properties.hasNext()) {
|
||||
final DataCollectionPropertyRenderer property = (DataCollectionPropertyRenderer) properties.
|
||||
final DataCollectionPropertyRenderer property
|
||||
= (DataCollectionPropertyRenderer) properties.
|
||||
next();
|
||||
property.render(objects, item);
|
||||
}
|
||||
|
|
@ -261,6 +262,10 @@ public class CategorisedDataCollectionRenderer extends CMSDataCollectionRenderer
|
|||
final Element path = Navigation.newElement(item, "path");
|
||||
path.setText(getStableURL(dobj, object));
|
||||
//item.addContent(path);
|
||||
if (currentCat != null
|
||||
&& currentCat.getSortKey(categorisedObj) != null) {
|
||||
item.addAttribute("sortKey", currentCat.getSortKey(categorisedObj).toString());
|
||||
}
|
||||
|
||||
generateItemXML(item, dobj, object, index);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,18 +26,45 @@
|
|||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||
version="1.0">
|
||||
|
||||
<xsl:import href="lib.xsl"/>
|
||||
|
||||
<xsl:output method="html"
|
||||
indent="yes"
|
||||
encoding="utf-8"/>
|
||||
|
||||
|
||||
<xsl:import href="lib.xsl"/>
|
||||
|
||||
<xsl:template match="bebop:page">
|
||||
|
||||
<div>
|
||||
<xsl:variable name="application">
|
||||
<xsl:choose>
|
||||
<xsl:when test="./@application">
|
||||
<xsl:value-of select="./@application"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'none'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="class" select="@class" />
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="document(concat($theme-prefix, '/settings/templates.xml'))/applications/application[@name=$application and @class=$class]">
|
||||
<xsl:call-template name="foundry:parse-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="document(concat($theme-prefix, '/settings/templates.xml'))/applications/application[@name=$application and @class=$class]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="foundry:process-template">
|
||||
<xsl:with-param name="template-file"
|
||||
select="document(concat($theme-prefix, '/settings/templates.xml'))/applications/default"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<!--<div>
|
||||
<h1>Hello from Foundry</h1>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -205,9 +205,12 @@
|
|||
<xsl:for-each select="nav:section">
|
||||
<xsl:sort select="./@sortKey" data-type="number"/>
|
||||
<li>
|
||||
<h2><xsl:value-of select="./@title"/></h2>
|
||||
<h2>
|
||||
<xsl:value-of select="./@title"/>
|
||||
</h2>
|
||||
<ul>
|
||||
<xsl:for-each select="nav:item">
|
||||
<xsl:sort select="./@sortKey"/>
|
||||
<li>
|
||||
<xsl:apply-templates select="." mode="list_view" />
|
||||
<div class="endFloat"/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue