[kune-commits] r1038 - in trunk: . src/main/java/org/ourproject/kune/app/public/css src/main/java/org/ourproject/kune/blogs/client src/main/java/org/ourproject/kune/chat/client src/main/java/org/ourproject/kune/docs/client src/main/java/org/ourproject/kune/gallery/client src/main/java/org/ourproject/kune/platf/client/actions src/main/java/org/ourproject/kune/platf/client/actions/toolbar src/main/java/org/ourproject/kune/platf/client/dto src/main/java/org/ourproject/kune/platf/client/rpc src/main/java/org/ourproject/kune/platf/client/state src/main/java/org/ourproject/kune/platf/server/content src/main/java/org/ourproject/kune/platf/server/rpc src/main/java/org/ourproject/kune/platf/server/users src/main/java/org/ourproject/kune/wiki/client src/main/java/org/ourproject/kune/workspace/client src/main/java/org/ourproject/kune/workspace/client/ctxnav src/main/java/org/ourproject/kune/workspace/client/socialnet

vjrj vjrj at ourproject.org
Mon Jan 26 21:40:35 CET 2009


Author: vjrj
Date: 2009-01-26 21:38:12 +0100 (Mon, 26 Jan 2009)
New Revision: 1038

Added:
   trunk/org.ourproject-kune-0.0.5-0.deb
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionCheckedCondition.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarMenuCheckItemDescriptor.java
Modified:
   trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
   trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
   trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
   trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java
   trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
   trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarButtonDescriptor.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarDescriptor.java
   trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java
   trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserInfoDTO.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentService.java
   trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentServiceAsync.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java
   trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java
   trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java
   trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java
   trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
Log:
Complete - task Add Publish/Reject content actions 

Complete - task Add show deleted items menu option


Added: trunk/org.ourproject-kune-0.0.5-0.deb
===================================================================
(Binary files differ)


Property changes on: trunk/org.ourproject-kune-0.0.5-0.deb
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/all.css	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css	2009-01-26 20:38:12 UTC (rev 1038)
@@ -41,4 +41,4 @@
     padding: 1px 0px 1px 1px;
     text-decoration:none;
 }
