mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Fixes for:
http://issues.alfresco.com/browse/WCM-218 http://issues.alfresco.com/browse/WCM-237 http://issues.alfresco.com/browse/AWC-991 http://issues.alfresco.com/browse/AWC-1078 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4969 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -139,7 +139,8 @@ view_in_browser=View In Browser
|
||||
view_in_webdav=View in WebDAV
|
||||
view_in_cifs=View in CIFS
|
||||
download_content=Download Content
|
||||
details_page_bookmark=External Access URL
|
||||
details_page_bookmark=Details Page URL
|
||||
details_browse_bookmark=Browse Page URL
|
||||
noderef_link=Alfresco Node Reference
|
||||
links=Links
|
||||
create_shortcut=Create Shortcut
|
||||
|
@@ -53,7 +53,6 @@
|
||||
<!-- The path to starting point when creating/finding home folders for new users in the UI -->
|
||||
<default-home-space-path>/app:company_home/app:user_homes</default-home-space-path>
|
||||
|
||||
|
||||
<!-- The default permissions to apply to a new users Home Space when first created -->
|
||||
<!-- this permission is for other users attempting to access that Home Space -->
|
||||
<!-- generally set to "Consumer" or empty value to indicate a private hidden space. -->
|
||||
|
@@ -40,6 +40,7 @@ import org.alfresco.web.app.servlet.TemplateContentServlet;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.alfresco.web.ui.common.Utils.URLMode;
|
||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||
|
||||
/**
|
||||
@@ -112,6 +113,16 @@ public class SpaceDetailsBean extends BaseDetailsBean
|
||||
return getNode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the URL to access the browse page for the current node
|
||||
*
|
||||
* @return The bookmark URL
|
||||
*/
|
||||
public String getBrowseUrl()
|
||||
{
|
||||
return Utils.generateURL(FacesContext.getCurrentInstance(), getNode(), URLMode.BROWSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve the actual document Node from any Link object that may be proxying it
|
||||
*
|
||||
|
@@ -180,10 +180,6 @@ public class WorkspaceClipboardItem extends AbstractClipboardItem
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Attempting to copy node: " + getNodeRef() + " into node ID: " + destRef.toString());
|
||||
|
||||
if (dd.isSubClass(getType(), ContentModel.TYPE_CONTENT) ||
|
||||
dd.isSubClass(getType(), ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
// copy the file/folder
|
||||
// first check that we are not attempting to copy a duplicate into the same parent
|
||||
if (destRef.equals(assocRef.getParentRef()) && name.equals(getName()))
|
||||
{
|
||||
@@ -191,6 +187,11 @@ public class WorkspaceClipboardItem extends AbstractClipboardItem
|
||||
String copyOf = Application.getMessage(fc, MSG_COPY_OF);
|
||||
name = copyOf + ' ' + name;
|
||||
}
|
||||
|
||||
if (dd.isSubClass(getType(), ContentModel.TYPE_CONTENT) ||
|
||||
dd.isSubClass(getType(), ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
// copy the file/folder
|
||||
fileFolderService.copy(
|
||||
getNodeRef(),
|
||||
destRef,
|
||||
@@ -201,7 +202,7 @@ public class WorkspaceClipboardItem extends AbstractClipboardItem
|
||||
// copy the node
|
||||
if (checkExists(name, destRef) == false)
|
||||
{
|
||||
copyService.copy(
|
||||
copyService.copyAndRename(
|
||||
getNodeRef(),
|
||||
destRef,
|
||||
ContentModel.ASSOC_CONTAINS,
|
||||
|
@@ -535,7 +535,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
}
|
||||
|
||||
/**
|
||||
* @return List of UI items to represent the available Workflows for all websites
|
||||
* @return List of UI items to represent the available Web Forms for all websites
|
||||
*/
|
||||
public List<UIListItem> getFormsList()
|
||||
{
|
||||
|
@@ -43,6 +43,8 @@ import org.alfresco.web.app.servlet.DownloadContentServlet;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.repository.User;
|
||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
||||
import org.alfresco.web.data.IDataContainer;
|
||||
import org.alfresco.web.data.QuickSort;
|
||||
import org.alfresco.web.forms.*;
|
||||
import org.alfresco.web.forms.xforms.XFormsProcessor;
|
||||
import org.apache.commons.logging.Log;
|
||||
@@ -220,7 +222,10 @@ public class WebProject
|
||||
*/
|
||||
public List<Form> getForms()
|
||||
{
|
||||
return Collections.unmodifiableList(new ArrayList(this.getFormsImpl().values()));
|
||||
List forms = new ArrayList(this.getFormsImpl().values());
|
||||
QuickSort sorter = new QuickSort(forms, "name", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||
sorter.sort();
|
||||
return Collections.unmodifiableList(forms);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package org.alfresco.web.forms;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
@@ -50,6 +51,8 @@ import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
||||
import org.alfresco.web.data.IDataContainer;
|
||||
import org.alfresco.web.data.QuickSort;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.w3c.dom.Document;
|
||||
@@ -64,7 +67,6 @@ import org.xml.sax.SAXException;
|
||||
public final class FormsService
|
||||
implements Serializable
|
||||
{
|
||||
|
||||
private static final Log LOGGER = LogFactory.getLog(FormsService.class);
|
||||
|
||||
/** the single instance initialized using spring */
|
||||
@@ -155,6 +157,7 @@ public final class FormsService
|
||||
final String xpath = (Application.getRootPath(fc) + "/" +
|
||||
Application.getGlossaryFolderName(fc) + "/" +
|
||||
Application.getContentFormsFolderName(fc));
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("locating content forms at " + xpath);
|
||||
final List<NodeRef> results =
|
||||
searchService.selectNodes(this.nodeService.getRootNode(Repository.getStoreRef()),
|
||||
@@ -183,12 +186,14 @@ public final class FormsService
|
||||
final ResultSet rs = this.searchService.query(sp);
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("received " + rs.length() + " results");
|
||||
final Collection<Form> result = new LinkedList<Form>();
|
||||
final Collection<Form> result = new ArrayList<Form>(rs.length());
|
||||
for (ResultSetRow row : rs)
|
||||
{
|
||||
final NodeRef nodeRef = row.getNodeRef();
|
||||
result.add(this.getForm(nodeRef));
|
||||
result.add(this.getForm(row.getNodeRef()));
|
||||
}
|
||||
QuickSort sorter = new QuickSort((List)result, "name", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||
sorter.sort();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -554,7 +554,7 @@ public final class Utils
|
||||
/**
|
||||
* Enum representing the client URL type to generate
|
||||
*/
|
||||
public enum URLMode {HTTP_DOWNLOAD, HTTP_INLINE, WEBDAV, CIFS, SHOW_DETAILS, FTP}
|
||||
public enum URLMode {HTTP_DOWNLOAD, HTTP_INLINE, WEBDAV, CIFS, SHOW_DETAILS, BROWSE, FTP}
|
||||
|
||||
/**
|
||||
* Generates a URL for the given usage for the given node.
|
||||
@@ -665,12 +665,12 @@ public final class Utils
|
||||
DictionaryService dd = Repository.getServiceRegistry(context).getDictionaryService();
|
||||
|
||||
// default to showing details of content
|
||||
String outcome = "showDocDetails";
|
||||
String outcome = ExternalAccessServlet.OUTCOME_DOCDETAILS;
|
||||
|
||||
// if the node is a type of folder then make the outcome to show space details
|
||||
if (dd.isSubClass(node.getType(), ContentModel.TYPE_FOLDER))
|
||||
{
|
||||
outcome = "showSpaceDetails";
|
||||
outcome = ExternalAccessServlet.OUTCOME_SPACEDETAILS;
|
||||
}
|
||||
|
||||
// build the url
|
||||
@@ -680,6 +680,13 @@ public final class Utils
|
||||
break;
|
||||
}
|
||||
|
||||
case BROWSE:
|
||||
{
|
||||
url = ExternalAccessServlet.generateExternalURL(ExternalAccessServlet.OUTCOME_BROWSE,
|
||||
Repository.getStoreRef().getProtocol() + "/" +
|
||||
Repository.getStoreRef().getIdentifier() + "/" + node.getId());
|
||||
}
|
||||
|
||||
case FTP:
|
||||
{
|
||||
// not implemented yet!
|
||||
|
@@ -150,12 +150,17 @@
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||
</td>
|
||||
<td>
|
||||
<td colspan=2>
|
||||
<a:actionLink value="#{msg.view_in_cifs}" href="#{SpaceDetailsBean.cifsPath}" target="new" id="link2" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.browseUrl}" id="out1_1" />' onclick="return false;"><a:outputText value="#{msg.details_browse_bookmark}" id="out2_2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
|
Reference in New Issue
Block a user