[jboss-cvs] JBossBlog SVN: r291 - in trunk: src/action/org/jboss/blog/session/xml/velocity and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 24 08:17:15 EDT 2008
Author: adamw
Date: 2008-04-24 08:17:15 -0400 (Thu, 24 Apr 2008)
New Revision: 291
Modified:
trunk/resources/templates/atom_standard.vm
trunk/src/action/org/jboss/blog/session/xml/velocity/VelocityXmlService.java
trunk/view/common/post.xhtml
trunk/view/manage/feed_mod.xhtml
trunk/view/manage/template/template_mod.xhtml
Log:
Modified: trunk/resources/templates/atom_standard.vm
===================================================================
--- trunk/resources/templates/atom_standard.vm 2008-04-24 11:27:42 UTC (rev 290)
+++ trunk/resources/templates/atom_standard.vm 2008-04-24 12:17:15 UTC (rev 291)
@@ -1,38 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
- <id>$tools.feedLink($feed, $xmlType)</id>
- <title type="html"><![CDATA[$feed.title]]></title>
- <updated>$tools.formatDate($tools.feedPubDate($feed, $posts))</updated>
- <author>
- <name>$feed.author</name>
- </author>
- <link rel="alternate" type="text/html" href="$tools.feedPageLink($feed)"/>
- <link rel="self" type="application/atom+xml" href="$tools.feedLink($feed, $xmlType)"/>
+<id>$tools.feedLink($feed, $xmlType)</id>
+<title type="html"><![CDATA[$feed.title]]></title>
+<updated>$tools.formatDate($tools.feedPubDate($feed, $posts))</updated>
+<author>
+ <name>$feed.author</name>
+</author>
+<link rel="alternate" type="text/html" href="$tools.feedPageLink($feed)"/>
+<link rel="self" type="application/atom+xml" href="$tools.feedLink($feed, $xmlType)"/>
- #foreach($post in $posts)
- <entry>
- <id>$tools.postLink($post)</id>
- <title type="html"><![CDATA[$post.title]]></title>
- <link rel="alternate" type="text/html" href="$tools.postLink($post)"/>
+#foreach($post in $posts)
+<entry>
+ <id>$tools.postLink($post)</id>
+ <title type="html"><![CDATA[$post.title]]></title>
+ <link rel="alternate" type="text/html" href="$tools.postLink($post)"/>
- <updated>$tools.formatDate($post.modified)</updated>
- <published>$tools.formatDate($post.published)</published>
+ <updated>$tools.formatDate($post.modified)</updated>
+ <published>$tools.formatDate($post.published)</published>
- <content type="html" xml:lang="en">
- <![CDATA[$post.content]]>
- </content>
+ <content type="html" xml:lang="en">
+ <![CDATA[$post.content
- <author>
- <name>$post.effectiveAuthor</name>
- </author>
+ #if($feed.showDelicious or $feed.showDzone or $feed.showDigg)
+ <p>
+ #if($feed.showDzone)
+ <a href="http://www.dzone.com/links/add.html?url=$postToTools.encodeLinkForDelicious($post)&title=$postToTools.encodeTitleForDelicious($post)">
+ Post to DZone</a>  
+ #end
+ #if($feed.showDelicious)
+ <a href="http://del.icio.us/post?v=4&url=$postToTools.encodeLinkForDelicious($post)&title=$postToTools.encodeTitleForDelicious($post)">
+ Post to del.icio.us</a>  
+ #end
+ #if($feed.showDigg)
+ <a href="http://digg.com/submit?url=$postToTools.encodeLinkForDigg($post)&title=$postToTools.encodeTitleForDigg($post)&bodytext=$postToTools.encodeBodyForDigg($post)&media=news&topic=programming">
+ Digg this!</a>  
+ #end
+ </p>
+ #end
+ ]]>
+ </content>
- #foreach($enclosure in $post.enclosures)
- <link href="$enclosure.url" rel="enclosure" length="$enclosure.length" type="$enclosure.type" />
- #end
+ <author>
+ <name>$post.effectiveAuthor</name>
+ </author>
- #foreach($image in $post.images)
- <itunes:image href="$image.url" />
- #end
- </entry>
- #end
+ #foreach($enclosure in $post.enclosures)
+ <link href="$enclosure.url" rel="enclosure" length="$enclosure.length" type="$enclosure.type" />
+ #end
+
+ #foreach($image in $post.images)
+ <itunes:image href="$image.url" />
+ #end
+</entry>
+#end
</feed>
Modified: trunk/src/action/org/jboss/blog/session/xml/velocity/VelocityXmlService.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/xml/velocity/VelocityXmlService.java 2008-04-24 11:27:42 UTC (rev 290)
+++ trunk/src/action/org/jboss/blog/session/xml/velocity/VelocityXmlService.java 2008-04-24 12:17:15 UTC (rev 291)
@@ -14,6 +14,7 @@
import org.jboss.blog.session.xml.velocity.tools.AtomXmlTools;
import org.jboss.blog.session.xml.velocity.tools.Rss2XmlTools;
import org.jboss.blog.session.cache.CacheManager;
+import org.jboss.blog.session.tools.PostToToolsBean;
import org.jboss.blog.tools.GeneralTools;
import org.jboss.seam.annotations.*;
import org.jboss.seam.log.Log;
@@ -40,6 +41,9 @@
@In
private CacheManager cacheManager;
+ @In
+ private PostToToolsBean postToTools;
+
@Logger
private Log log;
@@ -95,6 +99,7 @@
context.put("feed", feed);
context.put("tools", xmlTools.get(xmlType));
context.put("xmlType", xmlType);
+ context.put("postToTools", postToTools);
Template template = engine.getTemplate(feed.getTemplates().get(xmlType).getName());
template.merge(context, inCache.getWriter());
Modified: trunk/view/common/post.xhtml
===================================================================
--- trunk/view/common/post.xhtml 2008-04-24 11:27:42 UTC (rev 290)
+++ trunk/view/common/post.xhtml 2008-04-24 12:17:15 UTC (rev 291)
@@ -39,20 +39,17 @@
<s:fragment rendered="#{showPostTo and post.feed.showDzone}">
<img src="http://www.dzone.com/links/themes/reader/images/actions/icon-vote.gif" alt="" />
<a href="http://www.dzone.com/links/add.html?url=#{postToTools.encodeLinkForDelicious(post)}&title=#{postToTools.encodeTitleForDelicious(post)}">
- Post to DZone
- </a>  
+ Post to DZone</a>  
</s:fragment>
<s:fragment rendered="#{showPostTo and post.feed.showDelicious}">
<img src="http://images.del.icio.us/static/img/delicious.small.gif" alt="" />
<a href="http://del.icio.us/post?v=4&url=#{postToTools.encodeLinkForDelicious(post)}&title=#{postToTools.encodeTitleForDelicious(post)}">
- Post to del.icio.us
- </a>  
+ Post to del.icio.us</a>  
</s:fragment>
<s:fragment rendered="#{showPostTo and post.feed.showDigg}">
<img src="http://digg.com/img/badges/10x10-digg-thumb.png" alt="" />
<a href="http://digg.com/submit?url=#{postToTools.encodeLinkForDigg(post)}&title=#{postToTools.encodeTitleForDigg(post)}&bodytext=#{postToTools.encodeBodyForDigg(post)}&media=news&topic=programming">
- Digg This!
- </a>
+ Digg this!</a>
</s:fragment>
<hr />
Modified: trunk/view/manage/feed_mod.xhtml
===================================================================
--- trunk/view/manage/feed_mod.xhtml 2008-04-24 11:27:42 UTC (rev 290)
+++ trunk/view/manage/feed_mod.xhtml 2008-04-24 12:17:15 UTC (rev 291)
@@ -122,21 +122,21 @@
</h:panelGroup>
<h:outputLabel for="showDelicious">
- Show "save to del.icio.us" link at the bottom of every post:
+ Add a "Post to del.icio.us" link to every post:
</h:outputLabel>
<h:panelGroup>
<h:selectBooleanCheckbox id="showDelicious" value="#{feedMod.feed.showDelicious}" />
</h:panelGroup>
<h:outputLabel for="showDigg">
- Show "digg this!" link at the bottom of every post:
+ Add a "Digg this!" link to every post:
</h:outputLabel>
<h:panelGroup>
<h:selectBooleanCheckbox id="showDigg" value="#{feedMod.feed.showDigg}" />
</h:panelGroup>
<h:outputLabel for="showDzone">
- Show "post to dzone" link at the bottom of every post:
+ Add a "Post to DZone" link to every post:
</h:outputLabel>
<h:panelGroup>
<h:selectBooleanCheckbox id="showDzone" value="#{feedMod.feed.showDzone}" />
Modified: trunk/view/manage/template/template_mod.xhtml
===================================================================
--- trunk/view/manage/template/template_mod.xhtml 2008-04-24 11:27:42 UTC (rev 290)
+++ trunk/view/manage/template/template_mod.xhtml 2008-04-24 12:17:15 UTC (rev 291)
@@ -42,7 +42,7 @@
<h:outputLabel for="text"><span class="required">*</span> Text:</h:outputLabel>
<h:panelGroup>
- <h:inputTextarea id="text" value="#{templateMod.template.text}" rows="32" cols="80" required="true">
+ <h:inputTextarea id="text" value="#{templateMod.template.text}" rows="40" cols="100" required="true">
<a:support event="onblur" reRender="textMessage" ajaxSingle="true" bypassUpdates="true"/>
<s:validate />
</h:inputTextarea>
More information about the jboss-cvs-commits
mailing list