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_webdav=View in WebDAV
|
||||||
view_in_cifs=View in CIFS
|
view_in_cifs=View in CIFS
|
||||||
download_content=Download Content
|
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
|
noderef_link=Alfresco Node Reference
|
||||||
links=Links
|
links=Links
|
||||||
create_shortcut=Create Shortcut
|
create_shortcut=Create Shortcut
|
||||||
|
@@ -50,10 +50,9 @@
|
|||||||
<!-- Limit search results within selectors, -1 for unlimited. -->
|
<!-- Limit search results within selectors, -1 for unlimited. -->
|
||||||
<selectors-search-max-results>500</selectors-search-max-results>
|
<selectors-search-max-results>500</selectors-search-max-results>
|
||||||
|
|
||||||
<!-- The path to starting point when creating/finding home folders for new users in the UI -->
|
<!-- 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>
|
<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 -->
|
<!-- 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 -->
|
<!-- 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. -->
|
<!-- 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.Node;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
import org.alfresco.web.ui.common.Utils;
|
import org.alfresco.web.ui.common.Utils;
|
||||||
|
import org.alfresco.web.ui.common.Utils.URLMode;
|
||||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,6 +113,16 @@ public class SpaceDetailsBean extends BaseDetailsBean
|
|||||||
return getNode();
|
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
|
* Resolve the actual document Node from any Link object that may be proxying it
|
||||||
*
|
*
|
||||||
|
@@ -180,17 +180,18 @@ public class WorkspaceClipboardItem extends AbstractClipboardItem
|
|||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
logger.debug("Attempting to copy node: " + getNodeRef() + " into node ID: " + destRef.toString());
|
logger.debug("Attempting to copy node: " + getNodeRef() + " into node ID: " + destRef.toString());
|
||||||
|
|
||||||
|
// first check that we are not attempting to copy a duplicate into the same parent
|
||||||
|
if (destRef.equals(assocRef.getParentRef()) && name.equals(getName()))
|
||||||
|
{
|
||||||
|
// manually change the name if this occurs
|
||||||
|
String copyOf = Application.getMessage(fc, MSG_COPY_OF);
|
||||||
|
name = copyOf + ' ' + name;
|
||||||
|
}
|
||||||
|
|
||||||
if (dd.isSubClass(getType(), ContentModel.TYPE_CONTENT) ||
|
if (dd.isSubClass(getType(), ContentModel.TYPE_CONTENT) ||
|
||||||
dd.isSubClass(getType(), ContentModel.TYPE_FOLDER))
|
dd.isSubClass(getType(), ContentModel.TYPE_FOLDER))
|
||||||
{
|
{
|
||||||
// copy the file/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()))
|
|
||||||
{
|
|
||||||
// manually change the name if this occurs
|
|
||||||
String copyOf = Application.getMessage(fc, MSG_COPY_OF);
|
|
||||||
name = copyOf + ' ' + name;
|
|
||||||
}
|
|
||||||
fileFolderService.copy(
|
fileFolderService.copy(
|
||||||
getNodeRef(),
|
getNodeRef(),
|
||||||
destRef,
|
destRef,
|
||||||
@@ -201,7 +202,7 @@ public class WorkspaceClipboardItem extends AbstractClipboardItem
|
|||||||
// copy the node
|
// copy the node
|
||||||
if (checkExists(name, destRef) == false)
|
if (checkExists(name, destRef) == false)
|
||||||
{
|
{
|
||||||
copyService.copy(
|
copyService.copyAndRename(
|
||||||
getNodeRef(),
|
getNodeRef(),
|
||||||
destRef,
|
destRef,
|
||||||
ContentModel.ASSOC_CONTAINS,
|
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()
|
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.Repository;
|
||||||
import org.alfresco.web.bean.repository.User;
|
import org.alfresco.web.bean.repository.User;
|
||||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
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.*;
|
||||||
import org.alfresco.web.forms.xforms.XFormsProcessor;
|
import org.alfresco.web.forms.xforms.XFormsProcessor;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
@@ -220,7 +222,10 @@ public class WebProject
|
|||||||
*/
|
*/
|
||||||
public List<Form> getForms()
|
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;
|
package org.alfresco.web.forms;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
@@ -50,6 +51,8 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.web.app.Application;
|
import org.alfresco.web.app.Application;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
import org.alfresco.web.bean.wcm.AVMConstants;
|
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.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
@@ -64,7 +67,6 @@ import org.xml.sax.SAXException;
|
|||||||
public final class FormsService
|
public final class FormsService
|
||||||
implements Serializable
|
implements Serializable
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final Log LOGGER = LogFactory.getLog(FormsService.class);
|
private static final Log LOGGER = LogFactory.getLog(FormsService.class);
|
||||||
|
|
||||||
/** the single instance initialized using spring */
|
/** the single instance initialized using spring */
|
||||||
@@ -155,7 +157,8 @@ public final class FormsService
|
|||||||
final String xpath = (Application.getRootPath(fc) + "/" +
|
final String xpath = (Application.getRootPath(fc) + "/" +
|
||||||
Application.getGlossaryFolderName(fc) + "/" +
|
Application.getGlossaryFolderName(fc) + "/" +
|
||||||
Application.getContentFormsFolderName(fc));
|
Application.getContentFormsFolderName(fc));
|
||||||
LOGGER.debug("locating content forms at " + xpath);
|
if (LOGGER.isDebugEnabled())
|
||||||
|
LOGGER.debug("locating content forms at " + xpath);
|
||||||
final List<NodeRef> results =
|
final List<NodeRef> results =
|
||||||
searchService.selectNodes(this.nodeService.getRootNode(Repository.getStoreRef()),
|
searchService.selectNodes(this.nodeService.getRootNode(Repository.getStoreRef()),
|
||||||
xpath,
|
xpath,
|
||||||
@@ -183,12 +186,14 @@ public final class FormsService
|
|||||||
final ResultSet rs = this.searchService.query(sp);
|
final ResultSet rs = this.searchService.query(sp);
|
||||||
if (LOGGER.isDebugEnabled())
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("received " + rs.length() + " results");
|
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)
|
for (ResultSetRow row : rs)
|
||||||
{
|
{
|
||||||
final NodeRef nodeRef = row.getNodeRef();
|
result.add(this.getForm(row.getNodeRef()));
|
||||||
result.add(this.getForm(nodeRef));
|
|
||||||
}
|
}
|
||||||
|
QuickSort sorter = new QuickSort((List)result, "name", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||||
|
sorter.sort();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -554,7 +554,7 @@ public final class Utils
|
|||||||
/**
|
/**
|
||||||
* Enum representing the client URL type to generate
|
* 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.
|
* 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();
|
DictionaryService dd = Repository.getServiceRegistry(context).getDictionaryService();
|
||||||
|
|
||||||
// default to showing details of content
|
// 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 the node is a type of folder then make the outcome to show space details
|
||||||
if (dd.isSubClass(node.getType(), ContentModel.TYPE_FOLDER))
|
if (dd.isSubClass(node.getType(), ContentModel.TYPE_FOLDER))
|
||||||
{
|
{
|
||||||
outcome = "showSpaceDetails";
|
outcome = ExternalAccessServlet.OUTCOME_SPACEDETAILS;
|
||||||
}
|
}
|
||||||
|
|
||||||
// build the url
|
// build the url
|
||||||
@@ -680,6 +680,13 @@ public final class Utils
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case BROWSE:
|
||||||
|
{
|
||||||
|
url = ExternalAccessServlet.generateExternalURL(ExternalAccessServlet.OUTCOME_BROWSE,
|
||||||
|
Repository.getStoreRef().getProtocol() + "/" +
|
||||||
|
Repository.getStoreRef().getIdentifier() + "/" + node.getId());
|
||||||
|
}
|
||||||
|
|
||||||
case FTP:
|
case FTP:
|
||||||
{
|
{
|
||||||
// not implemented yet!
|
// not implemented yet!
|
||||||
|
@@ -150,12 +150,17 @@
|
|||||||
<td>
|
<td>
|
||||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td colspan=2>
|
||||||
<a:actionLink value="#{msg.view_in_cifs}" href="#{SpaceDetailsBean.cifsPath}" target="new" id="link2" />
|
<a:actionLink value="#{msg.view_in_cifs}" href="#{SpaceDetailsBean.cifsPath}" target="new" id="link2" />
|
||||||
</td>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
<td>
|
<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>
|
<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>
|
||||||
|
<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>
|
<td>
|
||||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||||
</td>
|
</td>
|
||||||
|
Reference in New Issue
Block a user