-*/.x-tree-node .k-ctn-status-normal a span{}.x-tree-node .k-ctn-status-rejdel a span{text-decoration:line-through;color:gray;}.x-tree-node .k-ctn-status-editing a span{font-style:italic;color:gray;}.x-tree-node .k-ctn-status-submitted a span{color:green;}.k-info-links{text-decoration:underline;color:gray;cursor:pointer;}.x-tool-kmenu{background-position:0 -75px;}.x-tool-kmenu-over{background-position:-15px -75px;}.k-border-openbox{border-bottom:1px #D0D0D0 solid;border-right:1px #D0D0D0 solid;border-left:1px #D0D0D0 solid;}/* SiteToastMessages */.k-stm-info-icon{background-image:url(img/info.gif)!important;}.k-stm-imp-icon{background-image:url(img/alert.gif)!important;}.k-stm-verimp-icon{background-image:url(img/important.gif)!important;}.k-stm-error-icon{background-image:url(img/error.gif)!important;}.k-error-tb{background:#FFB380 none repeat scroll 0 50%;color:#250;}.k-infod-head{font-size:108%;margin-bottom:10px;}.gwt-DisclosurePanel{}.gwt-DisclosurePanel-open{}.gwt-DisclosurePanel-closed{}.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td{text-decoration:none;/* Remove underline from header */color:#000;cursor:pointer;cursor:hand;}.gwt-DisclosurePanel .content{border-left:3px solid #e8eef7;padding:4px 0 4px 8px;margin-left:6px;}.k-basic-thumb{background:#FAFAFA none repeat scroll 0 50%;border:1px solid #EBEBEB;padding:3px;margin:3px;}.k-basic-thumb td{padding:2px 3px;border:none;}.k-text-gray{color:gray;}.k-elp-limg{margin-top:4px;margin-left:5px;cursor:pointer;overflow:hidden;}.k-tsp-tag{float:right;margin-right:5px;cursor:pointer;color:#00F;}.k-tsp-cloud{vertical-align:bottom;}.k-link-icon{background-image:url(img/link.gif)!important;}.k-options-icon{background-image:url(img/emblem-system.gif)!important;}.k-copyleft-icon{background-image:url(img/copyleft.png)!important;}.k-picture-icon{background-image:url(img/picture.png)!important;}.k-info-icon{background-image:url(img/info.gif)!important;}.k-newgroup-icon{background-image:url(img/kune-icon16.png)!important;}.k-colors-icon{background-image:url(img/colors.gif)!important;}.x-toolbar-body table{/* width: 100%; */}.k-preview-msg{background:#FCA;}.k-preview-msg-lab{background:#FCA;padding:0 5px;}.k-eil-edit{border:thin solid #000;}
\ No newline at end of file
+*/.x-tree-node .k-ctn-status-normal a span{}.x-tree-node .k-ctn-status-deleted a span{text-decoration:line-through;color:gray;}.x-tree-node .k-ctn-status-rejected a span{text-decoration:line-through;/* color: #FF6633; */color:#F30;}.x-tree-node .k-ctn-status-editing a span{font-style:italic;color:gray;}.x-tree-node .k-ctn-status-submitted a span{color:green;}.k-info-links{text-decoration:underline;color:gray;cursor:pointer;}.x-tool-kmenu{background-position:0 -75px;}.x-tool-kmenu-over{background-position:-15px -75px;}.k-border-openbox{border-bottom:1px #D0D0D0 solid;border-right:1px #D0D0D0 solid;border-left:1px #D0D0D0 solid;}/* SiteToastMessages */.k-stm-info-icon{background-image:url(img/info.gif)!important;}.k-stm-imp-icon{background-image:url(img/alert.gif)!important;}.k-stm-verimp-icon{background-image:url(img/important.gif)!important;}.k-stm-error-icon{background-image:url(img/error.gif)!important;}.k-error-tb{background:#FFB380 none repeat scroll 0 50%;color:#250;}.k-infod-head{font-size:108%;margin-bottom:10px;}.gwt-DisclosurePanel{}.gwt-DisclosurePanel-open{}.gwt-DisclosurePanel-closed{}.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td{text-decoration:none;/* Remove underline from header */color:#000;cursor:pointer;cursor:hand;}.gwt-DisclosurePanel .content{border-left:3px solid #e8eef7;padding:4px 0 4px 8px;margin-left:6px;}.k-basic-thumb{background:#FAFAFA none repeat scroll 0 50%;border:1px solid #EBEBEB;padding:3px;margin:3px;}.k-basic-thumb td{padding:2px 3px;border:none;}.k-text-gray{color:gray;}.k-elp-limg{margin-top:4px;margin-left:5px;cursor:pointer;overflow:hidden;}.k-tsp-tag{float:right;margin-right:5px;cursor:pointer;color:#00F;}.k-tsp-cloud{vertical-align:bottom;}.k-link-icon{background-image:url(img/link.gif)!important;}.k-options-icon{background-image:url(img/emblem-system.gif)!important;}.k-copyleft-icon{background-image:url(img/copyleft.png)!important;}.k-picture-icon{background-image:url(img/picture.png)!important;}.k-info-icon{background-image:url(img/info.gif)!important;}.k-newgroup-icon{background-image:url(img/kune-icon16.png)!important;}.k-colors-icon{background-image:url(img/colors.gif)!important;}.x-toolbar-body table{/* width: 100%; */}.k-preview-msg{background:#FCA;}.k-preview-msg-lab{background:#FCA;padding:0 5px;}.k-eil-edit{border:thin solid #000;}
\ No newline at end of file

Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css	2009-01-26 20:38:12 UTC (rev 1038)
@@ -700,11 +700,18 @@
 .x-tree-node .k-ctn-status-normal a span {
 }
 
-.x-tree-node .k-ctn-status-rejdel a span {
+.x-tree-node .k-ctn-status-deleted a span {
     text-decoration: line-through;
     color: gray;
 }
 
+.x-tree-node .k-ctn-status-rejected a span {
+    text-decoration: line-through;
+    /* color: #FF6633; */
+    color: #FF3300;
+
+}
+
 .x-tree-node .k-ctn-status-editing a span {
     font-style: italic;
     color: gray;

Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -102,5 +102,6 @@
 
         createDelContainerAction("Delete blog", parentMenuTitleCtx, containersNoRoot);
         createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
+        createShowDeletedItems(parentMenuTitleCtx, all);
     }
 }

Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -22,12 +22,14 @@
 import org.ourproject.kune.chat.client.ctx.room.AddRoom;
 import org.ourproject.kune.docs.client.DocumentClientTool;
 import org.ourproject.kune.gallery.client.GalleryClientTool;
+import org.ourproject.kune.platf.client.actions.ActionEnableCondition;
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonSeparator;
 import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
 import org.ourproject.kune.platf.client.actions.ContentActionRegistry;
 import org.ourproject.kune.platf.client.actions.ContextActionRegistry;
 import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+import org.ourproject.kune.platf.client.dto.ContentStatusDTO;
 import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.state.Session;
 import org.ourproject.kune.wiki.client.WikiClientTool;
@@ -70,6 +72,7 @@
         chatAbout.setIconUrl("images/emite-room.png");
         chatAbout.setToolTip("Chat and comment this");
         chatAbout.setLeftSeparator(ActionToolbarButtonSeparator.fill);
+        chatAbout.setEnableCondition(notDeleted());
 
         ActionToolbarButtonDescriptor<StateToken> joinRoom = new ActionToolbarButtonDescriptor<StateToken>(
                 AccessRolDTO.Viewer, ActionToolbarPosition.topbar, new Listener<StateToken>() {
@@ -105,4 +108,14 @@
         contextActionRegistry.addAction(addRoom, ChatClientTool.TYPE_ROOT, ChatClientTool.TYPE_ROOM);
         contentActionRegistry.addAction(joinRoom, ChatClientTool.TYPE_ROOM);
     }
+
+    private ActionEnableCondition<StateToken> notDeleted() {
+        return new ActionEnableCondition<StateToken>() {
+            public boolean mustBeEnabled(final StateToken itemToken) {
+                final boolean isNotDeleted = !(session.isCurrentStateAContent() && session.getContentState().getStatus().equals(
+                        ContentStatusDTO.inTheDustbin));
+                return isNotDeleted;
+            }
+        };
+    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -106,6 +106,7 @@
 
         createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
         createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
+        createShowDeletedItems(parentMenuTitleCtx, all);
     }
 
     @Override

Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -102,6 +102,7 @@
 
         createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
         createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
+        createShowDeletedItems(parentMenuTitleCtx, all);
     }
 
     @Override

Added: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionCheckedCondition.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionCheckedCondition.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionCheckedCondition.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -0,0 +1,5 @@
+package org.ourproject.kune.platf.client.actions;
+
+public interface ActionCheckedCondition {
+    boolean mustBeChecked();
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -86,6 +86,12 @@
         this.mustBeAuthenticated = true;
     }
 
+    public ActionDescriptor(final AccessRolDTO accessRolDTO, final Listener<T> onPerformCall,
+            final ActionAddCondition<T> addCondition) {
+        this(accessRolDTO, onPerformCall);
+        this.addCondition = addCondition;
+    }
+
     /**
      * Instantiates a new action descriptor.
      * 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarButtonDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarButtonDescriptor.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarButtonDescriptor.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -34,6 +34,12 @@
 
     public ActionToolbarButtonDescriptor(final AccessRolDTO accessRolDTO,
             final ActionToolbarPosition actionToolbarPosition, final Listener<T> onPerformCall,
+            final ActionAddCondition<T> addCondition) {
+        super(accessRolDTO, actionToolbarPosition, onPerformCall, addCondition);
+    }
+
+    public ActionToolbarButtonDescriptor(final AccessRolDTO accessRolDTO,
+            final ActionToolbarPosition actionToolbarPosition, final Listener<T> onPerformCall,
             final ActionEnableCondition<T> enableCondition) {
         super(accessRolDTO, actionToolbarPosition, onPerformCall, enableCondition);
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarDescriptor.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarDescriptor.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -33,6 +33,12 @@
     }
 
     public ActionToolbarDescriptor(final AccessRolDTO accessRolDTO, final ActionToolbarPosition actionToolbarPosition,
+            final Listener<T> onPerformCall, final ActionAddCondition<T> addCondition) {
+        super(accessRolDTO, onPerformCall, addCondition);
+        this.actionToolbarPosition = actionToolbarPosition;
+    }
+
+    public ActionToolbarDescriptor(final AccessRolDTO accessRolDTO, final ActionToolbarPosition actionToolbarPosition,
             final Listener<T> onPerformCall, final ActionEnableCondition<T> enableCondition) {
         super(accessRolDTO, onPerformCall, enableCondition);
         this.actionToolbarPosition = actionToolbarPosition;

Added: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarMenuCheckItemDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarMenuCheckItemDescriptor.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionToolbarMenuCheckItemDescriptor.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -0,0 +1,21 @@
+package org.ourproject.kune.platf.client.actions;
+
+import org.ourproject.kune.platf.client.dto.AccessRolDTO;
+
+import com.calclab.suco.client.events.Listener;
+
+public class ActionToolbarMenuCheckItemDescriptor<T> extends ActionToolbarMenuDescriptor<T> {
+
+    private final ActionCheckedCondition mustBeChecked;
+
+    public ActionToolbarMenuCheckItemDescriptor(AccessRolDTO accessRol, ActionToolbarPosition toolbarPosition,
+            Listener<T> onPerformCall, ActionCheckedCondition mustBeChecked) {
+        super(accessRol, toolbarPosition, onPerformCall);
+        this.mustBeChecked = mustBeChecked;
+    }
+
+    public ActionCheckedCondition getMustBeChecked() {
+        return mustBeChecked;
+    }
+
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -8,6 +8,7 @@
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonSeparator;
 import org.ourproject.kune.platf.client.actions.ActionToolbarDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuCheckItemDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
@@ -178,6 +179,11 @@
             checkItem.setGroup(radioDescriptor.getGroup());
             checkItem.setChecked(radioDescriptor.mustBeChecked());
             item = checkItem;
+        } else if (action instanceof ActionToolbarMenuCheckItemDescriptor) {
+            CheckItem checkItem = new CheckItem(action.getText());
+            ActionToolbarMenuCheckItemDescriptor<T> checkItemDescriptor = (ActionToolbarMenuCheckItemDescriptor<T>) action;
+            checkItem.setChecked(checkItemDescriptor.getMustBeChecked().mustBeChecked());
+            item = checkItem;
         } else {
             item = new Item(action.getText());
         }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserInfoDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserInfoDTO.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/UserInfoDTO.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -31,6 +31,7 @@
     private String userHash;
     private List<GroupDTO> groupsIsAdmin;
     private List<GroupDTO> groupsIsCollab;
+    private boolean showDeletedContent;
 
     public String getChatName() {
         return chatName;
@@ -68,6 +69,10 @@
         return user.getShortName();
     }
 
+    public boolean getShowDeletedContent() {
+        return showDeletedContent;
+    }
+
     public UserSimpleDTO getUser() {
         return user;
     }
@@ -97,6 +102,10 @@
         this.homePage = homePage;
     }
 
+    public void setShowDeletedContent(boolean showDeletedContent) {
+        this.showDeletedContent = showDeletedContent;
+    }
+
     public void setUser(UserSimpleDTO user) {
         this.user = user;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentService.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentService.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -51,7 +51,7 @@
 
     StateContainerDTO addRoom(String user, StateToken parentToken, String name) throws DefaultException;
 
-    void delContent(String userHash, StateToken token) throws DefaultException;
+    StateContentDTO delContent(String userHash, StateToken token) throws DefaultException;
 
     StateAbstractDTO getContent(String userHash, StateToken token) throws DefaultException;
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentServiceAsync.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentServiceAsync.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/rpc/ContentServiceAsync.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -51,7 +51,7 @@
 
     void addRoom(String user, StateToken parentToken, String name, AsyncCallback<StateContainerDTO> callback);
 
-    void delContent(String userHash, StateToken token, AsyncCallback<?> asyncCallback);
+    void delContent(String userHash, StateToken token, AsyncCallback<StateContentDTO> asyncCallback);
 
     void getContent(String user, StateToken newState, AsyncCallback<StateAbstractDTO> callback);
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/Session.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -64,20 +64,6 @@
      */
     int SESSION_DURATION = 1000 * 60 * 60 * 24 * 14;
 
-    public String getCurrentCCversion();
-
-    public LicenseDTO getDefLicense();
-
-    public int getImgCropsize();
-
-    public int getImgIconsize();
-
-    public int getImgResizewidth();
-
-    public int getImgThumbsize();
-
-    public boolean inSameToken(StateToken token);
-
     void check(AsyncCallbackSimple<?> callback);
 
     StateContainerDTO getContainerState();
@@ -88,6 +74,8 @@
 
     Object[][] getCountriesArray();
 
+    String getCurrentCCversion();
+
     I18nLanguageDTO getCurrentLanguage();
 
     StateAbstractDTO getCurrentState();
@@ -98,22 +86,38 @@
 
     UserInfoDTO getCurrentUserInfo();
 
+    LicenseDTO getDefLicense();
+
     String getGalleryPermittedExtensions();
 
     Collection<ToolSimpleDTO> getGroupTools();
 
+    int getImgCropsize();
+
+    int getImgIconsize();
+
+    int getImgResizewidth();
+
+    int getImgThumbsize();
+
     List<I18nLanguageSimpleDTO> getLanguages();
 
     Object[][] getLanguagesArray();
 
     List<LicenseDTO> getLicenses();
 
+    boolean getShowDeletedContent();
+
     Object[][] getTimezones();
 
     String getUserHash();
 
     Collection<ToolSimpleDTO> getUserTools();
 
+    boolean inSameToken(StateToken token);
+
+    boolean isCurrentStateAContent();
+
     boolean isLogged();
 
     void onInitDataReceived(Listener<InitDataDTO> listener);

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/state/SessionDefault.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -158,6 +158,10 @@
         return initData.getLicenses();
     }
 
+    public boolean getShowDeletedContent() {
+        return currentUserInfo == null ? false : currentUserInfo.getShowDeletedContent();
+    }
+
     public Object[][] getTimezones() {
         if (timezonesArray == null) {
             mapTimezones();
@@ -177,6 +181,10 @@
         return getCurrentStateToken().equals(token);
     }
 
+    public boolean isCurrentStateAContent() {
+        return currentState instanceof StateContentDTO;
+    }
+
     public boolean isLogged() {
         return userHash != null;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -37,8 +37,6 @@
 
     Content createContent(String title, String body, User author, Container container, String typeId);
 
-    void delContent(User user, Long contentId) throws DefaultException;
-
     boolean findIfExistsTitle(Container container, String title);
 
     Double getRateAvg(Content content);

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -103,12 +103,6 @@
         return persist(newContent);
     }
 
-    public void delContent(final User user, final Long contentId) throws DefaultException {
-        final Content content = finder.getContent(contentId);
-        content.setStatus(ContentStatus.inTheDustbin);
-        content.setDeletedOn(new Date());
-    }
-
     public boolean findIfExistsTitle(Container container, String title) {
         return (contentFinder.findIfExistsTitle(container, title) > 0)
                 || (containerFinder.findIfExistsTitle(container, title) > 0);
@@ -215,7 +209,12 @@
         switch (status) {
         case publishedOnline:
             content.setPublishedOn(new Date());
+            content.setDeletedOn(null);
             break;
+        case inTheDustbin:
+            content.setDeletedOn(new Date());
+            content.setPublishedOn(null);
+            break;
         default:
             break;
         }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rpc/ContentRPC.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -204,10 +204,9 @@
     @Authenticated
     @Authorizated(accessRolRequired = AccessRol.Administrator)
     @Transactional(type = TransactionType.READ_WRITE)
-    public void delContent(final String userHash, final StateToken token) throws DefaultException {
+    public StateContentDTO delContent(final String userHash, final StateToken token) throws DefaultException {
         final Long contentId = ContentUtils.parseId(token.getDocument());
-        final User user = getCurrentUser();
-        contentManager.delContent(user, contentId);
+        return getState(getCurrentUser(), contentManager.setStatus(contentId, ContentStatus.inTheDustbin));
     }
 
     @Authenticated(mandatory = false)

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfo.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -34,6 +34,7 @@
     private List<Group> groupsIsAdmin;
     private List<Group> groupsIsCollab;
     private String userHash;
+    private boolean showDeletedContent;
 
     public String getChatName() {
         return chatName;
@@ -71,6 +72,10 @@
         return user.getShortName();
     }
 
+    public boolean getShowDeletedContent() {
+        return showDeletedContent;
+    }
+
     public User getUser() {
         return user;
     }
@@ -99,6 +104,10 @@
         this.homePage = homePage;
     }
 
+    public void setShowDeletedContent(boolean showDeletedContent) {
+        this.showDeletedContent = showDeletedContent;
+    }
+
     public void setUser(User user) {
         this.user = user;
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/users/UserInfoServiceDefault.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -48,6 +48,8 @@
             info.setChatName(user.getShortName());
             info.setChatPassword(user.getPassword());
             info.setUserHash(userHash);
+            // FIXME: save this in user properties
+            info.setShowDeletedContent(false);
 
             final Group userGroup = user.getUserGroup();
 

Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -106,6 +106,7 @@
 
         createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
         createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
+        createShowDeletedItems(parentMenuTitleCtx, all);
     }
 
     @Override

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -1,11 +1,14 @@
 package org.ourproject.kune.workspace.client;
 
+import org.ourproject.kune.platf.client.actions.ActionAddCondition;
+import org.ourproject.kune.platf.client.actions.ActionCheckedCondition;
 import org.ourproject.kune.platf.client.actions.ActionEnableCondition;
 import org.ourproject.kune.platf.client.actions.ActionMenuItemDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonAndItemDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarButtonSeparator;
 import org.ourproject.kune.platf.client.actions.ActionToolbarMenuAndItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuCheckItemDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
 import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
@@ -111,12 +114,11 @@
                 AccessRolDTO.Administrator, i18n.t("Published online"), parentMenuTitle,
                 ContentStatusDTO.publishedOnline);
         final ActionToolbarMenuRadioDescriptor<StateToken> setEditionInProgressStatus = createSetStatusAction(
-                AccessRolDTO.Administrator, i18n.t("Editing in progress"), parentMenuTitle,
-                ContentStatusDTO.editingInProgress);
+                AccessRolDTO.Editor, i18n.t("Editing in progress"), parentMenuTitle, ContentStatusDTO.editingInProgress);
         final ActionToolbarMenuRadioDescriptor<StateToken> setRejectStatus = createSetStatusAction(
                 AccessRolDTO.Administrator, i18n.t("Rejected"), parentMenuTitle, ContentStatusDTO.rejected);
         final ActionToolbarMenuRadioDescriptor<StateToken> setSubmittedForPublishStatus = createSetStatusAction(
-                AccessRolDTO.Administrator, i18n.t("Submitted for publish"), parentMenuTitle,
+                AccessRolDTO.Editor, i18n.t("Submitted for publish"), parentMenuTitle,
                 ContentStatusDTO.submittedForEvaluation);
         final ActionToolbarMenuRadioDescriptor<StateToken> setInTheDustBinStatus = createSetStatusAction(
                 AccessRolDTO.Administrator, i18n.t("In the rubbish bin"), parentMenuTitle,
@@ -126,6 +128,10 @@
         contentActionRegistry.addAction(setRejectStatus, contentsModerated);
         contentActionRegistry.addAction(setSubmittedForPublishStatus, contentsModerated);
         contentActionRegistry.addAction(setInTheDustBinStatus, contentsModerated);
+        createPublishAction("images/accept.png", i18n.t("Publish online"), ContentStatusDTO.publishedOnline,
+                contentsModerated);
+        createPublishAction("images/cancel.png", i18n.t("Reject publication"), ContentStatusDTO.rejected,
+                contentsModerated);
     }
 
     protected void createContentRenameAction(String parentMenuTitle, String textDescription, String... registerInTypes) {
@@ -137,6 +143,7 @@
                 });
         renameCtn.setTextDescription(textDescription);
         renameCtn.setParentMenuTitle(parentMenuTitle);
