From 0d1d1aff575b28a1f451b6d20fd03694177626aa Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Tue, 10 Jan 2006 12:30:11 +0000 Subject: [PATCH] Some minor changes following Linton UI review git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2092 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/messages/webclient.properties | 2 +- config/alfresco/web-client-config.xml | 2 +- .../org/alfresco/web/bean/ForumsBean.java | 23 +++---------------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 934e9f28f3..4643ac42d8 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -320,7 +320,7 @@ edit_topic_description=Modify the topic properties then click OK. edit_post_description=Modify the message then click OK. edit_post_finish=To save the message click Post. start_discussion=Start Discussion -discuss=Discuss +discuss=View Discussions discussion_for={0} discussion # Common Wizard messages diff --git a/config/alfresco/web-client-config.xml b/config/alfresco/web-client-config.xml index fd1db9d3b2..0c004735a2 100644 --- a/config/alfresco/web-client-config.xml +++ b/config/alfresco/web-client-config.xml @@ -323,7 +323,7 @@ - + diff --git a/source/java/org/alfresco/web/bean/ForumsBean.java b/source/java/org/alfresco/web/bean/ForumsBean.java index 82dba4fbd5..30ac0f6545 100644 --- a/source/java/org/alfresco/web/bean/ForumsBean.java +++ b/source/java/org/alfresco/web/bean/ForumsBean.java @@ -697,27 +697,10 @@ public class ForumsBean implements IContextListener // there should only be one child, retrieve it if there is if (children.size() == 1) { + // show the forum for the discussion NodeRef forumNodeRef = children.get(0).getChildRef(); - - // query for the number of topics there are - String repliesXPath = "./*[(subtypeOf('" + ForumModel.TYPE_TOPIC + "'))]"; - List topics = searchService.selectNodes(forumNodeRef, repliesXPath, - new QueryParameterDefinition[] {}, this.namespaceService, false); - if (topics.size() == 1) - { - // if the forum has only one topic go straight into the topic by - // setting the context and navigating to it - NodeRef topicNodeRef = topics.get(0); - this.browseBean.clickSpace(topicNodeRef); - context.getApplication().getNavigationHandler().handleNavigation(context, null, "showTopic"); - } - else - { - // if the forum has more than one topic we need to setup the context - // for the forum and navigate to the forum page - this.browseBean.clickSpace(forumNodeRef); - context.getApplication().getNavigationHandler().handleNavigation(context, null, "showForum"); - } + this.browseBean.clickSpace(forumNodeRef); + context.getApplication().getNavigationHandler().handleNavigation(context, null, "showForum"); } }