mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged V3.4-BUG-FIX to HEAD
31640: Fix for ALF-9922 - Performance issue of Wiki-Dashlet page. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31686 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,22 +1,30 @@
|
||||
<#macro dateFormat date>${xmldate(date)}</#macro>
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
{
|
||||
"totalPages" : ${wiki.pages?size?c},
|
||||
"totalPages": ${wiki.pages?size?c},
|
||||
"permissions":
|
||||
{
|
||||
"create": ${wiki.container.hasPermission("CreateChildren")?string}
|
||||
},
|
||||
"pages":
|
||||
[
|
||||
<#if pageMetaOnly>
|
||||
<#list wiki.pages as p>
|
||||
<#assign page = p.page>
|
||||
{
|
||||
"name": "${p.name}",
|
||||
"title": "<#if p.title?has_content>${p.title}<#else>${p.name?replace("_", " ")}</#if>",
|
||||
}<#if p_has_next>,</#if>
|
||||
</#list>
|
||||
<#else>
|
||||
<#list wiki.pages?sort_by(['modified'])?reverse as p>
|
||||
<#assign node = p.node>
|
||||
<#assign page = p.page>
|
||||
{
|
||||
"name" : "${p.name}",
|
||||
"title" : "<#if p.title?has_content>${p.title}<#else>${p.name?replace("_", " ")}</#if>",
|
||||
<#-- Strip out any HTML tags -->
|
||||
"text" : "${page.contents}",
|
||||
"tags" : [
|
||||
"name": "${p.name}",
|
||||
"title": "<#if p.title?has_content>${p.title}<#else>${p.name?replace("_", " ")}</#if>",
|
||||
"text": "${page.contents}",
|
||||
"tags": [
|
||||
<#list p.tags as tag>
|
||||
"${tag}"<#if tag_has_next>,</#if>
|
||||
</#list>
|
||||
@@ -48,6 +56,7 @@
|
||||
}
|
||||
}<#if p_has_next>,</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
]
|
||||
}
|
||||
</#escape>
|
||||
|
@@ -64,6 +64,8 @@ public class WikiPageListGet extends AbstractWikiWebScript
|
||||
{
|
||||
// Decide on what kind of request they wanted
|
||||
String filter = req.getParameter("filter");
|
||||
String strPageMetaOnly = req.getParameter("pageMetaOnly");
|
||||
boolean pageMetaOnly = strPageMetaOnly != null ? Boolean.parseBoolean(strPageMetaOnly) : false;
|
||||
|
||||
// User?
|
||||
boolean userFiltering = false;
|
||||
@@ -178,6 +180,7 @@ public class WikiPageListGet extends AbstractWikiWebScript
|
||||
model.put("siteId", site.getShortName());
|
||||
model.put("site", site);
|
||||
model.put(TemplateService.KEY_SHARE_URL, UrlUtil.getShareUrl(sysAdminParams));
|
||||
model.put("pageMetaOnly", pageMetaOnly);
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user