Forum wird jetzt als legacy free application initialisiert, Update Skript enthalten, verschiedene Formatierungen.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1499 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2012-02-08 19:05:57 +00:00
parent b68d483a9d
commit 83a518004c
23 changed files with 1692 additions and 1437 deletions

View File

@ -366,24 +366,24 @@ div.tabbed-pane table.tab-set td.tab-label {
margin-left: 4px;
padding: 5px 0 3px 10px;
background: rgb(225,225,225) url(/css/tabbed-pane/tab-unselected.png) no-repeat;
background: rgb(225,225,225) url(/themes/heirloom/css/tabbed-pane/tab-unselected.png) no-repeat;
}
div.tabbed-pane table.tab-set td.tab-end {
width: 10px;
background: url(/css/tabbed-pane/tab-unselected-end.png) no-repeat;
background: url(/themes/heirloom/css/tabbed-pane/tab-unselected-end.png) no-repeat;
}
div.tabbed-pane table.tab-set td.current-tab-label {
margin-left: 4px;
padding: 5px 0 3px 10px;
background: rgb(162,30,30) url(/css/tabbed-pane/tab-selected.png) no-repeat;
background: rgb(162,30,30) url(/themes/heirloom/css/tabbed-pane/tab-selected.png) no-repeat;
color: white;
}
div.tabbed-pane table.tab-set td.current-tab-end {
width: 10px;
background: url(/css/tabbed-pane/tab-selected-end.png) no-repeat;
background: url(/themes/heirloom/css/tabbed-pane/tab-selected-end.png) no-repeat;
}
div.tabbed-pane table.tab-set td.tab-spacer {
@ -393,7 +393,7 @@ div.tabbed-pane table.tab-set td.tab-spacer {
div.tabbed-pane table.rule {
margin-left: 10px;
width: 100%;
background: rgb(162,30,30) url(/css/tabbed-pane/tab-bar.png) repeat-x;
background: rgb(162,30,30) url(/themes/heirloom/css/tabbed-pane/tab-bar.png) repeat-x;
height: 10px;
}

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:forum="http://www.arsdigita.com/forum/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:search="http://rhea.redhat.com/search/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
exclude-result-prefixes="xsl bebop nav search portal forum cms"
version="1.0">
<xsl:stylesheet xmlns:forum="http://www.arsdigita.com/forum/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:search="http://rhea.redhat.com/search/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
exclude-result-prefixes="xsl bebop nav search portal forum cms"
version="1.0">
<!-- IMPORT DEFINITIONS ccm-forum installed as separate web application
<xsl:import href="../../../../ROOT/themes/heirloom/packages/bebop/xsl/bebop.xsl" />
@ -16,9 +16,9 @@
-->
<!-- IMPORT DEFINITIONS ccm-forum installed into the main CCM webapp
-->
<xsl:import href="../../../packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../../packages/ui/xsl/ui.xsl" />
<xsl:import href="../../../packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../heirloom/packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../heirloom/packages/ui/xsl/ui.xsl" />
<!-- <xsl:import href="../../heirloom/packages/bebop/xsl/bebop.xsl" /> -->
<xsl:import href="lib/header.xsl" />
<xsl:import href="lib/lib.xsl" />
@ -28,7 +28,7 @@
-->
<!-- IMPORT DEFINITIONS ccm-forum installed into the main CCM webapp
-->
<xsl:import href="../../../packages/bebop/xsl/dcp.xsl"/>
<xsl:import href="../../heirloom/packages/bebop/xsl/dcp.xsl"/>

View File

@ -18,23 +18,14 @@
package com.arsdigita.cms.contentassets;
import com.arsdigita.cms.AuthoringKit;
import com.arsdigita.cms.AuthoringKitStepAssociation;
import com.arsdigita.cms.AuthoringStep;
import com.arsdigita.cms.ContentPage;
import com.arsdigita.cms.contenttypes.GenericArticle;
import com.arsdigita.cms.contenttypes.ContentAssetInitializer;
// import com.arsdigita.cms.contentassets.ItemImageAttachment;
import com.arsdigita.cms.contentassets.ui.ImageStep;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.domain.DomainObjectFactory;
import com.arsdigita.domain.DomainObjectInstantiator;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.persistence.DataCollection;
import com.arsdigita.persistence.DataObject;
import com.arsdigita.persistence.PersistenceException;
import com.arsdigita.persistence.SessionManager;
import com.arsdigita.persistence.metadata.ObjectType;
import com.arsdigita.runtime.DomainInitEvent;
/**

View File

@ -22,13 +22,13 @@ import com.arsdigita.runtime.CompoundInitializer;
import com.arsdigita.runtime.RuntimeConfig;
import com.arsdigita.runtime.PDLInitializer;
import com.arsdigita.runtime.DomainInitEvent;
// import com.arsdigita.runtime.LegacyInitEvent;
import com.arsdigita.globalization.GlobalizedMessage;
import com.arsdigita.db.DbHelper;
import com.arsdigita.persistence.pdl.ManifestSource;
import com.arsdigita.persistence.pdl.NameFilter;
import com.arsdigita.xml.XML;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import org.apache.log4j.Logger;
@ -71,7 +71,8 @@ public abstract class ContentAssetInitializer extends CompoundInitializer {
*/
@Override
public void init(DomainInitEvent evt) {
System.err.println("ContentAssetInitializer init running...");
s_log.info("ContentAssetInitializer init running...");
// System.err.println("ContentAssetInitializer init running...");
super.init(evt);
@ -89,30 +90,6 @@ public abstract class ContentAssetInitializer extends CompoundInitializer {
);
}
// Up to version 6.5 ContentAssetInitilizer used init(LegacyInitEvent) for
// initialization, even though it actually initializes the domain coupling
// machinery which is the domain of init(DomainInitEvent). It even didn't
// use any of the legacy initialization features (enterprise.init file).
// Switched to domain init because legacy init is deprecated and we will get
// rid of it. Retained here commented out for documentation purpose during
// transition of contributed content types.
/* public void init(LegacyInitEvent evt) {
super.init(evt);
final String traversal = getTraversalXML();
XML.parseResource
(traversal,
new ContentAssetTraversalHandler(getProperty()));
AuthoringKitWizard.registerAssetStep(
getBaseType(),
getAuthoringStep(),
getAuthoringStepLabel(),
getAuthoringStepDescription(),
getAuthoringStepSortKey()
);
} */
/**
* The base type against which the asset is defined,

View File

@ -44,6 +44,7 @@ log4j.logger.com.arsdigita.packaging.Loader=INFO
# log4j.logger.com.arsdigita.core.Initializer=INFO
# log4j.logger.com.arsdigita.cms.Loader=INFO
# log4j.logger.com.arsdigita.cms.Initializer=INFO
log4j.logger.com.arsdigita.forum.Loader=INFO
# For seeing progress of legacy initialization process
#log4j.logger.com.arsdigita.initializer.Script=INFO

View File

@ -2,7 +2,7 @@
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
name="ccm-forum"
prettyName="Forum"
version="6.6.1"
version="6.6.2"
release="1"
webapp="ROOT">

View File

@ -0,0 +1,131 @@
--
-- Copyright (C) 2012 Peter Boy. All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- $Id: remove_legacy_entries.sql $
-- ccm-forum is now initialized as a legacy free type of
-- application so entries in tables apm_package_types are no longer needed.
-- in case there may be several application instances!
-- delete from object_context all entries referring to node_id in site_nodes
delete from object_context
where object_id in
(select node_id from site_nodes object_id where object_id in
( select package_id from applications where application_type_id =
(select application_type_id from application_types
where object_type
like '%forum.Forum%')
)
);
-- delete from acs_objects all entries referring to node_id in site_nodes
alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
delete from acs_objects
where object_id in
(select node_id from site_nodes where object_id in
( select package_id from applications where application_type_id =
(select application_type_id from application_types
where object_type
like '%forum.Forum%')
)
);
-- delete all entries in site_nodes referring to a Forum instance
delete from site_nodes
where object_id in
(select package_id from applications where application_type_id =
(select application_type_id from application_types
where object_type
like '%forum.Forum%')
);
alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
FOREIGN KEY (node_id)
REFERENCES acs_objects (object_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION ;
-- delete from object_context all entries referring to package_id in apm_packages
delete from object_context
where object_id in
(select package_id from apm_packages where package_type_id =
(select package_type_id from application_types
where object_type
like '%forum.Forum%')
);
-- delete from acs_objects all entries referring to package_id in apm_packages
alter table apm_packages drop constraint apm_package_package_id_f_46may ;
alter table applications drop constraint application_package_id_f_cdaho ;
delete from acs_objects
where object_id in
(select package_id from apm_packages where package_type_id =
(select package_type_id from application_types
where object_type
like '%forum.Forum%')
);
-- delete all entries for Forum instances in apm_packages
-- identified by package_type_id in application_types
delete from apm_packages
where package_type_id =
(select package_type_id from application_types
where object_type
like '%forum.Forum%') ;
-- there seem to be no intries for a apm_packages_types entry (row) in
-- acs_objects or object_context!
-- delete all entries for subsite in apm_package_types identified by
-- package_type_id in application_types
alter table application_types drop constraint applica_typ_pac_typ_id_f_v80ma ;
delete from apm_package_types
where package_type_id =
(select package_type_id from application_types
where object_type
like '%forum.Forum%') ;
-- set package_id to null for all entries referring to a Forum instance
-- (indicating a new legacy free application)
update applications
set package_id = null
where application_type_id =
(select application_type_id from application_types
where object_type
like '%forum.Forum%') ;
-- set package_id to null for all entries referring to a Forum instance
-- (indicating a new legacy free application)
update application_types
set package_type_id = null
where object_type like '%forum.Forum%' ;
alter table application_types add constraint applica_typ_pac_typ_id_f_v80ma
FOREIGN KEY (package_type_id)
REFERENCES apm_package_types (package_type_id)
MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ;
alter table applications add constraint application_package_id_f_cdaho
FOREIGN KEY (package_id)
REFERENCES apm_packages (package_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION ;
alter table apm_packages add constraint apm_package_package_id_f_46may
FOREIGN KEY (package_id)
REFERENCES acs_objects (object_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION ;

View File

@ -17,7 +17,7 @@
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
PROMPT APLAWS ccm-forum 6.5.0 -> 6.5.1 Upgrade Script (Oracle)
PROMPT OpenCCM ccm-forum 6.6.0 -> 6.6.1 Upgrade Script (Oracle)
@@ default/6.6.0-6.6.1/add_ispublic.sql

View File

@ -0,0 +1,24 @@
--
-- Copyright (C) chris.gilbert@westsussex.gov.uk All Rights Reserved.
-- Copyright (C) pb@zes.uni-bremen.de All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- Update: Forum now loaded as legacy free application
PROMPT OpenCCM ccm-forum 6.6.1 -> 6.6.2 Upgrade Script (Oracle)
@@ default/6.6.1-6.6.2/remove_legacy_entries.sql

View File

@ -17,7 +17,7 @@
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
\echo APLAWS ccm-forum 6.5.0 -> 6.5.1 Upgrade Script (PostgreSQL)
\echo APLAWS ccm-forum 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL)
begin;

View File

@ -0,0 +1,30 @@
--
-- Copyright (C) chris.gilbert@westsussex.gov.uk All Rights Reserved.
-- Copyright (C) pb@zes.uni-bremen.de All Rights Reserved.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public License
-- as published by the Free Software Foundation; either version 2.1 of
-- the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- You should have received a copy of the GNU Lesser General Public
-- License along with this library; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--
-- Update: Forum now loaded as legacy free application
\echo OpenCCM ccm-forum 6.6.1 -> 6.6.2 Upgrade Script (PostgreSQL)
begin;
\i default/6.6.1-6.6.2/remove_legacy_entries.sql
commit;

View File

@ -15,4 +15,8 @@
<version from="6.6.0" to="6.6.1">
<script sql="ccm-forum/upgrade/::database::-6.6.0-6.6.1.sql"/>
</version>
<version from="6.6.1" to="6.6.2">
<!-- Forum now initialized as a legacy free application -->
<script sql="ccm-forum/upgrade/::database::-6.6.1-6.6.2.sql"/>
</version>
</upgrade>

View File

@ -361,10 +361,10 @@ public class Forum extends Application {
PrivilegeDescriptor.ADMIN,
this,
getAdminGroup()));
s_log.debug("Current user : "
+ Kernel.getContext().getParty().getPrimaryEmail()
+ " class is "
+ Kernel.getContext().getParty().getClass());
// s_log.debug("Current user : "
// + Kernel.getContext().getParty().getPrimaryEmail()
// + " class is "
// + Kernel.getContext().getParty().getClass());
//
// chris.gilbert@westsussex.gov.uk Original plan was that

View File

@ -57,6 +57,7 @@ public class ForumPageBuilder implements PageBuilder, Constants {
//Output the title in an easy to find place
page.add(new SimpleComponent(){
@Override
public void generateXML(PageState state, Element parent) {
Element nameElement = parent.newChildElement(
Constants.FORUM_XML_PREFIX +

View File

@ -37,16 +37,23 @@ import org.apache.log4j.Logger;
public class ForumPageFactory {
private static final Logger logger = Logger.getLogger(ForumPageFactory.class);
public static final String THREAD_PAGE = "thread";
public static final String FORUM_PAGE = "forum";
private static Map pageBuilders = new HashMap();
static {
logger.debug("Static initalizer starting...");
/**
* Constructor
*/
public ForumPageFactory() {
logger.debug("Constructor starting...");
// default pageBuilders are those provided with this project
pageBuilders.put(THREAD_PAGE, new ThreadPageBuilder());
pageBuilders.put(FORUM_PAGE, new ForumPageBuilder());
logger.debug("Static initalizer finished.");
logger.debug("Constructor finished.");
}
public static Page getPage(String pageType) {

View File

@ -18,13 +18,12 @@
*/
package com.arsdigita.forum;
import com.arsdigita.cms.util.Util;
import com.arsdigita.forum.portlet.MyForumsPortlet;
import com.arsdigita.forum.portlet.RecentPostingsPortlet;
import com.arsdigita.kernel.EmailAddress;
import com.arsdigita.kernel.Kernel;
import com.arsdigita.kernel.KernelExcursion;
// unused?
// import com.arsdigita.kernel.Party;
import com.arsdigita.kernel.User;
import com.arsdigita.kernel.UserCollection;
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
@ -33,6 +32,8 @@ import com.arsdigita.persistence.SessionManager;
import com.arsdigita.portal.PortletType;
import com.arsdigita.portal.apportlet.AppPortletType;
import com.arsdigita.runtime.ScriptContext;
import com.arsdigita.util.parameter.Parameter;
import com.arsdigita.util.parameter.StringArrayParameter;
import com.arsdigita.web.ApplicationType;
import org.apache.log4j.Logger;
@ -50,9 +51,54 @@ import org.apache.log4j.Logger;
*/
public class Loader extends PackageLoader {
// ///////////////////////////////////////////////////////////////////
// Configurable parameters during load step.
// ///////////////////////////////////////////////////////////////////
/**
* Intentionally we don't create forum instance(s) by default during load
* step. Forum instances are created on demand using the admin ui.
*
* By specifying forum urls during load step you may install one or more
* forum instances, which are installed as root applications (i.e. without
* a parent application).
*
* Example:
* com.arsdigita.forum.forum_names=general-discussions,specific-discussion
* will create 2 forum instances accessible at
* [host]:/ccm/general-discussions
* [host]:/ccm/specific-discussions
*
* Additional forum instances can be created using the sitmap.jsp ui
* choosing either /navigation (i.e. an Navigation instance), /content (i.
* e. a ContentSection instance) or one of the created instances as
* parent applicaation.
*/
private final Parameter m_forumInstances = new StringArrayParameter(
"com.arsdigita.forum.forum_names",
Parameter.OPTIONAL,
new String[] { }
);
/** Private logger instance for debugging purpose. */
private static final Logger s_log = Logger.getLogger(Loader.class);
/**
* Standard constructor.
*/
public Loader() {
s_log.debug("forum.Loader (Constructor) invoked");
register(m_forumInstances);
s_log.debug("forum.Loader (Constructor) completed");
}
/**
*
* @param ctx
*/
public void run(final ScriptContext ctx) {
new KernelExcursion() {
@ -60,11 +106,14 @@ public class Loader extends PackageLoader {
setEffectiveParty(Kernel.getSystemParty());
setupPrivileges();
setupForumAppType();
setupDigestUser();
setupForumAppType( (String[]) get(m_forumInstances) );
//setupInboxAppType(); //TODO: why it is commented out?
setupRecentPostingsPortletType();
setupMyForumsPortletType();
setupDigestUser();
// moved upwards
// setupDigestUser();
SessionManager.getSession().flushAll();
}
@ -72,16 +121,39 @@ public class Loader extends PackageLoader {
}
/**
* Creates Forum as a legacy-compatible application type.
* Creates Forum as a legacy-free application type.
*
* We just create the application type, intentionally not an application
* instance (see above).
*
* @return
*/
private static ApplicationType setupForumAppType() {
ApplicationType type = ApplicationType
.createApplicationType(Forum.PACKAGE_TYPE,
"Discussion Forum Application",
Forum.BASE_DATA_OBJECT_TYPE);
type.setDescription("An electronic bulletin board system.");
return type;
private static void setupForumAppType(String[] forumNames) {
/* Create legacy-free application type
* NOTE: The wording in the title parameter of ApplicationType
* determines the name of the subdirectory for the XSL stylesheets.
* It gets "urlized", i.e. trimming leading and trailing blanks and
* replacing blanks between words and illegal characters with an
* hyphen and converted to lower case.
* "Forum" will become "forum". */
ApplicationType type = new ApplicationType("Forum",
Forum.BASE_DATA_OBJECT_TYPE );
type.setDescription("An electronic bulletin board system (disussion forum).");
type.save();
for (int i = 0 ; i < forumNames.length ; i++) {
final String forumName = forumNames[i];
Util.validateURLParameter("name", forumName);
s_log.info("Creating forum instance on /" + forumName);
Forum.create(forumName,forumName,null);
}
s_log.info("Forum setup completed");
return ;
}
/**
@ -90,10 +162,10 @@ public class Loader extends PackageLoader {
* @return
*/
private static ApplicationType setupInboxAppType() {
ApplicationType type =
ApplicationType.createApplicationType(Forum.PACKAGE_TYPE,
"Inbox",
"com.arsdigita.forum.Inbox");
ApplicationType type = ApplicationType
.createApplicationType(Forum.PACKAGE_TYPE,
"Inbox",
"com.arsdigita.forum.Inbox");
type.setDescription("Inbox");
return type;
}
@ -105,9 +177,9 @@ public class Loader extends PackageLoader {
public static AppPortletType setupRecentPostingsPortletType() {
AppPortletType type =
AppPortletType.createAppPortletType(
"Recent Forum Postings",
PortletType.WIDE_PROFILE,
RecentPostingsPortlet.BASE_DATA_OBJECT_TYPE);
"Recent Forum Postings",
PortletType.WIDE_PROFILE,
RecentPostingsPortlet.BASE_DATA_OBJECT_TYPE);
type.setProviderApplicationType(Forum.BASE_DATA_OBJECT_TYPE);
type.setPortalApplication(true);
type.setDescription("Displays the most recent postings "
@ -158,18 +230,26 @@ public class Loader extends PackageLoader {
*/
public static void setupPrivileges() {
PrivilegeDescriptor.createPrivilege(Forum.FORUM_READ_PRIVILEGE);
PrivilegeDescriptor.createPrivilege(Forum.FORUM_MODERATION_PRIVILEGE);
PrivilegeDescriptor.createPrivilege(Forum.CREATE_THREAD_PRIVILEGE);
PrivilegeDescriptor.createPrivilege(Forum.RESPOND_TO_THREAD_PRIVILEGE);
PrivilegeDescriptor.createPrivilege(
Forum.FORUM_READ_PRIVILEGE);
PrivilegeDescriptor.createPrivilege(
Forum.FORUM_MODERATION_PRIVILEGE);
PrivilegeDescriptor.createPrivilege(
Forum.CREATE_THREAD_PRIVILEGE);
PrivilegeDescriptor.createPrivilege(
Forum.RESPOND_TO_THREAD_PRIVILEGE);
// Establich privilege hierarchie, eg. moderation includes createThread
PrivilegeDescriptor.addChildPrivilege(Forum.FORUM_MODERATION_PRIVILEGE,
Forum.CREATE_THREAD_PRIVILEGE);
PrivilegeDescriptor.addChildPrivilege(Forum.CREATE_THREAD_PRIVILEGE,
Forum.RESPOND_TO_THREAD_PRIVILEGE);
PrivilegeDescriptor.addChildPrivilege(Forum.RESPOND_TO_THREAD_PRIVILEGE,
PrivilegeDescriptor.READ.getName()); // general read privilege
PrivilegeDescriptor.addChildPrivilege(Forum.RESPOND_TO_THREAD_PRIVILEGE,
Forum.FORUM_READ_PRIVILEGE);
PrivilegeDescriptor.addChildPrivilege(
Forum.FORUM_MODERATION_PRIVILEGE,
Forum.CREATE_THREAD_PRIVILEGE);
PrivilegeDescriptor.addChildPrivilege(
Forum.CREATE_THREAD_PRIVILEGE,
Forum.RESPOND_TO_THREAD_PRIVILEGE);
PrivilegeDescriptor.addChildPrivilege(
Forum.RESPOND_TO_THREAD_PRIVILEGE,
PrivilegeDescriptor.READ.getName()); // general read privilege
PrivilegeDescriptor.addChildPrivilege(
Forum.RESPOND_TO_THREAD_PRIVILEGE,
Forum.FORUM_READ_PRIVILEGE);
}
}

View File

@ -57,21 +57,22 @@ public class ThreadPageBuilder implements PageBuilder, Constants {
//Output the title in an easy to find place
threadPage.add(new SimpleComponent(){
public void generateXML(PageState state, Element parent) {
Element nameElement = parent.newChildElement(
Constants.FORUM_XML_PREFIX + ":name",
Constants.FORUM_XML_NS);
nameElement.setText(ForumContext.getContext(state)
.getForum().getTitle());
@Override
public void generateXML(PageState state, Element parent) {
Element nameElement = parent.newChildElement(
Constants.FORUM_XML_PREFIX + ":name",
Constants.FORUM_XML_NS);
nameElement.setText(ForumContext.getContext(state)
.getForum().getTitle());
Element introductionElement = parent.newChildElement(
Constants.FORUM_XML_PREFIX +
":introduction",
Constants.FORUM_XML_NS);
introductionElement.setText(ForumContext.getContext(state).
Element introductionElement = parent.newChildElement(
Constants.FORUM_XML_PREFIX +
":introduction",
Constants.FORUM_XML_NS);
introductionElement.setText(ForumContext.getContext(state).
getForum().
getIntroduction());
}
}
});
//
threadPage.add(new DiscussionThreadSimpleView());

View File

@ -126,6 +126,7 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
*
* @param p
*/
@Override
public void register(Page p) {
super.register(p);
@ -137,6 +138,7 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
* @param state
* @throws ServletException
*/
@Override
public void respond(PageState state) throws ServletException {
super.respond(state);
@ -281,13 +283,18 @@ public class ForumUserCompactView extends ModalContainer implements Constants {
// admin section
if (PermissionService.checkPermission(adminPermission)) {
generateModeXML(state, content, MODE_MODERATION,
Text.gz("forum.ui.modeAlerts"));
// generateModeXML(state, content, MODE_MODERATION,
// Text.gz("forum.ui.modeAlerts"));
if (Forum.getConfig().showNewTabs()) {
generateModeXML(state, content, MODE_SETUP,
Text.gz("forum.ui.modeSetup"));
generateModeXML(state, content, MODE_PERMISSIONS,
Text.gz("forum.ui.modePermissions"));
} else {
// Generate old moderation panel instead of setup
generateModeXML(state, content, MODE_MODERATION,
Text.gz("forum.ui.modeAlerts"));
}
// In case topic creation is bound to admin (and therefore not
// created above) we must create xml here.

View File

@ -56,7 +56,7 @@ import org.apache.log4j.Logger;
*
* @author Kevin Scaldeferri (kevin@arsdigita.com)
* @version $Revision: 1.8 $ $Author: chrisg23 $ $DateTime: 2004/08/17 23:26:27 $
* @version $Id:
* @version $Id: $
*/
public class ThreadsPanel extends SimpleContainer
implements Constants {
@ -104,6 +104,7 @@ public class ThreadsPanel extends SimpleContainer
*
* @param p
*/
@Override
public void register(Page p) {
super.register(p);

View File

@ -366,24 +366,24 @@ div.tabbed-pane table.tab-set td.tab-label {
margin-left: 4px;
padding: 5px 0 3px 10px;
background: rgb(225,225,225) url(/css/tabbed-pane/tab-unselected.png) no-repeat;
background: rgb(225,225,225) url(/themes/heirloom/css/tabbed-pane/tab-unselected.png) no-repeat;
}
div.tabbed-pane table.tab-set td.tab-end {
width: 10px;
background: url(/css/tabbed-pane/tab-unselected-end.png) no-repeat;
background: url(/themes/heirloom/css/tabbed-pane/tab-unselected-end.png) no-repeat;
}
div.tabbed-pane table.tab-set td.current-tab-label {
margin-left: 4px;
padding: 5px 0 3px 10px;
background: rgb(162,30,30) url(/css/tabbed-pane/tab-selected.png) no-repeat;
background: rgb(162,30,30) url(/themes/heirloom/css/tabbed-pane/tab-selected.png) no-repeat;
color: white;
}
div.tabbed-pane table.tab-set td.current-tab-end {
width: 10px;
background: url(/css/tabbed-pane/tab-selected-end.png) no-repeat;
background: url(/themes/heirloom/css/tabbed-pane/tab-selected-end.png) no-repeat;
}
div.tabbed-pane table.tab-set td.tab-spacer {
@ -393,7 +393,7 @@ div.tabbed-pane table.tab-set td.tab-spacer {
div.tabbed-pane table.rule {
margin-left: 10px;
width: 100%;
background: rgb(162,30,30) url(/css/tabbed-pane/tab-bar.png) repeat-x;
background: rgb(162,30,30) url(/themes/heirloom/css/tabbed-pane/tab-bar.png) repeat-x;
height: 10px;
}

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:forum="http://www.arsdigita.com/forum/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:search="http://rhea.redhat.com/search/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
exclude-result-prefixes="xsl bebop nav search portal forum cms"
version="1.0">
<xsl:stylesheet xmlns:forum="http://www.arsdigita.com/forum/1.0"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:search="http://rhea.redhat.com/search/1.0"
xmlns:portal="http://www.uk.arsdigita.com/portal/1.0"
xmlns:cms="http://www.arsdigita.com/cms/1.0"
exclude-result-prefixes="xsl bebop nav search portal forum cms"
version="1.0">
<!-- IMPORT DEFINITIONS ccm-forum installed as separate web application
<xsl:import href="../../../../ROOT/themes/heirloom/packages/bebop/xsl/bebop.xsl" />
@ -16,9 +16,9 @@
-->
<!-- IMPORT DEFINITIONS ccm-forum installed into the main CCM webapp
-->
<xsl:import href="../../../packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../../packages/ui/xsl/ui.xsl" />
<xsl:import href="../../../packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../heirloom/packages/bebop/xsl/bebop.xsl" />
<xsl:import href="../../heirloom/packages/ui/xsl/ui.xsl" />
<!-- <xsl:import href="../../heirloom/packages/bebop/xsl/bebop.xsl" /> -->
<xsl:import href="lib/header.xsl" />
<xsl:import href="lib/lib.xsl" />
@ -28,7 +28,7 @@
-->
<!-- IMPORT DEFINITIONS ccm-forum installed into the main CCM webapp
-->
<xsl:import href="../../../packages/bebop/xsl/dcp.xsl"/>
<xsl:import href="../../heirloom/packages/bebop/xsl/dcp.xsl"/>

View File

@ -366,24 +366,24 @@ div.tabbed-pane table.tab-set td.tab-label {
margin-left: 4px;
padding: 5px 0 3px 10px;
background: rgb(225,225,225) url(/css/tabbed-pane/tab-unselected.png) no-repeat;
background: rgb(225,225,225) url(/themes/heirloom/css/tabbed-pane/tab-unselected.png) no-repeat;
}
div.tabbed-pane table.tab-set td.tab-end {
width: 10px;
background: url(/css/tabbed-pane/tab-unselected-end.png) no-repeat;
background: url(/themes/heirloom/css/tabbed-pane/tab-unselected-end.png) no-repeat;
}
div.tabbed-pane table.tab-set td.current-tab-label {
margin-left: 4px;
padding: 5px 0 3px 10px;
background: rgb(162,30,30) url(/css/tabbed-pane/tab-selected.png) no-repeat;
background: rgb(162,30,30) url(/themes/heirloom/css/tabbed-pane/tab-selected.png) no-repeat;
color: white;
}
div.tabbed-pane table.tab-set td.current-tab-end {
width: 10px;
background: url(/css/tabbed-pane/tab-selected-end.png) no-repeat;
background: url(/themes/heirloom/css/tabbed-pane/tab-selected-end.png) no-repeat;
}
div.tabbed-pane table.tab-set td.tab-spacer {
@ -393,7 +393,7 @@ div.tabbed-pane table.tab-set td.tab-spacer {
div.tabbed-pane table.rule {
margin-left: 10px;
width: 100%;
background: rgb(162,30,30) url(/css/tabbed-pane/tab-bar.png) repeat-x;
background: rgb(162,30,30) url(/themes/heirloom/css/tabbed-pane/tab-bar.png) repeat-x;
height: 10px;
}

File diff suppressed because it is too large Load Diff