mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.0 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5104 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5105 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5107 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V2.0@5108 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5114 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -924,6 +924,7 @@ sandbox_icon=Browse Website
|
||||
sandbox_snapshot=Create Snapshot
|
||||
sandbox_snapshot_info=Create a snaphost of this sandbox.
|
||||
sandbox_remove=Delete Sandbox
|
||||
sandbox_refresh=Refresh
|
||||
import_website_content=Bulk Import
|
||||
title_browse_sandbox=Browse Sandbox
|
||||
sandbox_info=Use this view to browse the files and folders within the sandbox for a web project.
|
||||
|
@@ -862,6 +862,25 @@ public class AVMBrowseBean implements IContextListener
|
||||
this.allItemsAction = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh Sandbox in the virtualisation server
|
||||
*/
|
||||
public void refreshSandbox(ActionEvent event)
|
||||
{
|
||||
UIActionLink link = (UIActionLink)event.getComponent();
|
||||
Map<String, String> params = link.getParameterMap();
|
||||
String store = params.get("store");
|
||||
|
||||
if (store == null)
|
||||
{
|
||||
store = getStagingStore();
|
||||
}
|
||||
|
||||
// update the specified webapp in the store
|
||||
String webappPath = AVMConstants.buildStoreWebappPath(store, getWebapp());
|
||||
AVMConstants.updateVServerWebapp(webappPath, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Undo changes to a single node
|
||||
*/
|
||||
|
@@ -35,6 +35,7 @@ import javax.faces.event.FacesEvent;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.DownloadContentServlet;
|
||||
import org.alfresco.web.bean.clipboard.ClipboardItem;
|
||||
@@ -154,6 +155,7 @@ public class UIClipboardShelfItem extends UIShelfItem
|
||||
if (items.size() != 0)
|
||||
{
|
||||
DictionaryService dd = Repository.getServiceRegistry(context).getDictionaryService();
|
||||
NodeService nodeService = Repository.getServiceRegistry(context).getNodeService();
|
||||
|
||||
ResourceBundle bundle = Application.getBundle(context);
|
||||
|
||||
@@ -161,6 +163,14 @@ public class UIClipboardShelfItem extends UIShelfItem
|
||||
{
|
||||
ClipboardItem item = items.get(i);
|
||||
|
||||
// check that the item has not been deleted since added to the clipboard
|
||||
if (nodeService.exists(item.getNodeRef()) == false)
|
||||
{
|
||||
// remove from clipboard
|
||||
items.remove(i--);
|
||||
continue;
|
||||
}
|
||||
|
||||
// start row with cut/copy state icon
|
||||
out.write("<tr><td width=16>");
|
||||
if (item.getMode() == ClipboardStatus.COPY)
|
||||
|
@@ -99,6 +99,7 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
private static final String ACT_SANDBOX_PREVIEW = "sandbox_preview";
|
||||
private static final String ACT_SANDBOX_ICON = "sandbox_icon";
|
||||
private static final String ACT_REMOVE_SANDBOX = "sandbox_remove";
|
||||
private static final String ACT_SANDBOX_REFRESH = "sandbox_refresh";
|
||||
|
||||
private static final String ACTIONS_FILE = "avm_file_modified";
|
||||
private static final String ACTIONS_FOLDER = "avm_folder_modified";
|
||||
@@ -362,12 +363,14 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
out.write(bundle.getString(userrole));
|
||||
out.write(")</td><td><nobr>");
|
||||
|
||||
// direct actions for a sandbox
|
||||
// Direct actions for a sandbox...
|
||||
// Browse Sandbox
|
||||
Utils.encodeRecursive(context, aquireAction(
|
||||
context, mainStore, username, ACT_SANDBOX_BROWSE, "/images/icons/space_small.gif",
|
||||
"#{AVMBrowseBean.setupSandboxAction}", "browseSandbox"));
|
||||
out.write(" ");
|
||||
|
||||
// Preview Website
|
||||
String websiteUrl = AVMConstants.buildWebappUrl(mainStore, getWebapp());
|
||||
Map requestMap = context.getExternalContext().getRequestMap();
|
||||
requestMap.put(REQUEST_PREVIEW_REF, websiteUrl);
|
||||
@@ -375,18 +378,28 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
context, mainStore, username, ACT_SANDBOX_PREVIEW, "/images/icons/preview_website.gif",
|
||||
null, null, "#{" + REQUEST_PREVIEW_REF + "}", null));
|
||||
requestMap.remove(REQUEST_PREVIEW_REF);
|
||||
out.write(" ");
|
||||
|
||||
Utils.encodeRecursive(context, aquireAction(
|
||||
context, mainStore, username, ACT_SANDBOX_SUBMITALL, "/images/icons/submit_all.gif",
|
||||
"#{AVMBrowseBean.setupAllItemsAction}", "dialog:submitSandboxItems"));
|
||||
out.write(" ");
|
||||
|
||||
// Refresh Sandbox
|
||||
Utils.encodeRecursive(context, aquireAction(
|
||||
context, mainStore, username, ACT_SANDBOX_REFRESH, "/images/icons/reset.gif",
|
||||
"#{AVMBrowseBean.refreshSandbox}", null));
|
||||
out.write(" ");
|
||||
|
||||
// Submit All Items
|
||||
// NOTE: removed for 2.0 final
|
||||
/*Utils.encodeRecursive(context, aquireAction(
|
||||
context, mainStore, username, ACT_SANDBOX_SUBMITALL, "/images/icons/submit_all.gif",
|
||||
"#{AVMBrowseBean.setupAllItemsAction}", "dialog:submitSandboxItems"));
|
||||
out.write(" ");*/
|
||||
|
||||
// Revert All Items
|
||||
Utils.encodeRecursive(context, aquireAction(
|
||||
context, mainStore, username, ACT_SANDBOX_REVERTALL, "/images/icons/revert_all.gif",
|
||||
"#{AVMBrowseBean.setupAllItemsAction}", "dialog:revertAllItems"));
|
||||
out.write(" ");
|
||||
|
||||
// Delete Sandbox
|
||||
if (AVMConstants.ROLE_CONTENT_MANAGER.equals(currentUserRole))
|
||||
{
|
||||
Utils.encodeRecursive(context, aquireAction(
|
||||
@@ -589,6 +602,24 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
// TODO: apply tag style - removed hardcoded
|
||||
out.write("<table class='modifiedItemsList' cellspacing=2 cellpadding=1 border=0 width=100%>");
|
||||
|
||||
// output multi-select actions for this user
|
||||
out.write("<tr><td colspan=8>");
|
||||
out.write(bundle.getString(MSG_SELECTED));
|
||||
out.write(": ");
|
||||
NodeRef userStoreRef = AVMNodeConverter.ToNodeRef(-1, AVMConstants.buildSandboxRootPath(userStore));
|
||||
if (permissionService.hasPermission(userStoreRef, PermissionService.WRITE) == AccessStatus.ALLOWED ||
|
||||
permissionService.hasPermission(userStoreRef, PermissionService.ADD_CHILDREN) == AccessStatus.ALLOWED)
|
||||
{
|
||||
Utils.encodeRecursive(fc, aquireAction(
|
||||
fc, userStore, username, ACT_SANDBOX_SUBMITSELECTED, "/images/icons/submit_all.gif",
|
||||
"#{AVMBrowseBean.setupSandboxAction}", "dialog:submitSandboxItems"));
|
||||
out.write(" ");
|
||||
Utils.encodeRecursive(fc, aquireAction(
|
||||
fc, userStore, username, ACT_SANDBOX_REVERTSELECTED, "/images/icons/revert_all.gif",
|
||||
"#{AVMBrowseBean.setupSandboxAction}", "dialog:revertSelectedItems"));
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
|
||||
// header row
|
||||
out.write("<tr align=left><th>");
|
||||
// multi-select checkbox
|
||||
@@ -745,24 +776,6 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
out.write("</td></tr>");
|
||||
}
|
||||
|
||||
// output multi-select actions for this user
|
||||
out.write("<tr><td colspan=8>");
|
||||
out.write(bundle.getString(MSG_SELECTED));
|
||||
out.write(": ");
|
||||
NodeRef userStoreRef = AVMNodeConverter.ToNodeRef(-1, AVMConstants.buildSandboxRootPath(userStore));
|
||||
if (permissionService.hasPermission(userStoreRef, PermissionService.WRITE) == AccessStatus.ALLOWED ||
|
||||
permissionService.hasPermission(userStoreRef, PermissionService.ADD_CHILDREN) == AccessStatus.ALLOWED)
|
||||
{
|
||||
Utils.encodeRecursive(fc, aquireAction(
|
||||
fc, userStore, username, ACT_SANDBOX_SUBMITSELECTED, "/images/icons/submit_all.gif",
|
||||
"#{AVMBrowseBean.setupSandboxAction}", "dialog:submitSandboxItems"));
|
||||
out.write(" ");
|
||||
Utils.encodeRecursive(fc, aquireAction(
|
||||
fc, userStore, username, ACT_SANDBOX_REVERTSELECTED, "/images/icons/revert_all.gif",
|
||||
"#{AVMBrowseBean.setupSandboxAction}", "dialog:revertSelectedItems"));
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
|
||||
// end table
|
||||
out.write("</table>");
|
||||
}
|
||||
|
@@ -130,8 +130,10 @@
|
||||
<td align=left><h:outputText value="#{msg.staging_sandbox}" styleClass="mainSubTitle" /></td>
|
||||
<td align=right>
|
||||
<a:actionLink id="actBrowse" value="#{msg.sandbox_browse}" image="/images/icons/space_small.gif" actionListener="#{AVMBrowseBean.setupSandboxAction}" action="browseSandbox" />
|
||||
|
||||
|
||||
<a:actionLink id="actPreview" value="#{msg.sandbox_preview}" image="/images/icons/preview_website.gif" href="#{AVMBrowseBean.stagingPreviewUrl}" target="new" />
|
||||
|
||||
<a:actionLink id="actRefresh" rendered="#{AVMBrowseBean.isManagerRole}" value="#{msg.sandbox_refresh}" image="/images/icons/reset.gif" actionListener="#{AVMBrowseBean.refreshSandbox}" />
|
||||
<%-- Disabled action for GA
|
||||
<a:actionLink id="actSnap" value="#{msg.sandbox_snapshot}" image="/images/icons/create_snapshot.gif" actionListener="#{AVMBrowseBean.setupSandboxAction}" action="dialog:snapshotSandbox" />
|
||||
--%>
|
||||
|
Reference in New Issue
Block a user