mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
. RSS 2.0 example template
. Mimetype support fixed in TemplateContentServlet . Textbox made larger for creating/editing inline plain text content git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2017 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
42
config/alfresco/templates/RSS_2.0_recent_docs.ftl
Normal file
42
config/alfresco/templates/RSS_2.0_recent_docs.ftl
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Alfresco</title>
|
||||
<copyright>Copyright (c) 2005 Alfresco Software, Inc. All rights reserved.</copyright>
|
||||
<#assign hostname="http://localhost:8080/alfresco">
|
||||
<#assign spaceref="${hostname}/navigate/browse/${space.nodeRef.storeRef.protocol}/${space.nodeRef.storeRef.identifier}/${space.nodeRef.id}">
|
||||
<#assign datetimeformat="EEE, dd MMM yyyy hh:mm:ss zzz">
|
||||
<link>${spaceref}</link>
|
||||
<description>Recent Changes to '${space.name}'</description>
|
||||
<language>en-us</language>
|
||||
<lastBuildDate>${date?string(datetimeformat)}</lastBuildDate>
|
||||
<pubDate>${date?string(datetimeformat)}</pubDate>
|
||||
<ttl>120</ttl>
|
||||
<generator>Alfresco 1.1</generator>
|
||||
<image>
|
||||
<title>${space.name}</title>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
<link>${spaceref}</link>
|
||||
<url>${hostname}${space.icon32}</url>
|
||||
</image>
|
||||
<#assign weekms=1000*60*60*24*7>
|
||||
<#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child>
|
||||
<#if (dateCompare(child.properties["cm:modified"], date, weekms) == 1) || (dateCompare(child.properties["cm:created"], date, weekms) == 1)>
|
||||
<item>
|
||||
<title>${child.properties.name}</title>
|
||||
<link>${hostname}${child.url}</link>
|
||||
<description>
|
||||
${"<a href='${hostname}${child.url}'>"?xml}${child.properties.name}${"</a>"?xml}
|
||||
<#if child.properties["cm:description"]?exists && child.properties["cm:description"] != "">
|
||||
${child.properties["cm:description"]}
|
||||
</#if>
|
||||
</description>
|
||||
<pubDate>${child.properties["cm:modified"]?string(datetimeformat)}</pubDate>
|
||||
<guid isPermaLink="false">${hostname}${child.url}</guid>
|
||||
</item>
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
</channel>
|
||||
</rss>
|
@@ -143,6 +143,13 @@ public class TemplateContentServlet extends HttpServlet
|
||||
templateRef = new NodeRef(storeRef, t.nextToken());
|
||||
}
|
||||
|
||||
String mimetype = MIMETYPE_HTML;
|
||||
if (req.getParameter(ARG_MIMETYPE) != null)
|
||||
{
|
||||
mimetype = req.getParameter(ARG_MIMETYPE);
|
||||
}
|
||||
res.setContentType(mimetype);
|
||||
|
||||
// get the services we need to retrieve the content
|
||||
WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
|
||||
ServiceRegistry serviceRegistry = (ServiceRegistry)context.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
|
@@ -138,7 +138,7 @@
|
||||
<%-- Inline editor --%>
|
||||
<tr>
|
||||
<td width="100%" valign="top" height="100%">
|
||||
<h:inputTextarea id="textArea" rows="20" cols="80" value="#{CheckinCheckoutBean.editorOutput}" />
|
||||
<h:inputTextarea id="textArea" rows="24" cols="112" value="#{CheckinCheckoutBean.editorOutput}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@@ -111,7 +111,7 @@
|
||||
|
||||
<a:errors message="#{msg.error_wizard}" styleClass="errorMessage" />
|
||||
|
||||
<h:inputTextarea id="textArea" rows="20" cols="80" value="#{CreateContentWizard.content}" />
|
||||
<h:inputTextarea id="textArea" rows="24" cols="112" value="#{CreateContentWizard.content}" />
|
||||
|
||||
</td>
|
||||
|
||||
|
Reference in New Issue
Block a user