Nachfuehren ccm-zes-aplaws zu Aenderungen in ccm-ldn-navigation.

git-svn-id: https://svn.libreccm.org/ccm/trunk@905 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2011-05-12 09:31:16 +00:00
parent 9f36c23ea9
commit f2387d424f
16 changed files with 102 additions and 85 deletions

View File

@ -18,9 +18,7 @@
package com.arsdigita.aplaws;
import com.arsdigita.london.navigation.Navigation;
import com.arsdigita.london.navigation.Template;
import com.arsdigita.london.navigation.TemplateMapping;
import com.arsdigita.london.terms.Domain;
import com.arsdigita.london.terms.importer.Parser;
import com.arsdigita.portalworkspace.PageLayout;
@ -37,19 +35,19 @@ import com.arsdigita.kernel.RoleCollection;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
import com.arsdigita.persistence.DataQuery;
import com.arsdigita.runtime.ScriptContext;
import com.arsdigita.util.Assert;
import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.util.parameter.BooleanParameter;
// import com.arsdigita.util.Assert;
// import com.arsdigita.util.UncheckedWrapperException;
// import com.arsdigita.util.parameter.BooleanParameter;
import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.StringParameter;
import com.arsdigita.util.parameter.URLParameter;
// import com.arsdigita.util.parameter.URLParameter;
import com.arsdigita.web.Application;
import org.apache.log4j.Logger;
import java.net.URL;
import java.net.MalformedURLException;
import java.util.Date;
// import java.net.URL;
// import java.net.MalformedURLException;
// import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
@ -138,6 +136,7 @@ public class Loader extends PackageLoader {
String[] files = categoryFiles;
final Parser parser = new Parser();
// for each filename in the array of files containing categories
for (int i = 0 ; i < files.length ; i++) {
final String file = files[i];
if (s_log.isInfoEnabled()) {
@ -181,10 +180,18 @@ public class Loader extends PackageLoader {
registerNavigationTemplates();
// Switch /portal/ to use 1 column layout for funky aplaws stuff.
Workspace portal = (Workspace)Application
// pboy: This will have no effect at all. A portal page created at
// url /portal/ (and beneath) will always use the homepage jsp's which
// are hardcoded to create a three column design and ignore any
// column configuration. All portal pages at other urls are not
// affect by this setting which touches only the one application (portal)
// at url /portal/. Portal pages at other urls use the corresponding
// configuration parameter for its initial value and number of columns
// may be modified at any time using configuration ui.
/* Workspace portal = (Workspace)Application
.retrieveApplicationForPath("/portal/");
portal.setDefaultLayout(PageLayout
.findLayoutByFormat(PageLayout.FORMAT_ONE_COLUMN));
.findLayoutByFormat(PageLayout.FORMAT_ONE_COLUMN)); */
} // end run method
// public void registerServicesTemplate(String appURL) {
@ -288,6 +295,7 @@ public class Loader extends PackageLoader {
// -- "com.arsdigita.aplaws.custom_nav_key",
// -- Parameter.REQUIRED,
// -- "APLAWS-NAVIGATION");
/* Zugriff auf Website wird nicht benötigt, aber der Parameter bei Einrichtung
* der Kategorien. Funktion URL prüft auf korrekte Syntax, nicht auf Existenz
*/
@ -354,8 +362,7 @@ public class Loader extends PackageLoader {
Application app = Application.retrieveApplicationForPath(appURL);
domain.setAsRootForObject(app, context);
if (app instanceof ContentSection) {
RoleCollection coll = ((ContentSection) app).getStaffGroup().
getOrderedRoles();
RoleCollection coll = ((ContentSection) app).getStaffGroup().getOrderedRoles();
Set adminRoles = new HashSet();
Set categorizeRoles = new HashSet();
while (coll.next()) {
@ -366,26 +373,22 @@ public class Loader extends PackageLoader {
String priv = (String) privs.get(RoleFactory.PRIVILEGE);
if (priv.equals(SecurityManager.CMS_CATEGORY_ADMIN)) {
adminRoles.add(role);
} else if (priv.equals(
SecurityManager.CMS_CATEGORIZE_ITEMS)) {
} else if (priv.equals(SecurityManager.CMS_CATEGORIZE_ITEMS)) {
categorizeRoles.add(role);
}
}
}
RootCategoryCollection catCollection = Category.getRootCategories(
((ContentSection) app));
RootCategoryCollection catCollection = Category.getRootCategories(((ContentSection) app));
while (catCollection.next()) {
Iterator adminIter = adminRoles.iterator();
while (adminIter.hasNext()) {
((Role) adminIter.next()).grantPermission(catCollection.
getCategory(),
((Role) adminIter.next()).grantPermission(catCollection.getCategory(),
PrivilegeDescriptor.ADMIN);
}
Iterator categorizeIter = categorizeRoles.iterator();
while (categorizeIter.hasNext()) {
((Role) categorizeIter.next()).grantPermission(catCollection.
getCategory(),
((Role) categorizeIter.next()).grantPermission(catCollection.getCategory(),
Category.MAP_DESCRIPTOR);
}
}

View File

@ -43,8 +43,9 @@ import com.arsdigita.london.terms.ui.TermWidget;
public class ItemCategoryPicker extends ACSObjectCategoryPicker {
private static final Logger s_log = Logger.getLogger(ItemCategoryPicker.class);
private static final Logger s_log = Logger.getLogger(ItemCategoryPicker.class);
// private static final class s_picker = this ;
public ItemCategoryPicker(BigDecimalParameter root,
StringParameter mode) {
@ -59,7 +60,8 @@ public class ItemCategoryPicker extends ACSObjectCategoryPicker {
com.arsdigita.bebop.parameters.BigDecimalParameter,
com.arsdigita.bebop.parameters.StringParameter)
*/
protected ACSObjectCategoryForm getForm(BigDecimalParameter root, StringParameter mode) {
protected ACSObjectCategoryForm getForm(BigDecimalParameter root,
StringParameter mode) {
s_log.debug("getForm");
return new ItemCategoryForm(root, mode, new TermWidget(mode, this));
}

View File

@ -8,6 +8,13 @@
title="childCategories"
cache="true">
<!-- Class had been moved from ccm-ldn-aplaws to ccm-ldn-terms in
order to avoid dependencies between modules, ccm-forum-categorised
and a specific kind of the integration module ccm-???-aplaws.
<define:component name="catSubtree"
classname="com.arsdigita.aplaws.ui.CategorySubtree"/>
-->
<define:component name="catSubtree"
classname="com.arsdigita.london.terms.ui.CategorySubtree"/>
</define:page>

View File

@ -23,6 +23,10 @@
</meta>
</xsl:template>
<!-- The file ~/lib/page.css does not exist at least since version 1.0.2
there exists a file of this name in
ccm-cms/web/__ccm__/static/cms/admin/page/page.css
may be a copy&paste error -->
<xsl:template name="aplaws:headerStyleSheets">
<link rel="stylesheet" href="/__ccm__/themes/aplaws/lib/page.css" type="text/css" media="screen"/>
</xsl:template>

View File

@ -8,7 +8,8 @@
<xsl:import href="head.xsl"/>
<xsl:import href="body.xsl"/>
<xsl:import href="../../../../../ROOT/packages/bebop/xsl/dcp.xsl"/>
<!-- <xsl:import href="../../../../packages/bebop/xsl/dcp.xsl"/> -->
<xsl:import href="../../../heirloom/packages/bebop/xsl/dcp.xsl"/>
<xsl:output method="html"/>

View File

@ -1,2 +1,2 @@
@import url("/css/acs-master.css");
@import url("/__ccm__/apps/navigation/xsl/admin.css");
@import url("/themes/heirloom/apps/navigation/xsl/admin.css");

View File

@ -4,8 +4,8 @@
xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0"
version="1.0">
<xsl:import href="../../../../ROOT/packages/bebop/xsl/bebop.xsl"/>
<xsl:import href="../../../../ROOT/packages/ui/xsl/ui.xsl"/>
<xsl:import href="../../heirloom/packages/bebop/xsl/bebop.xsl"/>
<xsl:import href="../../heirloom/packages/ui/xsl/ui.xsl"/>
<xsl:import href="lib/page.xsl"/>
<xsl:param name="theme-prefix" />

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0"
xmlns:ui="http://www.arsdigita.com/ui/1.0"
@ -10,9 +9,7 @@
exclude-result-prefixes="xsl bebop aplaws ui cms nav"
version="1.0">
<xsl:import href="../../../../ROOT/__ccm__/apps/navigation/xsl/index.xsl"/>
<xsl:import href="../../heirloom/apps/navigation/xsl/index.xsl"/>
<xsl:import href="content-section-index.xsl"/>
</xsl:stylesheet>

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0"
version="1.0">
<xsl:import href="../../../../ROOT/packages/bebop/xsl/bebop.xsl"/>
<xsl:import href="../../../../ROOT/packages/ui/xsl/ui.xsl"/>
<xsl:import href="../../heirloom/packages/bebop/xsl/bebop.xsl"/>
<xsl:import href="../../heirloom/packages/ui/xsl/ui.xsl"/>
<xsl:import href="lib/page.xsl"/>
<xsl:param name="theme-prefix" />

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0"
xmlns:ui="http://www.arsdigita.com/ui/1.0"
@ -15,7 +14,7 @@
<xsl:import href="lib/header.xsl"/>
<xsl:import href="lib/lib.xsl"/>
<xsl:import href="../../../../ROOT/packages/bebop/xsl/dcp.xsl"/>
<xsl:import href="../../heirloom/packages/bebop/xsl/dcp.xsl"/>
<xsl:param name="context-prefix"></xsl:param>
<xsl:param name="dispatcher-prefix" />

View File

@ -1,11 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0"
xmlns:terms="http://xmlns.redhat.com/london/terms/1.0"
version="1.0">
<xsl:import href="../../../../ROOT/__ccm__/apps/navigation/xsl/index.xsl"/>
<xsl:import href="../../heirloom/apps/navigation/xsl/index.xsl"/>
<xsl:import href="content-section-index.xsl"/>

View File

@ -11,12 +11,15 @@
exclude-result-prefixes="xsl bebop aplaws ui cms nav search portal"
version="1.0">
<xsl:import href="../../../../ROOT/__ccm__/apps/portalworkspace/xsl/index.xsl"/>
<!-- <xsl:import href="../../../__ccm__/apps/workspace/xsl/index.xsl"/> -->
<xsl:import href="../../heirloom/apps/portal-workspace/xsl/index.xsl"/>
<xsl:import href="portal/lib.xsl"/>
<xsl:import href="portal/portlets.xsl"/>
<xsl:import href="lib/header.xsl"/>
<xsl:import href="lib/lib.xsl"/>
<xsl:import href="../../../../ROOT/packages/bebop/xsl/dcp.xsl"/>
<!-- <xsl:import href="../../../packages/bebop/xsl/dcp.xsl"/> -->
<xsl:import href="../../heirloom/packages/bebop/xsl/dcp.xsl"/>
<xsl:param name="context-prefix"></xsl:param>
<xsl:param name="dispatcher-prefix" />
@ -41,7 +44,8 @@
<body>
<xsl:call-template name="bebop:dcpJavascript"/>
<a class="navHide" href="#startcontent" title="Go directly to main content"
<a class="navHide" href="#startcontent"
title="Go directly to main content"
accesskey="S">Skip over navigation</a>
<span class="hide">|</span>
<xsl:call-template name="header"/>

View File

@ -4,14 +4,16 @@
xmlns:aplaws="http://www.arsdigita.com/aplaws/1.0"
version="1.0">
<xsl:import href="../../../../ROOT/__ccm__/apps/portalworkspace/xsl/admin.xsl"/>
<!-- <xsl:import href="../../../__ccm__/apps/workspace/xsl/admin.xsl"/> -->
<xsl:import href="../../heirloom/apps/portal-workspace/xsl/admin.xsl"/>
<xsl:import href="lib/page.xsl"/>
<xsl:param name="theme-prefix" />
<xsl:param name="context-prefix" />
<xsl:template name="aplaws:headerStyleSheets">
<link rel="stylesheet" href="{$context-prefix}/css/acs-master.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="{$context-prefix}/css/acs-master.css"
type="text/css" media="screen"/>
</xsl:template>
</xsl:stylesheet>