mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10735 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
40 lines
2.1 KiB
Plaintext
40 lines
2.1 KiB
Plaintext
[#ftl]
|
|
|
|
[#macro links cursor pageNo="pageNo" pageSize="pageSize" skipCount="skipCount" maxItems="maxItems"]
|
|
[#if cursor.pageType = "PAGE"]
|
|
[#if cursor.hasFirstPage]
|
|
<link rel="first" href="${absurl(encodeuri(scripturl(argreplace(url.args, pageNo, cursor.firstPage, pageSize, cursor.pageSize))))?xml}" type="${format.type}"/>
|
|
[/#if]
|
|
[#if cursor.hasLastPage]
|
|
<link rel="last" href="${absurl(encodeuri(scripturl(argreplace(url.args, pageNo, cursor.lastPage, pageSize, cursor.pageSize))))?xml}" type="${format.type}"/>
|
|
[/#if]
|
|
[#if cursor.hasPrevPage]
|
|
<link rel="prev" href="${absurl(encodeuri(scripturl(argreplace(url.args, pageNo, cursor.prevPage, pageSize, cursor.pageSize))))?xml}" type="${format.type}"/>
|
|
[/#if]
|
|
[#if cursor.hasNextPage]
|
|
<link rel="next" href="${absurl(encodeuri(scripturl(argreplace(url.args, pageNo, cursor.nextPage, pageSize, cursor.pageSize))))?xml}" type="${format.type}"/>
|
|
[/#if]
|
|
[#else]
|
|
[#if cursor.hasFirstPage]
|
|
<link rel="first" href="${absurl(encodeuri(scripturl(argreplace(url.args, skipCount, cursor.firstPage, maxItems, cursor.pageSize))))?xml}" type="${format.type}"/>
|
|
[/#if]
|
|
[#if cursor.hasLastPage]
|
|
<link rel="last" href="${absurl(encodeuri(scripturl(argreplace(url.args, skipCount, cursor.lastPage, maxItems, cursor.pageSize))))?xml}" type="${format.type}"/>
|
|
[/#if]
|
|
[#if cursor.hasPrevPage]
|
|
<link rel="prev" href="${absurl(encodeuri(scripturl(argreplace(url.args, skipCount, cursor.prevPage, maxItems, cursor.pageSize))))?xml}" type="${format.type}"/>
|
|
[/#if]
|
|
[#if cursor.hasNextPage]
|
|
<link rel="next" href="${absurl(encodeuri(scripturl(argreplace(url.args, skipCount, cursor.nextPage, maxItems, cursor.pageSize))))?xml}" type="${format.type}"/>
|
|
[/#if]
|
|
[/#if]
|
|
[/#macro]
|
|
|
|
[#macro opensearch cursor]
|
|
[#-- NOTE: this macro requires the definition of xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" in --]
|
|
[#-- the enclosing document --]
|
|
<opensearch:totalResults>${cursor.totalRows}</opensearch:totalResults>
|
|
<opensearch:startIndex>${cursor.startRow}</opensearch:startIndex>
|
|
<opensearch:itemsPerPage>${cursor.pageSize}</opensearch:itemsPerPage>
|
|
[/#macro]
|