mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Final elements of the Soft Delete UI
- Recover and delete listed items - Report screens for listed item results - Recover and delete all items (admin only) - Recover listed items to a different location git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2856 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -773,6 +773,7 @@ title_recover_listed=Recover Listed Items
|
||||
title_delete_listed=Delete Listed Items
|
||||
title_delete_item=Delete Item
|
||||
title_recover_item=Recover Item
|
||||
title_recovery_report=Recovery Report
|
||||
deleted_items=Deleted Items
|
||||
manage_deleted_items=Manage Deleted Items
|
||||
manage_deleted_items_description=Remove or recover previously deleted items
|
||||
@@ -801,15 +802,19 @@ 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.
|
||||
delete_listed_items_confirm=Are you sure you want to permanently delete the following 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?
|
||||
recover_listed_items_confirm=Are you sure you want to recover the following deleted files and spaces from the deleted file store?
|
||||
recovered_item_success=The item \"{0}\" has been successfully recovered.
|
||||
recovered_item_parent=Failed to recover the item \"{0}\" as the original parent folder is missing, please select a new folder destination.
|
||||
recovered_item_parent_short=Parent folder missing
|
||||
recovered_item_permission=Failed to recover the item \"{0}\" as you do not have the appropriate permissions to restore the item to the original parent folder, please select a new folder destination.
|
||||
recovered_item_permission_short=No permissions to write
|
||||
recovered_item_integrity=Failed to recover the item \"{0}\" as there is now an item in the original parent folder with the same name, please select a new folder destination.
|
||||
recovered_item_integrity_short=Item with same name exists
|
||||
recovered_item_failure=Failed to recover the item \"{0}\" due to error: {1}
|
||||
recovered_item_failure_short=Failed
|
||||
delete_item_success=The item \"{0}\" has been permanently deleted.
|
||||
title_deleted_item_details=Deleted Item Details
|
||||
deleteditem_details_description=Details of the deleted item
|
||||
@@ -822,6 +827,11 @@ date_filter_all=All
|
||||
date_filter_today=Today
|
||||
date_filter_week=Last 7 days
|
||||
date_filter_month=Last 30 days
|
||||
recovery_report=Recovered Items Report
|
||||
recovery_report_info=The results of recovering the selected items
|
||||
recovery_report_success=The following items were recovered successfully
|
||||
recovery_report_failed=The following items failed to recover
|
||||
recovery_report_reason=Failure Reason
|
||||
|
||||
# Admin Console messages
|
||||
title_admin_console=Administration Console
|
||||
|
@@ -374,9 +374,6 @@
|
||||
|
||||
<!-- Manage Deleted Items -->
|
||||
<action id="manage_deleted_items">
|
||||
<permissions>
|
||||
<permission allow="true">Write</permission>
|
||||
</permissions>
|
||||
<label-id>manage_deleted_items</label-id>
|
||||
<image>/images/icons/trashcan.gif</image>
|
||||
<action>dialog:manageDeletedItems</action>
|
||||
|
@@ -47,6 +47,7 @@ import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.CachingDateFormat;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.IContextListener;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
import org.alfresco.web.bean.repository.MapNode;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.NodePropertyResolver;
|
||||
@@ -64,6 +65,23 @@ import org.alfresco.web.ui.common.component.data.UIRichList;
|
||||
*/
|
||||
public class TrashcanBean implements IContextListener
|
||||
{
|
||||
private static final String MSG_DELETED_ITEMS_FOR = "deleted_items_for";
|
||||
private static final String MSG_DELETED_ITEMS = "deleted_items";
|
||||
private static final String MSG_RECOVERED_ITEM_INTEGRITY = "recovered_item_integrity";
|
||||
private static final String MSG_RECOVERED_ITEM_PERMISSION = "recovered_item_permission";
|
||||
private static final String MSG_RECOVERED_ITEM_PARENT = "recovered_item_parent";
|
||||
private static final String MSG_RECOVERED_ITEM_FAILURE = "recovered_item_failure";
|
||||
private static final String MSG_RECOVERED_ITEM_INTEGRITY_S = "recovered_item_integrity_short";
|
||||
private static final String MSG_RECOVERED_ITEM_PERMISSION_S = "recovered_item_permission_short";
|
||||
private static final String MSG_RECOVERED_ITEM_PARENT_S = "recovered_item_parent_short";
|
||||
private static final String MSG_RECOVERED_ITEM_FAILURE_S = "recovered_item_failure_short";
|
||||
private static final String MSG_RECOVERED_ITEM_SUCCESS = "recovered_item_success";
|
||||
private static final String MSG_RECOVERY_REASON = "recovery_report_reason";
|
||||
private static final String MSG_ORIGINAL_LOCATION = "original_location";
|
||||
private static final String MSG_NAME = "name";
|
||||
|
||||
private static final String PROP_RECOVERSTATUS = "recoverstatus";
|
||||
|
||||
private static final String FILTER_DATE_ALL = "all";
|
||||
private static final String FILTER_DATE_TODAY = "today";
|
||||
private static final String FILTER_DATE_WEEK = "week";
|
||||
@@ -71,15 +89,8 @@ public class TrashcanBean implements IContextListener
|
||||
private static final String FILTER_USER_ALL = "all";
|
||||
private static final String FILTER_USER_USER = "user";
|
||||
|
||||
private static final String MSG_DELETED_ITEMS_FOR = "deleted_items_for";
|
||||
private static final String MSG_DELETED_ITEMS = "deleted_items";
|
||||
private static final String MSG_RECOVERED_ITEM_INTEGRITY = "recovered_item_integrity";
|
||||
private static final String MSG_RECOVERED_ITEM_PERMISSION = "recovered_item_permission";
|
||||
private static final String MSG_RECOVERED_ITEM_PARENT = "recovered_item_parent";
|
||||
private static final String MSG_RECOVERED_ITEM_FAILURE = "recovered_item_failure";
|
||||
private static final String MSG_RECOVERED_ITEM_SUCCESS = "recovered_item_success";
|
||||
|
||||
private static final String OUTCOME_DIALOGCLOSE = "dialog:close";
|
||||
private static final String OUTCOME_RECOVERY_REPORT = "recoveryReport";
|
||||
|
||||
private static final String RICHLIST_ID = "trashcan-list";
|
||||
private static final String RICHLIST_MSG_ID = "trashcan" + ':' + RICHLIST_ID;
|
||||
@@ -121,6 +132,10 @@ public class TrashcanBean implements IContextListener
|
||||
/** Currently listed items */
|
||||
private List<Node> listedItems = Collections.<Node>emptyList();
|
||||
|
||||
private List<Node> successItems = Collections.<Node>emptyList();
|
||||
|
||||
private List<Node> failureItems = Collections.<Node>emptyList();
|
||||
|
||||
/** Current action context Node */
|
||||
private Node actionNode;
|
||||
|
||||
@@ -332,6 +347,38 @@ public class TrashcanBean implements IContextListener
|
||||
this.listedItems = listedItems;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HTML table of the listed items
|
||||
*/
|
||||
public String getListedItemsTable()
|
||||
{
|
||||
return buildItemsTable(getListedItems(), "recoveredItemsList", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HTML table of the items successfully recovered
|
||||
*/
|
||||
public String getSuccessItemsTable()
|
||||
{
|
||||
return buildItemsTable(this.successItems, "recoveredItemsList", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HTML table of the items that failed to recover
|
||||
*/
|
||||
public String getFailureItemsTable()
|
||||
{
|
||||
return buildItemsTable(this.failureItems, "failedItemsList", true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return count of the items that failed to recover
|
||||
*/
|
||||
public int getFailureItemsCount()
|
||||
{
|
||||
return this.failureItems.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param node The item context for the current action
|
||||
*/
|
||||
@@ -492,10 +539,6 @@ public class TrashcanBean implements IContextListener
|
||||
// ------------------------------------------------------------------------------
|
||||
// Action handlers
|
||||
|
||||
// TODO:
|
||||
// need the following Action Handlers:
|
||||
// deleteAllItemsOK, recoverAllItemsOK, recoverListedItemsOK, deleteListedItemsOK
|
||||
|
||||
/**
|
||||
* Search the deleted item store by name
|
||||
*/
|
||||
@@ -689,6 +732,159 @@ public class TrashcanBean implements IContextListener
|
||||
return outcome;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action handler to recover the list items
|
||||
*/
|
||||
public String recoverListedItemsOK()
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
UserTransaction tx = null;
|
||||
try
|
||||
{
|
||||
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance(), true);
|
||||
tx.begin();
|
||||
|
||||
// restore the nodes - the user may have requested a restore to a different parent
|
||||
List<NodeRef> nodeRefs = new ArrayList<NodeRef>(this.listedItems.size());
|
||||
for (Node node : this.listedItems)
|
||||
{
|
||||
nodeRefs.add(node.getNodeRef());
|
||||
}
|
||||
List<RestoreNodeReport> reports;
|
||||
if (this.destination == null)
|
||||
{
|
||||
reports = this.nodeArchiveService.restoreArchivedNodes(nodeRefs);
|
||||
}
|
||||
else
|
||||
{
|
||||
reports = this.nodeArchiveService.restoreArchivedNodes(nodeRefs, this.destination, null, null);
|
||||
}
|
||||
|
||||
saveReportDetail(reports);
|
||||
|
||||
tx.commit();
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
|
||||
// most exceptions will be caught and returned as RestoreNodeReport objects by the service
|
||||
String reason = err.getMessage();
|
||||
String msg = MessageFormat.format(
|
||||
Application.getMessage(fc, Repository.ERROR_GENERIC), reason);
|
||||
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg);
|
||||
fc.addMessage(null, facesMsg);
|
||||
}
|
||||
|
||||
// clear the UI state in preparation for finishing the action
|
||||
contextUpdated();
|
||||
|
||||
return OUTCOME_RECOVERY_REPORT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action handler called to recover all items from the store (Admin only)
|
||||
*/
|
||||
public String recoverAllItemsOK()
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
|
||||
UserTransaction tx = null;
|
||||
try
|
||||
{
|
||||
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance(), true);
|
||||
tx.begin();
|
||||
|
||||
// restore all nodes - the user may have requested a restore to a different parent
|
||||
List<RestoreNodeReport> reports;
|
||||
if (this.destination == null)
|
||||
{
|
||||
reports = this.nodeArchiveService.restoreAllArchivedNodes(Repository.getStoreRef());
|
||||
}
|
||||
else
|
||||
{
|
||||
reports = this.nodeArchiveService.restoreAllArchivedNodes(Repository.getStoreRef(), this.destination, null, null);
|
||||
}
|
||||
|
||||
// TODO: wrap all this in a UserTransaction - it performs a lot of getProperties()!
|
||||
saveReportDetail(reports);
|
||||
|
||||
tx.commit();
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
|
||||
// most exceptions will be caught and returned as RestoreNodeReport objects by the service
|
||||
String reason = err.getMessage();
|
||||
String msg = MessageFormat.format(
|
||||
Application.getMessage(fc, Repository.ERROR_GENERIC), reason);
|
||||
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg);
|
||||
fc.addMessage(null, facesMsg);
|
||||
}
|
||||
|
||||
// clear the UI state in preparation for finishing the action
|
||||
contextUpdated();
|
||||
|
||||
return OUTCOME_RECOVERY_REPORT;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return outcome to close the main list screen and reset other beans ready for display
|
||||
*/
|
||||
public String close()
|
||||
{
|
||||
// call beans to update UI context for other screens
|
||||
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
|
||||
return OUTCOME_DIALOGCLOSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action handler to delete the listed items
|
||||
*/
|
||||
public String deleteListedItemsOK()
|
||||
{
|
||||
try
|
||||
{
|
||||
List<NodeRef> nodeRefs = new ArrayList<NodeRef>(this.listedItems.size());
|
||||
for (Node node : this.listedItems)
|
||||
{
|
||||
nodeRefs.add(node.getNodeRef());
|
||||
}
|
||||
this.nodeArchiveService.purgeArchivedNodes(nodeRefs);
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
|
||||
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
|
||||
}
|
||||
|
||||
// clear the UI state in preparation for finishing the action
|
||||
contextUpdated();
|
||||
|
||||
return OUTCOME_DIALOGCLOSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action handler to delete all items
|
||||
*/
|
||||
public String deleteAllItemsOK()
|
||||
{
|
||||
try
|
||||
{
|
||||
this.nodeArchiveService.purgeAllArchivedNodes(Repository.getStoreRef());
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
|
||||
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err);
|
||||
}
|
||||
|
||||
// clear the UI state in preparation for finishing the action
|
||||
contextUpdated();
|
||||
|
||||
return OUTCOME_DIALOGCLOSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action handler to initially setup the trashcan screen
|
||||
*/
|
||||
@@ -825,6 +1021,124 @@ public class TrashcanBean implements IContextListener
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the detail of the items that were successfully or unsuccessfully restored
|
||||
*
|
||||
* @param reports The List of RestoreNodeReport objects to walk for results
|
||||
*/
|
||||
private void saveReportDetail(List<RestoreNodeReport> reports)
|
||||
{
|
||||
// store the results ready for the next dialog page
|
||||
this.successItems = new ArrayList<Node>(reports.size());
|
||||
this.failureItems = new ArrayList<Node>(reports.size());
|
||||
for (RestoreNodeReport report : reports)
|
||||
{
|
||||
if (RestoreStatus.SUCCESS == report.getStatus())
|
||||
{
|
||||
Node node = new Node(report.getRestoredNodeRef());
|
||||
node.getProperties().put(PROP_RECOVERSTATUS, report.getStatus());
|
||||
this.successItems.add(node);
|
||||
}
|
||||
else
|
||||
{
|
||||
Node node = new Node(report.getArchivedNodeRef());
|
||||
node.getProperties().put(PROP_RECOVERSTATUS, report.getStatus());
|
||||
this.failureItems.add(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an HTML table of the items that are to be or have been recovered.
|
||||
*
|
||||
* @param items List of Node objects to display in the table
|
||||
* @param cssClass CSS style to apply to the table
|
||||
* @param report Set true to report the reason for any failure. This flag requires that the Node
|
||||
* object has a pseudo property "recoverstatus" containing the RestoreStatus.
|
||||
*
|
||||
* @return HTML table of node info
|
||||
*/
|
||||
private String buildItemsTable(List<Node> items, String cssClass, boolean report)
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
String contextPath = fc.getExternalContext().getRequestContextPath();
|
||||
|
||||
StringBuilder buf = new StringBuilder(1024);
|
||||
|
||||
// outer table
|
||||
buf.append("<table width=100% cellspacing=1 cellpadding=1 border=0 class='");
|
||||
buf.append(cssClass);
|
||||
buf.append("'>");
|
||||
// title row
|
||||
buf.append("<tr style='border-bottom:1px'><th></th><th align=left><b>");
|
||||
buf.append(Application.getMessage(fc, MSG_NAME));
|
||||
buf.append("</b></th><th align=left><b>");
|
||||
buf.append(Application.getMessage(fc, MSG_ORIGINAL_LOCATION));
|
||||
buf.append("</b></th>");
|
||||
if (report)
|
||||
{
|
||||
buf.append("<th align=left>");
|
||||
buf.append(Application.getMessage(fc, MSG_RECOVERY_REASON));
|
||||
buf.append("</th>");
|
||||
}
|
||||
buf.append("</tr>");
|
||||
for (Node node : items)
|
||||
{
|
||||
// listed item rows
|
||||
buf.append("<tr><td width=16>");
|
||||
String img;
|
||||
if (this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
String icon = (String)node.getProperties().get("app:icon");
|
||||
img = "/images/icons/" + (icon != null ? icon + "-16.gif" : BrowseBean.SPACE_SMALL_DEFAULT + ".gif");
|
||||
}
|
||||
else
|
||||
{
|
||||
img = Utils.getFileTypeImage(node.getName(), false);
|
||||
}
|
||||
buf.append("<img width=16 height=16 alt='' src='").append(contextPath).append(img).append("'>");
|
||||
buf.append("</td><td>");
|
||||
buf.append(node.getName());
|
||||
buf.append("</td><td>");
|
||||
Path path = (Path)node.getProperties().get(ContentModel.PROP_ARCHIVED_ORIGINAL_PATH);
|
||||
if (path != null)
|
||||
{
|
||||
buf.append(Repository.getDisplayPath(path));
|
||||
}
|
||||
buf.append("</td>");
|
||||
if (report)
|
||||
{
|
||||
buf.append("<td>");
|
||||
String msg;
|
||||
switch ((RestoreStatus)node.getProperties().get(PROP_RECOVERSTATUS))
|
||||
{
|
||||
case FAILURE_INVALID_PARENT:
|
||||
msg = MSG_RECOVERED_ITEM_PARENT_S;
|
||||
break;
|
||||
|
||||
case FAILURE_PERMISSION:
|
||||
msg = MSG_RECOVERED_ITEM_PERMISSION_S;
|
||||
break;
|
||||
|
||||
case FAILURE_INTEGRITY:
|
||||
msg = MSG_RECOVERED_ITEM_INTEGRITY_S;
|
||||
break;
|
||||
|
||||
default:
|
||||
msg = MSG_RECOVERED_ITEM_FAILURE_S;
|
||||
break;
|
||||
}
|
||||
buf.append(Application.getMessage(fc, msg));
|
||||
buf.append("</td>");
|
||||
}
|
||||
buf.append("</tr>");
|
||||
}
|
||||
// end table
|
||||
buf.append("</table>");
|
||||
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
private boolean isAdminUser()
|
||||
{
|
||||
return Application.getCurrentUser(FacesContext.getCurrentInstance()).isAdmin();
|
||||
|
@@ -927,6 +927,10 @@
|
||||
<from-outcome>itemDetails</from-outcome>
|
||||
<to-view-id>/jsp/trashcan/item-details.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>recoveryReport</from-outcome>
|
||||
<to-view-id>/jsp/trashcan/recovery-report.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
</faces-config>
|
||||
|
@@ -402,6 +402,24 @@ a.topToolbarLinkHighlight, a.topToolbarLinkHighlight:link, a.topToolbarLinkHighl
|
||||
border-color: #003366;
|
||||
}
|
||||
|
||||
.recoveredItemsList
|
||||
{
|
||||
padding: 2px;
|
||||
background-color: #EEEEEE;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #AAAAAA;
|
||||
}
|
||||
|
||||
.failedItemsList
|
||||
{
|
||||
padding: 2px;
|
||||
background-color: #EEEEEE;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #e00028;
|
||||
}
|
||||
|
||||
.wizardSectionHeading
|
||||
{
|
||||
padding: 2px;
|
||||
|
@@ -104,7 +104,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h:outputText value="#{TrashcanBean.listedItems}" escape="false" />
|
||||
<h:outputText value="#{TrashcanBean.listedItemsTable}" escape="false" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@@ -158,7 +158,7 @@
|
||||
<table cellpadding="1" cellspacing="1" border="0" width="100%">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
|
||||
<h:commandButton value="#{msg.close}" action="#{TrashcanBean.close}" styleClass="wizardButton" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -121,7 +121,6 @@
|
||||
</tr>
|
||||
<tr><td colspan=2 class="paddingRow"></td></tr>
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<h:outputText value="#{msg.destination}" />:
|
||||
</td>
|
||||
|
@@ -96,17 +96,43 @@
|
||||
|
||||
<td width="100%" valign="top">
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
|
||||
<table cellpadding="2" cellspacing="2" border="0">
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td class="mainSubTitle">
|
||||
<td colspan=2 class="mainSubTitle">
|
||||
<h:outputText value="#{msg.recover_listed_items_confirm}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h:outputText value="#{TrashcanBean.listedItems}" escape="false" />
|
||||
<td colspan=2>
|
||||
<h:outputText value="#{TrashcanBean.listedItemsTable}" escape="false" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=2 class="paddingRow"></td></tr>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td valign=top style="padding-top:2px" width=20><h:graphicImage url="/images/icons/info_icon.gif" width="16" height="16"/></td>
|
||||
<td class="mainSubText">
|
||||
<h:outputText value="#{msg.alternative_destination}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=2 class="paddingRow"></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h:outputText value="#{msg.destination}" />:
|
||||
</td>
|
||||
<td width=100%>
|
||||
<r:spaceSelector id="space-selector" label="#{msg.select_destination_prompt}"
|
||||
value="#{TrashcanBean.destination}" styleClass="selector" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td colspan=2 class="paddingRow"></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%-- Error Messages --%>
|
||||
|
169
source/web/jsp/trashcan/recovery-report.jsp
Normal file
169
source/web/jsp/trashcan/recovery-report.jsp
Normal file
@@ -0,0 +1,169 @@
|
||||
<%--
|
||||
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.
|
||||
--%>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
|
||||
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||
|
||||
<r:page titleId="title_recovery_report">
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<%-- set the form name here --%>
|
||||
<h:form acceptCharset="UTF-8" id="recovery-report">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
|
||||
<%-- Title bar --%>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<%@ include file="../parts/titlebar.jsp" %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<%-- Main area --%>
|
||||
<tr valign="top">
|
||||
<%-- Shelf --%>
|
||||
<td>
|
||||
<%@ include file="../parts/shelf.jsp" %>
|
||||
</td>
|
||||
|
||||
<%-- Work Area --%>
|
||||
<td width="100%">
|
||||
<table cellspacing="0" cellpadding="0" width="100%">
|
||||
<%-- Breadcrumb --%>
|
||||
<%@ include file="../parts/breadcrumb.jsp" %>
|
||||
|
||||
<%-- Status and Actions --%>
|
||||
<tr>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
|
||||
<td bgcolor="#EEEEEE">
|
||||
|
||||
<%-- Status and Actions inner contents table --%>
|
||||
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
|
||||
<table cellspacing="4" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td width="32">
|
||||
<h:graphicImage url="/images/icons/recover_all_large.gif"/>
|
||||
</td>
|
||||
<td>
|
||||
<div class="mainTitle"><h:outputText value="#{msg.recovery_report}" /></div>
|
||||
<div class="mainSubText"><h:outputText value="#{msg.recovery_report_info}" /></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
|
||||
</tr>
|
||||
|
||||
<%-- separator row with gradient shadow --%>
|
||||
<tr>
|
||||
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
|
||||
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
|
||||
</tr>
|
||||
|
||||
<%-- Details --%>
|
||||
<tr valign=top>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
|
||||
<td>
|
||||
<table cellspacing="0" cellpadding="4" border="0" width="100%">
|
||||
<tr>
|
||||
|
||||
<td width="100%" valign="top">
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td class="mainSubTitle">
|
||||
<h:outputText value="#{msg.recovery_report_success}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h:outputText value="#{TrashcanBean.successItemsTable}" escape="false" />
|
||||
</td>
|
||||
</tr>
|
||||
<%-- show this panel if some items failed to recover --%>
|
||||
<a:panel id="failure-panel" rendered="#{TrashcanBean.failureItemsCount != 0}">
|
||||
<tr><td class="paddingRow"></td></tr>
|
||||
<tr>
|
||||
<td class="mainSubTitle">
|
||||
<h:outputText value="#{msg.recovery_report_failed}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h:outputText value="#{TrashcanBean.failureItemsTable}" escape="false" />
|
||||
</td>
|
||||
</tr>
|
||||
</a:panel>
|
||||
<tr><td class="paddingRow"></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<%-- Error Messages --%>
|
||||
<%-- messages tag to show messages not handled by other specific message tags --%>
|
||||
<h:messages globalOnly="true" styleClass="errorMessage" layout="table" />
|
||||
<td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
|
||||
</td>
|
||||
|
||||
<td valign="top">
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
|
||||
<table cellpadding="1" cellspacing="1" border="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="dialogControls" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
|
||||
</tr>
|
||||
|
||||
<%-- separator row with bottom panel graphics --%>
|
||||
<tr>
|
||||
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
|
||||
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
|
||||
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</h:form>
|
||||
|
||||
</f:view>
|
||||
|
||||
</r:page>
|
@@ -113,9 +113,9 @@
|
||||
</td>
|
||||
|
||||
<td align=right style="white-space:nowrap">
|
||||
<%-- Current object actions --%>
|
||||
<a:actionLink value="#{msg.recover_all_items}" image="/images/icons/recover_all.gif" action="dialog:recoverAllItems"/>
|
||||
<a:actionLink value="#{msg.delete_all_items}" image="/images/icons/delete_all.gif" action="dialog:deleteAllItems"/>
|
||||
<%-- Admin only global actions --%>
|
||||
<a:actionLink value="#{msg.recover_all_items}" image="/images/icons/recover_all.gif" action="dialog:recoverAllItems" rendered="#{NavigationBean.currentUser.admin == true}" />
|
||||
<a:actionLink value="#{msg.delete_all_items}" image="/images/icons/delete_all.gif" action="dialog:deleteAllItems" rendered="#{NavigationBean.currentUser.admin == true}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user