+        renameCtn.setEnableCondition(notDeleted());
         contentActionRegistry.addAction(renameCtn, registerInTypes);
     }
 
@@ -160,10 +167,13 @@
                 AccessRolDTO.Administrator, ActionToolbarPosition.topbar, new Listener<StateToken>() {
                     public void onEvent(final StateToken token) {
                         contentServiceProvider.get().delContent(session.getUserHash(), token,
-                                new AsyncCallbackSimple<String>() {
-                                    public void onSuccess(final String result) {
+                                new AsyncCallbackSimple<StateContentDTO>() {
+                                    public void onSuccess(final StateContentDTO state) {
+                                        session.setCurrentState(state);
                                         final StateToken parent = token.copy().clearDocument();
                                         stateManager.gotoToken(parent);
+                                        contextNavigator.clear();
+                                        contextNavigator.refreshState();
                                     }
                                 });
                     }
@@ -173,12 +183,7 @@
         delContent.setMustBeConfirmed(true);
         delContent.setConfirmationTitle(i18n.t("Please confirm"));
         delContent.setConfirmationText(i18n.t("Are you sure?"));
-        delContent.setEnableCondition(new ActionEnableCondition<StateToken>() {
-            public boolean mustBeEnabled(final StateToken itemToken) {
-                final StateToken defContentToken = session.getCurrentState().getGroup().getDefaultContent().getStateToken();
-                return !itemToken.equals(defContentToken);
-            }
-        });
+        delContent.setEnableCondition(notDefAndNotDeleted());
         contentActionRegistry.addAction(delContent, registerInTypes);
     }
 
@@ -266,6 +271,7 @@
         editContent.setTextDescription(i18n.tWithNT("Edit", "used in button"));
         editContent.setIconUrl("images/content_edit.png");
         editContent.setLeftSeparator(ActionToolbarButtonSeparator.spacer);
+        editContent.setEnableCondition(notDeleted());
         contentActionRegistry.addAction(editContent, registerInTypes);
         return editContent;
     }
@@ -361,6 +367,28 @@
     protected void createPostSessionInitActions() {
     }
 
+    protected void createPublishAction(String icon, String tooltip, final ContentStatusDTO status,
+            String... registerInTypes) {
+        ActionToolbarButtonDescriptor<StateToken> pubAction = new ActionToolbarButtonDescriptor<StateToken>(
+                AccessRolDTO.Administrator, ActionToolbarPosition.topbar, new Listener<StateToken>() {
+                    public void onEvent(StateToken stateToken) {
+                        setContentStatus(status, stateToken);
+                    }
+                }, new ActionAddCondition<StateToken>() {
+                    public boolean mustBeAdded(StateToken param) {
+                        if (session.isCurrentStateAContent()
+                                && session.getContentState().getStatus().equals(ContentStatusDTO.submittedForEvaluation)) {
+                            return true;
+                        }
+                        return false;
+                    }
+                });
+        pubAction.setMustBeAuthenticated(true);
+        pubAction.setToolTip(tooltip);
+        pubAction.setIconUrl(icon);
+        contentActionRegistry.addAction(pubAction, registerInTypes);
+    }
+
     protected ActionToolbarMenuDescriptor<StateToken> createRefreshCntAction(String parentMenuTitle,
             String... registerInTypes) {
         final ActionToolbarMenuDescriptor<StateToken> refreshCnt = new ActionToolbarMenuDescriptor<StateToken>(
@@ -428,12 +456,7 @@
                 });
         setAsDefGroupContent.setTextDescription(i18n.t("Set this as the default group page"));
         setAsDefGroupContent.setIconUrl("images/group-home.png");
-        setAsDefGroupContent.setEnableCondition(new ActionEnableCondition<StateToken>() {
-            public boolean mustBeEnabled(final StateToken itemToken) {
-                final StateToken defContentToken = session.getCurrentState().getGroup().getDefaultContent().getStateToken();
-                return !itemToken.equals(defContentToken);
-            }
-        });
+        setAsDefGroupContent.setEnableCondition(notDefAndNotDeleted());
         setAsDefGroupContent.setParentMenuTitle(parentMenuTitle);
         contentActionRegistry.addAction(setAsDefGroupContent, registerInTypes);
         return setAsDefGroupContent;
@@ -444,22 +467,7 @@
         final ActionToolbarMenuRadioDescriptor<StateToken> action = new ActionToolbarMenuRadioDescriptor<StateToken>(
                 rol, ActionToolbarPosition.topbar, new Listener<StateToken>() {
                     public void onEvent(final StateToken stateToken) {
-                        final AsyncCallbackSimple<StateAbstractDTO> callback = new AsyncCallbackSimple<StateAbstractDTO>() {
-                            public void onSuccess(final StateAbstractDTO state) {
-                                if (session.inSameToken(stateToken)) {
-                                    session.setCurrentState(state);
-                                    publicLink.setState(state);
-                                }
-                                contextNavigator.setItemStatus(stateToken, status);
-                            }
-                        };
-                        if (status.equals(ContentStatusDTO.publishedOnline) || status.equals(ContentStatusDTO.rejected)
-                                || status.equals(ContentStatusDTO.inTheDustbin)) {
-                            contentServiceProvider.get().setStatusAsAdmin(session.getUserHash(), stateToken, status,
-                                    callback);
-                        } else {
-                            contentServiceProvider.get().setStatus(session.getUserHash(), stateToken, status, callback);
-                        }
+                        setContentStatus(status, stateToken);
                     }
                 }, "ContentRadioStatus", new RadioMustBeChecked() {
                     public boolean mustBeChecked() {
@@ -476,6 +484,30 @@
         return action;
     }
 
+    protected void createShowDeletedItems(String parentMenuTitle, String... registerInTypes) {
+        ActionToolbarMenuCheckItemDescriptor<StateToken> showDeletedItems = new ActionToolbarMenuCheckItemDescriptor<StateToken>(
+                AccessRolDTO.Editor, ActionToolbarPosition.topbar, new Listener<StateToken>() {
+                    public void onEvent(StateToken parameter) {
+                        boolean mustShow = !session.getCurrentUserInfo().getShowDeletedContent();
+                        session.getCurrentUserInfo().setShowDeletedContent(mustShow);
+                        if (!mustShow && session.isCurrentStateAContent()
+                                && session.getContentState().getStatus().equals(ContentStatusDTO.inTheDustbin)) {
+                            stateManager.gotoToken(session.getCurrentStateToken().getGroup());
+                        }
+                        contextNavigator.clear();
+                        contextNavigator.refreshState();
+                    }
+                }, new ActionCheckedCondition() {
+                    public boolean mustBeChecked() {
+                        return session.getShowDeletedContent();
+                    }
+                });
+        showDeletedItems.setParentMenuTitle(parentMenuTitle);
+        showDeletedItems.setTextDescription("Show deleted items");
+        showDeletedItems.setMustBeAuthenticated(true);
+        contextActionRegistry.addAction(showDeletedItems, registerInTypes);
+    }
+
     protected ActionToolbarButtonDescriptor<StateToken> createTranslateAction(String... registerInTypes) {
         ActionToolbarButtonDescriptor<StateToken> translateContent = new ActionToolbarButtonDescriptor<StateToken>(
                 AccessRolDTO.Editor, ActionToolbarPosition.topbar, new Listener<StateToken>() {
@@ -487,6 +519,7 @@
         translateContent.setToolTip(i18n.t("Translate this document to other languages"));
         translateContent.setIconUrl("images/language.gif");
         translateContent.setLeftSeparator(ActionToolbarButtonSeparator.spacer);
+        translateContent.setEnableCondition(notDeleted());
         contentActionRegistry.addAction(translateContent, registerInTypes);
         return translateContent;
     }
@@ -560,6 +593,28 @@
         return setGroupLogo;
     }
 
+    private ActionEnableCondition<StateToken> notDefAndNotDeleted() {
+        return new ActionEnableCondition<StateToken>() {
+            public boolean mustBeEnabled(final StateToken itemToken) {
+                final boolean isNotDefContentToken = !session.getCurrentState().getGroup().getDefaultContent().getStateToken().equals(
+                        itemToken);
+                final boolean isNotDeleted = !(session.isCurrentStateAContent() && session.getContentState().getStatus().equals(
+                        ContentStatusDTO.inTheDustbin));
+                return isNotDefContentToken && isNotDeleted;
+            }
+        };
+    }
+
+    private ActionEnableCondition<StateToken> notDeleted() {
+        return new ActionEnableCondition<StateToken>() {
+            public boolean mustBeEnabled(final StateToken itemToken) {
+                final boolean isNotDeleted = !(session.isCurrentStateAContent() && session.getContentState().getStatus().equals(
+                        ContentStatusDTO.inTheDustbin));
+                return isNotDeleted;
+            }
+        };
+    }
+
     private void register(ActionToolbarMenuAndItemDescriptor<StateToken> action, Position position,
             String... registerInTypes) {
         switch (position) {
@@ -572,4 +627,23 @@
         }
     }
 
+    private void setContentStatus(final ContentStatusDTO status, final StateToken stateToken) {
+        final AsyncCallbackSimple<StateAbstractDTO> callback = new AsyncCallbackSimple<StateAbstractDTO>() {
+            public void onSuccess(final StateAbstractDTO state) {
+                if (session.inSameToken(stateToken)) {
+                    session.setCurrentState(state);
+                    publicLink.setState(state);
+                    foldableContent.refreshState();
+                }
+                contextNavigator.setItemStatus(stateToken, status);
+            }
+        };
+        if (status.equals(ContentStatusDTO.publishedOnline) || status.equals(ContentStatusDTO.rejected)
+                || status.equals(ContentStatusDTO.inTheDustbin)) {
+            contentServiceProvider.get().setStatusAsAdmin(session.getUserHash(), stateToken, status, callback);
+        } else {
+            contentServiceProvider.get().setStatus(session.getUserHash(), stateToken, status, callback);
+        }
+    }
+
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPanel.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -317,8 +317,10 @@
             node.setCls("k-ctn-status-normal");
             break;
         case inTheDustbin:
+            node.setCls("k-ctn-status-deleted");
+            break;
         case rejected:
-            node.setCls("k-ctn-status-rejdel");
+            node.setCls("k-ctn-status-rejected");
             break;
         case editingInProgress:
             node.setCls("k-ctn-status-editing");

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -167,7 +167,6 @@
     private ActionItemCollection<StateToken> addItem(final String title, final String contentTypeId,
             final BasicMimeTypeDTO mimeType, final ContentStatusDTO status, final StateToken stateToken,
             final StateToken parentStateToken, final AccessRightsDTO rights, final boolean isNodeSelected) {
-
         final ActionItemCollection<StateToken> toolbarActions = actionRegistry.getCurrentActions(stateToken,
                 contentTypeId, session.isLogged(), rights, true);
 
@@ -178,7 +177,11 @@
                         && rights.isAdministrable(), capabilitiesRegistry.isDropable(contentTypeId)
                         && rights.isAdministrable(), actionRegistry.getCurrentActions(stateToken, contentTypeId,
                         session.isLogged(), rights, false));
-        view.addItem(item);
+        if (status.equals(ContentStatusDTO.inTheDustbin) && !session.getShowDeletedContent()) {
+            // Don't show
+        } else {
+            view.addItem(item);
+        }
         return toolbarActions;
     }
 

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java	2009-01-26 17:13:03 UTC (rev 1037)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java	2009-01-26 20:38:12 UTC (rev 1038)
@@ -169,7 +169,7 @@
         participate.setToolTip(i18n.t("Request to participate in this group"));
         participate.setMustBeAuthenticated(false);
         participate.setAddCondition(new ActionAddCondition<StateToken>() {
-            public boolean mustBeAdded(StateToken token) {
+            public boolean mustBeAdded(StateToken param) {
                 return !isMember(session.getCurrentState().getGroupRights());
             }
         });




More information about the kune-commits mailing list