mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Updated Spring Social JARs and made channels.get webscript a bit more robust.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28686 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"data":
|
||||
{
|
||||
urlLength: ${data.urlLength},
|
||||
<#if data.urlLength??>urlLength: ${data.urlLength},</#if>
|
||||
"publishChannels":
|
||||
<@publishLib.channelsJSON channels=data.publishChannels />,
|
||||
"statusUpdateChannels":
|
||||
|
@@ -1,33 +1,35 @@
|
||||
<#-- Renders a List of Channel.s -->
|
||||
<#macro channelsJSON channels>
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
[
|
||||
[
|
||||
<#if channels??>
|
||||
<#list channels as channel>
|
||||
<@channelJSON channel=channel />
|
||||
<#if channel_has_next>,</#if>
|
||||
</#list>
|
||||
]
|
||||
</#if>
|
||||
]
|
||||
</#escape>
|
||||
</#macro>
|
||||
|
||||
<#-- Renders a Channel. -->
|
||||
<#macro channelJSON channel>
|
||||
{
|
||||
{
|
||||
"url": "${channel.url}",
|
||||
"name": "${channel.name}",
|
||||
"title": "${channel.title}",
|
||||
"channelType":
|
||||
<@channelTypeJSON type=channel.channelType />
|
||||
}
|
||||
}
|
||||
</#macro>
|
||||
|
||||
<#-- Renders a Channel Type. -->
|
||||
<#macro channelTypeJSON type>
|
||||
{
|
||||
{
|
||||
"id": "${type.id}",
|
||||
"title": "${type.title}",
|
||||
"url": "${type.url}",
|
||||
"channelNodeType": "${type.channelNodeType}",
|
||||
<#if type.channelNodeType??>"channelNodeType": "${type.channelNodeType}",</#if>
|
||||
"supportedContentTypes":
|
||||
<@iterateStringsJSON strings=type.supportedContentTypes />,
|
||||
"supportedMimeTypes":
|
||||
@@ -35,17 +37,21 @@
|
||||
"canPublish": ${type.canPublish},
|
||||
"canPublishStatusUpdates": ${type.canPublishStatusUpdates},
|
||||
"canUnpublish": ${type.canUnpublish},
|
||||
"maxStatusLength": ${type.maxStatusLength},
|
||||
"icon": "${type.icon}"
|
||||
}
|
||||
<#if type.icon??>"icon": "${type.icon}",</#if>
|
||||
"maxStatusLength": ${type.maxStatusLength}
|
||||
}
|
||||
</#macro>
|
||||
|
||||
<#-- Renders a List of Strings. -->
|
||||
<#macro iterateStringsJSON strings>
|
||||
[
|
||||
<#if strings??>
|
||||
[
|
||||
<#list strings as string>
|
||||
"${string}"
|
||||
<#if string_has_next>,</#if>
|
||||
</#list>
|
||||
]
|
||||
]
|
||||
<#else>
|
||||
[]
|
||||
</#if>
|
||||
</#macro>
|
||||
|
Reference in New Issue
Block a user