diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl index 2849bd0071..b584c5c4c1 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/documentDetails.get.html.ftl @@ -1,5 +1,7 @@ <#assign doc_actions="${url.serviceContext}/office/docActions"> <#if args.p?exists><#assign path=args.p><#else><#assign path=""> +<#if args.e?exists><#assign extn=args.e><#else><#assign extn="doc"> +<#if args.n?exists><#assign nav=args.n><#else><#assign nav=""> <#-- resolve the path (from Company Home) into a node --> <#if path?starts_with("/Company Home")> <#if path?length=13> @@ -27,11 +29,11 @@
@@ -90,11 +92,7 @@ -
Version History -<#if d.isDocument> - for ${d.name} - -
+
Version History<#if d.isDocument> for ${d.name}
@@ -102,22 +100,22 @@ <#if hasAspect(d, "cm:versionable") == 1> <#assign versionRow=0> <#list d.versionHistory?sort_by("versionLabel")?reverse as record> - <#assign versionRow=versionRow+1> + <#assign versionRow=versionRow+1> - + <#else> <#if res.isDocument> - <#if res.name?ends_with(".doc")> - <#assign webdavPath = (res.displayPath?substring(13) + '/' + res.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> + <#if res.name?ends_with(extn)> + <#assign relativePath = (res.displayPath?substring(13) + '/' + res.name)?url?replace('%2F', '/')?replace('\'', '\\\'') /> <#else> diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.html.ftl index b1a2fb2002..de0df9c2d4 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/navigation.get.html.ftl @@ -1,4 +1,6 @@ <#assign doc_actions="${url.serviceContext}/office/docActions"> +<#if args.e?exists><#assign extn=args.e><#else><#assign extn="doc"> +<#if args.n?exists><#assign nav=args.n><#else><#assign nav=""> <#if node.isDocument> <#assign thisSpace = node.parent> <#else> @@ -20,11 +22,11 @@
@@ -113,7 +115,7 @@ ${child.name} <#if child.properties.description?exists> -
${child.properties.description} +
${child.properties.description} @@ -131,18 +133,18 @@ <#list thisSpace.children?sort_by('name') as child> <#if child.isDocument> <#assign documentsFound = documentsFound + 1> - <#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> + <#assign relativePath = (child.displayPath?substring(13) + '/' + child.name)?url?replace('%2F', '/')?replace('\'', '\\\'') />
- <#if child.name?ends_with(".doc")> - Open ${child.name} + <#if child.name?ends_with(extn)> + Open ${child.name} <#else> Open ${child.name} - <#if child.name?ends_with(".doc")> - ${child.name} + <#if child.name?ends_with(extn)> + ${child.name} <#else> ${child.name} @@ -152,7 +154,7 @@ ${child.properties.description}
- Modified: ${child.properties.modified?datetime}, Size: ${(child.size / 1024)?int}Kb
+ Modified: ${child.properties.modified?datetime}, Size: ${(child.size / 1024)?int}Kb
<#if child.isLocked > Locked <#elseif hasAspect(child, "cm:workingcopy") == 1> @@ -161,8 +163,11 @@ Check Out Create Workflow... + Attach File to Current Document + <#if !child.name?ends_with(".pdf")> Make PDF... - <#if !child.isLocked > + + <#if !child.isLocked> Delete...
@@ -177,7 +182,7 @@
Actions
<#assign currentPath = thisSpace.displayPath + '/' + thisSpace.name /> -<#assign currentPath = currentPath?substring(13)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> +<#assign currentPath = currentPath?substring(13)?url?replace('%2F', '/')?replace('\'', '\\\'') />
Document filename:
@@ -198,7 +203,7 @@ <#if args.search?exists>
  • - + Back to results Back to search results diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/search.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/search.get.html.ftl index a99f4e7bc5..2897f1b888 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/search.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/search.get.html.ftl @@ -1,6 +1,8 @@ <#if args.p?exists><#assign path=args.p><#else><#assign path=""> <#if args.n?exists><#assign node=args.n><#else><#assign node=companyhome> -<#assign searchCommand="OfficeSearch.runSearch('${url.serviceContext}/office/searchResults', '${path}')" > +<#if args.e?exists><#assign extn=args.e><#else><#assign extn="doc"> +<#if args.n?exists><#assign nav=args.n><#else><#assign nav=""> +<#assign searchCommand="OfficeSearch.runSearch('${url.serviceContext}/office/searchResults', '${path}&e=${extn}')" > <#if (args.searchagain?exists)><#assign searchText=args.searchagain><#else><#assign searchText=""> <#if (args.maxresults?exists)><#assign maxResults=args.maxresults><#else><#assign maxResults="5"> @@ -19,11 +21,11 @@
      -
    • My Alfresco
    • -
    • Browse Spaces and Documents
    • -
    • Search Alfresco
    • -
    • View Details
    • -
    • My Tasks
    • +
    • My Alfresco
    • +
    • Browse Spaces and Documents
    • +
    • Search Alfresco
    • +
    • View Details
    • +
    • My Tasks
    diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl index 734a2611f0..9b090e79d9 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/searchResults.get.html.ftl @@ -1,3 +1,4 @@ +<#if args.e?exists><#assign extn=args.e><#else><#assign extn="doc"> <#if args.search?exists> <#assign searchString = args.search> <#if searchString != ""> @@ -27,16 +28,16 @@ <#list results as child> <#assign resCount=resCount + 1> <#if child.isDocument> - <#if child.name?ends_with(".doc")> - <#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> + <#if child.name?ends_with(extn)> + <#assign relativePath = (child.displayPath?substring(13) + '/' + child.name)?url?replace('%2F', '/')?replace('\'', '\\\'') /> <#assign openURL = "#"> - <#assign hrefExtra = " onClick=\"window.external.openDocument('${webdavPath}')\""> + <#assign hrefExtra = " onClick=\"window.external.openDocument('${relativePath}')\""> <#else> <#assign openURL = "${url.context}${child.url}?ticket=${session.ticket}"> <#assign hrefExtra = " target=\"_blank\""> <#else> - <#assign openURL = "${url.serviceContext}/office/navigation?p=${args.p?url}&n=${child.id}&search=${searchString?url}&maxresults=${maxresults}"> + <#assign openURL = "${url.serviceContext}/office/navigation?p=${args.p?url}&e=$(extn}&n=${child.id}&search=${searchString?url}&maxresults=${maxresults}"> <#assign hrefExtra = "">
    @@ -51,7 +52,7 @@ <#if child.isDocument> - Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
    + Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
    diff --git a/source/web/images/office/insert_document.gif b/source/web/images/office/insert_document.gif new file mode 100644 index 0000000000..6bba036529 Binary files /dev/null and b/source/web/images/office/insert_document.gif differ diff --git a/source/web/scripts/office/my_tasks.js b/source/web/scripts/office/my_tasks.js index 822118b3cd..3a40b1eee6 100644 --- a/source/web/scripts/office/my_tasks.js +++ b/source/web/scripts/office/my_tasks.js @@ -5,6 +5,8 @@ */ var OfficeMyTasks = { + fileExtn: "doc", + init: function() { OfficeAddin.sortTasks($('taskList')); @@ -102,7 +104,7 @@ var OfficeMyTasks = OfficeAddin.showStatusText("Loading task...", "ajax_anim.gif", false); // ajax call to load task details - var actionURL = window.serviceContextPath + "/office/myTasksDetail?t=" + task.id.replace(/\./, "$"); + var actionURL = window.serviceContextPath + "/office/myTasksDetail?t=" + task.id.replace(/\./, "$") + "&e=" + OfficeMyTasks.fileExtn; var myAjax = new Ajax(actionURL, { method: 'get', headers: {'If-Modified-Since': 'Sat, 1 Jan 2000 00:00:00 GMT'},
  • - Open ${record.versionLabel} + Open ${record.versionLabel} - ${record.versionLabel}
    - Author: ${record.creator}
    - Date: ${record.createdDate?datetime}
    + ${record.versionLabel}
    + Author: ${record.creator}
    + Date: ${record.createdDate?datetime}
    <#if record.description?exists> - Notes: ${record.description}
    + Notes: ${record.description}
    - Compare with current
    + Compare with current
    @@ -172,7 +170,7 @@
    Start Advanced Workflow for the current document. - <#if d.name?ends_with(".doc")> + <#if d.name?ends_with(extn)>
  • Transform to PDF diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.html.ftl index 14ac3410a3..a6f62e6d32 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myAlfresco.get.html.ftl @@ -1,6 +1,8 @@ <#assign doc_actions="${url.serviceContext}/office/docActions"> <#if args.p?exists><#assign path=args.p><#else><#assign path=""> <#if args.n?exists><#assign node=args.n><#else><#assign node=companyhome> +<#if args.e?exists><#assign extn=args.e><#else><#assign extn="doc"> +<#if args.n?exists><#assign nav=args.n><#else><#assign nav=""> <#-- resolve the path (from Company Home) into a node --> <#if path?starts_with("/Company Home")> <#if path?length=13> @@ -29,11 +31,11 @@
      -
    • My Alfresco
    • -
    • Browse Spaces and Documents
    • -
    • Search Alfresco
    • -
    • View Details
    • -
    • My Tasks
    • +
    • My Alfresco
    • +
    • Browse Spaces and Documents
    • +
    • Search Alfresco
    • +
    • View Details
    • +
    • My Tasks
    @@ -44,26 +46,27 @@ <#assign query="@cm\\:workingCopyOwner:${person.properties.userName}"> <#list companyhome.childrenByLuceneSearch[query] as child> <#if child.isDocument> - <#assign rowNum=rowNum+1> -
    + <#assign rowNum=rowNum+1> + <#assign relativePath = (child.displayPath?substring(13) + '/' + child.name)?url?replace('%2F', '/')?replace('\'', '\\\'') /> +
    ${child.name} - <#if child.name?ends_with(".doc")> - <#assign webdavPath = (child.displayPath?substring(13) + '/' + child.name)?url('ISO-8859-1')?replace('%2F', '/')?replace('\'', '\\\'') /> - ${child.name}
    + <#if child.name?ends_with(extn)> + ${child.name}
    <#else> - ${child.name}
    + ${child.name}
    <#if child.properties.description?exists> <#if (child.properties.description?length > 0)> ${child.properties.description}
    - Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
    + Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
    Check In Create Workflow... + Insert File into Current Document <#if !child.name?ends_with(".pdf")> Make PDF... diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl index 1ff84dbcba..33d24ca95b 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myTasks.get.html.ftl @@ -1,5 +1,7 @@ <#assign doc_actions="${url.serviceContext}/office/docActions"> <#if args.p?exists><#assign path=args.p><#else><#assign path=""> +<#if args.e?exists><#assign extn=args.e><#else><#assign extn="doc"> +<#if args.n?exists><#assign nav=args.n><#else><#assign nav=""> <#if docWorkflow?exists> <#assign d=docWorkflow> <#else> @@ -25,20 +27,23 @@ - - - - + + + + +
      -
    • My Alfresco
    • -
    • Browse Spaces and Documents
    • -
    • Search Alfresco
    • -
    • View Details
    • -
    • My Tasks
    • +
    • My Alfresco
    • +
    • Browse Spaces and Documents
    • +
    • Search Alfresco
    • +
    • View Details
    • +
    • My Tasks
    diff --git a/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.html.ftl index 67b2997f01..217e32e29f 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.html.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/office/myTasksDetail.get.html.ftl @@ -1,3 +1,4 @@ +<#if args.e?exists><#assign extn=args.e><#else><#assign extn="doc"> <#if args.t?exists> <#assign taskid = args.t> <#if taskid != ""> @@ -44,11 +45,11 @@ <#list task.packageResources as res>
  • ${res.name} - ${res.name} + ${res.name} ${res.name}