diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 55a154277c..14e2fb9638 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -1609,6 +1609,7 @@ opensearch_desc=Provides ability to search across multiple OpenSearch supported search_in=Search In no_engines_registered=Failed to find any registered OpenSearch engines! current_repo=Current Alfresco Repository +current_repo_people=Current Alfresco People toggle_options=Toggle Options no_results=No results of=of diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.atom.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.atom.ftl new file mode 100644 index 0000000000..1b345a66e2 --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.atom.ftl @@ -0,0 +1,48 @@ + + + Alfresco (${server.edition}) + Alfresco Person Search: ${search.searchTerms} + ${xmldate(date)} + ${absurl(url.context)}/images/logo/AlfrescoLogo16.ico + + <#if person??>${person.properties.userName}<#else>unknown + + urn:uuid:${search.id} + ${search.totalResults} + ${search.startIndex} + ${search.itemsPerPage} + + + +<#if search.startPage > 1> + + + +<#if search.startPage < search.totalPages> + + + + +<#list search.results as row> + + ${row.properties.firstName} ${row.properties.lastName} + +<#if row.assocs["cm:avatar"]?exists> + ${absurl(url.context)}${row.assocs["cm:avatar"][0].url} +<#else> + ${absurl(url.context)}/images/icons/user_large.gif + + urn:uuid:${row.id} + ${xmldate(row.properties.modified)} + + <#if row.properties.jobtitle??>${row.properties.jobtitle}, + <#if row.properties.organization??>${row.properties.organization}, + <#if row.properties.location??>${row.properties.location}, + <#-- + <#if row.properties.persondescription??>${row.properties.persondescription.content} + --> + + ${row.score} + + + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.desc.xml new file mode 100644 index 0000000000..ad18288e88 --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.desc.xml @@ -0,0 +1,12 @@ + + Alfresco Person Search (OpenSearch Enabled) + Execute Person Search against Alfresco Repository + /api/search/person.html?q={searchTerms}&p={startPage?}&c={count?}&l={language?} + /search/person.html?q={searchTerms}&p={startPage?}&c={count?}&l={language?} + /api/search/person.atom?q={searchTerms}&p={startPage?}&c={count?}&l={language?} + /search/person.atom?q={searchTerms}&p={startPage?}&c={count?}&l={language?} + /api/search/person.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?} + /search/person.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?} + /api/search/person.portlet?q={searchTerms}&p={startPage?}&c={count?}&l={language?} + guest + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.html.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.html.ftl new file mode 100644 index 0000000000..7d4e4cb889 --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.html.ftl @@ -0,0 +1,58 @@ + + + + + Alfresco Person Search: ${search.searchTerms} + + + + + + + + + + + + +
AlfrescoAlfresco Person Search
+
+ + + + +
Results ${search.startIndex} - <#if search.startIndex == 0>0<#else>${search.startIndex + search.totalPageItems - 1} of ${search.totalResults} for ${search.searchTerms} visible to user <#if person??>${person.properties.userName}<#else>unknown.
+
+ +<#list search.results as row> + + + + + + + + +
${row.firstName} ${row.lastName}
<#if row.properties.jobtitle??>${row.properties.jobtitle}, + <#if row.properties.organization??>${row.properties.organization}, + <#if row.properties.location??>${row.properties.location}, + <#-- + <#if row.properties.persondescription??>${row.properties.persondescription.content} + --> +
+
+ + + +<#if search.startPage > 1> + + + +<#if search.startPage < search.totalPages> + + + + +
firstprevious${search.startPage}nextlast
+ + diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.portlet.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.portlet.ftl new file mode 100644 index 0000000000..d001be6293 --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.portlet.ftl @@ -0,0 +1,37 @@ + + + + +
Results ${search.startIndex} - ${search.startIndex + search.totalPageItems - 1} of ${search.totalResults} for ${search.searchTerms} visible to user <#if person??>${person.properties.userName}<#else>unknown.
+
+ +<#list search.results as row> + + + + + + + + +
${row.firstName} ${row.lastName}
<#if row.properties.jobtitle??>${row.properties.jobtitle}, + <#if row.properties.organization??>${row.properties.organization}, + <#if row.properties.location??>${row.properties.location}, + <#-- + <#if row.properties.persondescription??>${row.properties.persondescription.content} + --> +
+
+ + + +<#if search.startPage > 1> + + + +<#if search.startPage < search.totalPages> + + + + +
firstprevious${search.startPage}nextlast
\ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.query_.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.query_.ftl new file mode 100644 index 0000000000..5bec5dd035 --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.query_.ftl @@ -0,0 +1,15 @@ +( + TYPE:"{http://www.alfresco.org/model/content/1.0}person" AND + ( + ( +<#list 1..terms?size as i> + d\:content:${terms[i - 1]} <#if (i < terms?size)> OR + + ) + ( +<#list 1..terms?size as i> + d\:text:${terms[i - 1]} <#if (i < terms?size)> OR + + ) + ) +) \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.rss.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.rss.ftl new file mode 100644 index 0000000000..218f0860be --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearch.get.rss.ftl @@ -0,0 +1,47 @@ + + + + Alfresco Person Search: ${search.searchTerms} + ${absurl(scripturl("?q=${search.searchTerms?url}&p=${search.startPage}&c=${search.itemsPerPage}&l=${search.localeId}")?xml)}" + Alfresco Person Search: ${search.searchTerms} + ${search.localeId} + ${xmldate(date)} + ${xmldate(date)} + Alfresco ${server.edition} v${server.version} + + Alfresco Search: ${search.searchTerms} + 16 + 16 + ${absurl(url.context)}/images/logo/AlfrescoLogo16.ico)} + + ${search.totalResults} + ${search.startIndex} + ${search.itemsPerPage} + + +<#if search.startPage > 1> + + + +<#if search.startPage < search.totalPages> + + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearchdescription.get.desc.xml b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearchdescription.get.desc.xml new file mode 100644 index 0000000000..a94cb0b62a --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearchdescription.get.desc.xml @@ -0,0 +1,7 @@ + + Person Search Description + OpenSearch description document for Alfresco Repository person search + /api/search/person/description.xml + /search/person/description.xml + argument + \ No newline at end of file diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearchdescription.get.opensearchdescription.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearchdescription.get.opensearchdescription.ftl new file mode 100644 index 0000000000..68da921b5a --- /dev/null +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/search/personsearchdescription.get.opensearchdescription.ftl @@ -0,0 +1,11 @@ + + + Alfresco Person Search + Alfresco ${server.edition} Person Search ${server.version} + Search Alfresco People using keywords + <#comment>IE takes first template from list, thus html response is listed first + + + + ${absurl(url.context)}/images/logo/AlfrescoLogo16.ico + \ No newline at end of file diff --git a/config/alfresco/web-scripts-application-context.xml b/config/alfresco/web-scripts-application-context.xml index ce520b3df3..a36ad295f8 100644 --- a/config/alfresco/web-scripts-application-context.xml +++ b/config/alfresco/web-scripts-application-context.xml @@ -178,6 +178,13 @@ + + + + + + + diff --git a/config/alfresco/web-scripts-config.xml b/config/alfresco/web-scripts-config.xml index 6a9bad0d00..e4609929b2 100644 --- a/config/alfresco/web-scripts-config.xml +++ b/config/alfresco/web-scripts-config.xml @@ -39,6 +39,21 @@ + + + /api/search/person/description.xml + + + /api/search/person.atom?q={searchTerms}&p={startPage?}&c={count?}&l={language?}&guest={alf:guest?} + + + /api/search/person.rss?q={searchTerms}&p={startPage?}&c={count?}&l={language?}&guest={alf:guest?} + + + /api/search/person?q={searchTerms}&p={startPage?}&c={count?}&l={language?}&guest={alf:guest?} + + +