- <#if child.name?ends_with(".doc")>
-
+ <#if child.name?ends_with(extn)>
+
<#else>
#if>
- <#if child.name?ends_with(".doc")>
- ${child.name}
+ <#if child.name?ends_with(extn)>
+ ${child.name}
<#else>
${child.name}
#if>
@@ -152,7 +154,7 @@
${child.properties.description}
#if>
#if>
- 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 >
<#elseif hasAspect(child, "cm:workingcopy") == 1>
@@ -161,8 +163,11 @@
#if>
+
+ <#if !child.name?ends_with(".pdf")>
- <#if !child.isLocked >
+ #if>
+ <#if !child.isLocked>
#if>
@@ -177,7 +182,7 @@
<#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>
<#if args.search?exists>
-
+
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>
<#if args.n?exists><#assign node=args.n><#else><#assign node=companyhome>#if>
-<#assign searchCommand="OfficeSearch.runSearch('${url.serviceContext}/office/searchResults', '${path}')" >
+<#if args.e?exists><#assign extn=args.e><#else><#assign extn="doc">#if>
+<#if args.n?exists><#assign nav=args.n><#else><#assign nav="">#if>
+<#assign searchCommand="OfficeSearch.runSearch('${url.serviceContext}/office/searchResults', '${path}&e=${extn}')" >
<#if (args.searchagain?exists)><#assign searchText=args.searchagain><#else><#assign searchText="">#if>
<#if (args.maxresults?exists)><#assign maxResults=args.maxresults><#else><#assign maxResults="5">#if>
@@ -19,11 +21,11 @@
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>
<#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\"">
#if>
<#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 = "">
#if>
@@ -51,7 +52,7 @@
#if>
#if>
<#if child.isDocument>
- Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
+ Modified: ${child.properties.modified?datetime} (${(child.size / 1024)?int}Kb)
#if>
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'},