From b9f82bee05e1dd3a7c20fc022308cc6e8740e99a Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Thu, 27 Apr 2006 09:02:38 +0000 Subject: [PATCH] Checkpoint for the Manage Deleted Items UI git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2718 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/messages/webclient.properties | 38 +++++ .../web-client-config-forum-actions.xml | 1 + .../alfresco/web/app/servlet/BaseServlet.java | 1 + .../org/alfresco/web/bean/TrashcanBean.java | 137 ++++++++++++++++++ source/web/WEB-INF/faces-config-beans.xml | 19 ++- .../web/WEB-INF/faces-config-navigation.xml | 33 +++++ source/web/images/icons/delete_all.gif | Bin 0 -> 970 bytes source/web/images/icons/delete_all_large.gif | Bin 0 -> 778 bytes source/web/images/icons/recover.gif | Bin 0 -> 553 bytes source/web/images/icons/recover_all.gif | Bin 0 -> 553 bytes source/web/images/icons/recover_all_large.gif | Bin 0 -> 1304 bytes source/web/images/icons/recover_large.gif | Bin 0 -> 1304 bytes source/web/images/icons/trashcan.gif | Bin 0 -> 970 bytes source/web/images/icons/trashcan_large.gif | Bin 0 -> 778 bytes source/web/jsp/users/users.jsp | 4 +- 15 files changed, 230 insertions(+), 3 deletions(-) create mode 100644 source/java/org/alfresco/web/bean/TrashcanBean.java create mode 100644 source/web/images/icons/delete_all.gif create mode 100644 source/web/images/icons/delete_all_large.gif create mode 100644 source/web/images/icons/recover.gif create mode 100644 source/web/images/icons/recover_all.gif create mode 100644 source/web/images/icons/recover_all_large.gif create mode 100644 source/web/images/icons/recover_large.gif create mode 100644 source/web/images/icons/trashcan.gif create mode 100644 source/web/images/icons/trashcan_large.gif diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 1f60914e0b..4211568f63 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -761,6 +761,44 @@ company_id=Company ID home_space_location=Home Space Location home_space_name=Home Space Name +# Trashcan messages +title_deleted_items=Deleted Items +title_delete_all=Delete All Items +title_recover_all=Recover All Items +title_recover_listed=Recover Listed Items +title_delete_listed=Delete Listed Items +title_delete_item=Delete Item +title_recover_item=Recover Item +deleted_items=Deleted Items +manage_deleted_items=Manage Deleted Items +manage_deleted_items_description=Remove or recover previously deleted items +recover_all_items=Recover All Items +delete_all_items=Delete All Items +deleted_items_info=Use the Search to find specific named deleted items and use the Filters to reduce the list. +original_location=Original Location +deleted_date=Date Deleted +deleted_user=Deleted by User +recover=Recover +search_deleted_items=Search Deleted Items +delete_item=Delete Item +delete_item_info=Permanently delete an item from the deleted file store +delete_item_confirm=Are you sure you want to permanently delete \"{0}\" from the deleted file store? The item cannot be recovered once this action has been performed. +recover_item=Recover Item +recover_item_info=Recover an item from the deleted file store +recover_item_confirm=Are you sure you want to recover \"{0}\" from the deleted file store? +delete_all_items=Delete All Items +delete_all_items_info=Permanently delete all files and spaces from the deleted file store +delete_all_items_confirm=Are you sure you want to permanently delete all files and spaces from the deleted file store? The items cannot be recovered once this action has been performed. +recover_all_items=Recover All Items +recover_all_items_info=Recover all files and spaces from the deleted file store +recover_all_items_confirm=Are you sure you want to recover all the deleted files and spaces from the deleted file store? +delete_listed_items=Delete Listed Items +delete_listed_items_info=Permanently delete the listed files and spaces from the deleted file store +delete_listed_items_confirm=Are you sure you want to permanently delete the listed deleted files and spaces from the deleted file store? The items cannot be recovered once this action has been performed. +recover_listed_items=Recover Listed Items +recover_listed_items_info=Recover the listed files and spaces from the deleted file store +recover_listed_items_confirm=Are you sure you want to recover the listed deleted files and spaces from the deleted file store? + # Admin Console messages title_admin_console=Administration Console admin_console=Administration Console diff --git a/config/alfresco/web-client-config-forum-actions.xml b/config/alfresco/web-client-config-forum-actions.xml index b43f12eefc..e5c1f2eaa2 100644 --- a/config/alfresco/web-client-config-forum-actions.xml +++ b/config/alfresco/web-client-config-forum-actions.xml @@ -258,6 +258,7 @@ + diff --git a/source/java/org/alfresco/web/app/servlet/BaseServlet.java b/source/java/org/alfresco/web/app/servlet/BaseServlet.java index 2e8568a056..5f4a945015 100644 --- a/source/java/org/alfresco/web/app/servlet/BaseServlet.java +++ b/source/java/org/alfresco/web/app/servlet/BaseServlet.java @@ -75,6 +75,7 @@ public abstract class BaseServlet extends HttpServlet validRedirectJSPs.add("/jsp/dialog/system-info.jsp"); validRedirectJSPs.add("/jsp/forums/forums.jsp"); validRedirectJSPs.add("/jsp/users/users.jsp"); + validRedirectJSPs.add("/jsp/trashcan/trash-list.jsp"); } private static Log logger = LogFactory.getLog(BaseServlet.class); diff --git a/source/java/org/alfresco/web/bean/TrashcanBean.java b/source/java/org/alfresco/web/bean/TrashcanBean.java new file mode 100644 index 0000000000..3e4882b9e2 --- /dev/null +++ b/source/java/org/alfresco/web/bean/TrashcanBean.java @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2005 Alfresco, Inc. + * + * Licensed under the Mozilla Public License version 1.1 + * with a permitted attribution clause. You may obtain a + * copy of the License at + * + * http://www.alfresco.org/legal/license.txt + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the + * License. + */ +package org.alfresco.web.bean; + +import java.util.Collections; +import java.util.List; + +import org.alfresco.service.cmr.repository.NodeService; +import org.alfresco.service.cmr.search.SearchService; +import org.alfresco.web.app.context.IContextListener; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.ui.common.component.data.UIRichList; + +/** + * @author Kevin Roast + */ +public class TrashcanBean implements IContextListener +{ + /** NodeService bean reference */ + protected NodeService nodeService; + + /** SearchService bean reference */ + protected SearchService searchService; + + /** Component reference for Deleted Items RichList control */ + protected UIRichList itemsRichList; + + /** Search text */ + private String searchText; + + + // ------------------------------------------------------------------------------ + // Bean property getters and setters + + /** + * @param nodeService The NodeService to set. + */ + public void setNodeService(NodeService nodeService) + { + this.nodeService = nodeService; + } + + /** + * @param searchService the search service + */ + public void setSearchService(SearchService searchService) + { + this.searchService = searchService; + } + + /** + * @return Returns the itemsRichList. + */ + public UIRichList getItemsRichList() + { + return this.itemsRichList; + } + + /** + * @param itemsRichList The itemsRichList to set. + */ + public void setItemsRichList(UIRichList itemsRichList) + { + this.itemsRichList = itemsRichList; + } + + /** + * @return Returns the searchText. + */ + public String getSearchText() + { + return this.searchText; + } + + /** + * @param searchText The searchText to set. + */ + public void setSearchText(String searchText) + { + this.searchText = searchText; + } + + /** + * @return the list of deleted items to display + */ + public List getItems() + { + // TODO: need the following MapNode properties: + // deletedDate, locationPath, displayPath, deletedUsername [only for admin user] + // TODO: get deleted items from deleted items store + // use a search - also use filters by name/username + return Collections.emptyList(); + } + + + // ------------------------------------------------------------------------------ + // Action handlers + + // TODO: + // need the following navigation outcomes + // DONE deleteItem, recoverItem, recoverAllItems, deleteAllItems, recoverListedItems, deleteListedItems + // need the following Action Handlers: + // deleteItemOK, recoverItemOK, deleteAllItemsOK, recoverAllItemsOK, recoverListedItemsOK, deleteListedItemsOK + // and following Action Event Handlers: + // setupItemAction, search + // and following getters: + // listedItems, item (setup by setupItemAction!) + + + // ------------------------------------------------------------------------------ + // IContextListener implementation + + /** + * @see org.alfresco.web.app.context.IContextListener#contextUpdated() + */ + public void contextUpdated() + { + if (this.itemsRichList != null) + { + this.itemsRichList.setValue(null); + } + } +} diff --git a/source/web/WEB-INF/faces-config-beans.xml b/source/web/WEB-INF/faces-config-beans.xml index e80288e5d2..c1c8347aae 100644 --- a/source/web/WEB-INF/faces-config-beans.xml +++ b/source/web/WEB-INF/faces-config-beans.xml @@ -1394,6 +1394,23 @@ + + + The bean that holds state for the Manage Deleted Items screen. + + TrashcanBean + org.alfresco.web.bean.TrashcanBean + session + + nodeService + #{NodeService} + + + searchService + #{SearchService} + + + Helper bean that caches the last item added to a multi @@ -1404,8 +1421,8 @@ session - + Bean that generates a text field component diff --git a/source/web/WEB-INF/faces-config-navigation.xml b/source/web/WEB-INF/faces-config-navigation.xml index a484145a45..4ba20bbf82 100644 --- a/source/web/WEB-INF/faces-config-navigation.xml +++ b/source/web/WEB-INF/faces-config-navigation.xml @@ -174,6 +174,10 @@ saveEditSearch /jsp/dialog/edit-search.jsp + + manageDeletedItems + /jsp/trashcan/trash-list.jsp + @@ -1153,5 +1157,34 @@ /jsp/forums/forum.jsp + + + + /jsp/trashcan/* + + deleteItem + /jsp/trashcan/delete-item.jsp + + + recoverItem + /jsp/trashcan/recover-item.jsp + + + recoverAllItems + /jsp/trashcan/recover-all.jsp + + + deleteAllItems + /jsp/trashcan/delete-all.jsp + + + recoverListedItems + /jsp/trashcan/recover-listed.jsp + + + deleteListedItems + /jsp/trashcan/delete-listed.jsp + + diff --git a/source/web/images/icons/delete_all.gif b/source/web/images/icons/delete_all.gif new file mode 100644 index 0000000000000000000000000000000000000000..4ee6ccfce4f019ea02c099c3d5971f589cfa7fd1 GIT binary patch literal 970 zcmZ?wbhEHbQCnMEUtizY*x1z6)ZEBU#HmxKPMTOUwr%_N?K^ht*u8uAzJ2=+9z1yH(4oVJ4<9*l^|W literal 0 HcmV?d00001 diff --git a/source/web/images/icons/delete_all_large.gif b/source/web/images/icons/delete_all_large.gif new file mode 100644 index 0000000000000000000000000000000000000000..cfe75d348b54f6a400630de26c5e0223e61611ee GIT binary patch literal 778 zcmZ?wbhEHbRA5kGc*Xz%|NsC0_wV1|zkh%K{{8FMuOB~teEat8>({TJKYxDv_U+4; zFP}Yo_Vnq~$B!RBdi3bw!-o$ZJh*@V{=Iwm?%ut7=gytmw{PFLapU^+>({PbyL$EN zl`B^+U%q_){P}a|&YeAb_RN_xr%s(ZapJ`BgDwQA+cl`B@P zSiXGuvSrJbE?v50$&$s37cW}0XyL+z^XJc>H*enDxpU{tnKOI#>{+vB&73)N#*7)$ zr%#_YZQ9hSQ>RRsGI{dki4!OG_xJbq_V)Djba!`mb#--gbhNj(x3#skwzjskv@|z2 zH#IdiHa6DP)z#M4*3{HgS65e6Rh5^Qmz0zg6&2;?<^sbC9A;D_6o0ZXGBBhv=zvTF z#R&uZ|Ay42=9bpB_Kr416)k&rcb|aJ2-D7KO^(()vw8UhMWO?yw`#iCnj3pM>KmGv zSz6orML9XUy6R7lGglVjVq;?FvrXTG?Qi)m_sTkA{hf`mviDng z#5W}NvGdfteCfi@escPf6B7~>6+3wOwJHJ>AF*&NXxAiYMjYZ2k~2)%^NKO0Lr~Rs Up2xyXs^JG8pP1aw#lm0>002O1+W-In literal 0 HcmV?d00001 diff --git a/source/web/images/icons/recover.gif b/source/web/images/icons/recover.gif new file mode 100644 index 0000000000000000000000000000000000000000..c49ece5db07707b47c0c9eef3f993dd407d46a60 GIT binary patch literal 553 zcmZ?wbhEHb6krfwc*Xz%|Ns9lSlL^@X(nfmC2z3wVPfyfqs9 zG#mZ2>U|Acf-JftLswOpb%c4(&h(j+6|%HAaYJ3|hI;4z*vPp##XH+mmX_qLtF7DD zo3pwqb6HvS&W^@?y{!i)Htgt_aD3XNW78V9G*3S@Yu>rJT{}7!Usy0{U*FP;3zuD3 zu-L&Gch>H^yKcv|Wt%T9I(UEm(TAH3 z-`{Zj(dJW+w;Z~)`ox2cXP#_5dS~sqr`s+(+kW}^j_WUX-+I00-rIc--yL}R;n1s3 zM}WZs4j$SPia%Kx85rUibU@aC;)H>{ts$2jGKpp zjEXd<^9X1 KSs}o|U=0A9_sOXM literal 0 HcmV?d00001 diff --git a/source/web/images/icons/recover_all.gif b/source/web/images/icons/recover_all.gif new file mode 100644 index 0000000000000000000000000000000000000000..c49ece5db07707b47c0c9eef3f993dd407d46a60 GIT binary patch literal 553 zcmZ?wbhEHb6krfwc*Xz%|Ns9lSlL^@X(nfmC2z3wVPfyfqs9 zG#mZ2>U|Acf-JftLswOpb%c4(&h(j+6|%HAaYJ3|hI;4z*vPp##XH+mmX_qLtF7DD zo3pwqb6HvS&W^@?y{!i)Htgt_aD3XNW78V9G*3S@Yu>rJT{}7!Usy0{U*FP;3zuD3 zu-L&Gch>H^yKcv|Wt%T9I(UEm(TAH3 z-`{Zj(dJW+w;Z~)`ox2cXP#_5dS~sqr`s+(+kW}^j_WUX-+I00-rIc--yL}R;n1s3 zM}WZs4j$SPia%Kx85rUibU@aC;)H>{ts$2jGKpp zjEXd<^9X1 KSs}o|U=0A9_sOXM literal 0 HcmV?d00001 diff --git a/source/web/images/icons/recover_all_large.gif b/source/web/images/icons/recover_all_large.gif new file mode 100644 index 0000000000000000000000000000000000000000..035d0764208c35b46ecada9a2cd8eaefa42eb8a8 GIT binary patch literal 1304 zcmc)J+glO_00nRwYWQV^mzJe0b5>e@tF~$?WeBC`9h#~@l zi698#g#ZB+Lj+L}Q}LRbm87YeU0hjf+c%f{Cw3mr^Lh9kKa{VBXN(hI3*a+gCCkgp z(DI9im{=dyB?SBO?$W5A7_q*b-%#A7U9|8(Uh;8%YH)R$O9^^A<>VVKd-6j>FImEnJ8h6L9n zUXtSz<+m?4=9(5~zAf@_C_V`1M8=9UlAG?ND)Q1>?xrd7dBY91h5H=HUXElagnY=E z>f=m-ZKEOF=)SucetXM-A|)x<=A5jyf~zfe^L2DuFHbh1(oQ`Z zoFCg!3U{R=+!=mQ_DMMROtd&TOL^~_l91h6aJ{wQhKdO1h9)*%&ruO^ZH0$8=orbB zTn*{AnsleV7+D<_FHOO#iFxhCr|V;}jp>)0ucoxz$WY?$X~_j0lq5wav6E8RNhRrM z*rw!5O{v)`d_gCftS|jlcJZ7Xo36~hsm`Tz(a+1V*{U3>fnM6ppcxox$_%Q3R`%#V zqq_{JxmBnuyx()bqL<0+DbMS;U1?;o`zngM2$g*mM15XWKbzan_PjaSUV}!JQpdSRq0+dbWKV1FB)_vNr$Q4 zFeUAtmi4@p_e{(BUdsDt8V6^ahUS`w=Modg`6}<$KM{V*9J#wR4N@uRnAweC&9)qa)+_QkAjD|!-sqb$4E8mufEVAEVW9QoE z0D)O_7MVc82vJ%9X`nmQ=KG^Ki!W-RUk}akD5e{U58E53tAr&m{(fR)d1p@6dB*t$ zY;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pp5ICju-*Jc&6Je1`xvj2DrurJWEemCk2{=>_oG0)0tD+)n-QCnMEUtizY*x1z6)ZEBU#HmxKPMTOUwr%_N?K^ht*u8uAzJ2=+9z1yH(4oVJ4<9*l^|W literal 0 HcmV?d00001 diff --git a/source/web/images/icons/trashcan_large.gif b/source/web/images/icons/trashcan_large.gif new file mode 100644 index 0000000000000000000000000000000000000000..cfe75d348b54f6a400630de26c5e0223e61611ee GIT binary patch literal 778 zcmZ?wbhEHbRA5kGc*Xz%|NsC0_wV1|zkh%K{{8FMuOB~teEat8>({TJKYxDv_U+4; zFP}Yo_Vnq~$B!RBdi3bw!-o$ZJh*@V{=Iwm?%ut7=gytmw{PFLapU^+>({PbyL$EN zl`B^+U%q_){P}a|&YeAb_RN_xr%s(ZapJ`BgDwQA+cl`B@P zSiXGuvSrJbE?v50$&$s37cW}0XyL+z^XJc>H*enDxpU{tnKOI#>{+vB&73)N#*7)$ zr%#_YZQ9hSQ>RRsGI{dki4!OG_xJbq_V)Djba!`mb#--gbhNj(x3#skwzjskv@|z2 zH#IdiHa6DP)z#M4*3{HgS65e6Rh5^Qmz0zg6&2;?<^sbC9A;D_6o0ZXGBBhv=zvTF z#R&uZ|Ay42=9bpB_Kr416)k&rcb|aJ2-D7KO^(()vw8UhMWO?yw`#iCnj3pM>KmGv zSz6orML9XUy6R7lGglVjVq;?FvrXTG?Qi)m_sTkA{hf`mviDng z#5W}NvGdfteCfi@escPf6B7~>6+3wOwJHJ>AF*&NXxAiYMjYZ2k~2)%^NKO0Lr~Rs Up2xyXs^JG8pP1aw#lm0>002O1+W-In literal 0 HcmV?d00001 diff --git a/source/web/jsp/users/users.jsp b/source/web/jsp/users/users.jsp index 875eb30e9b..cec237c38e 100644 --- a/source/web/jsp/users/users.jsp +++ b/source/web/jsp/users/users.jsp @@ -144,11 +144,11 @@ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %> -
+
    -
+