[jboss-cvs] JBossBlog SVN: r272 - in trunk: resources and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 26 07:37:06 EDT 2008
Author: adamw
Date: 2008-03-26 07:37:06 -0400 (Wed, 26 Mar 2008)
New Revision: 272
Added:
trunk/view/manage/proposition/proposition_accept_1.xhtml
trunk/view/manage/proposition/proposition_accept_2.xhtml
Modified:
trunk/docs/tutorial.html
trunk/resources/WEB-INF/pages.xml
trunk/resources/messages_en.properties
trunk/src/action/org/jboss/blog/session/feed/mod/RemoteFeedModBean.java
trunk/src/tools/org/jboss/blog/tools/GeneralTools.java
trunk/view/manage/proposition/proposition_list.xhtml
trunk/view/manage/remote/remote_mod.xhtml
Log:
Modified: trunk/docs/tutorial.html
===================================================================
--- trunk/docs/tutorial.html 2008-03-25 13:24:53 UTC (rev 271)
+++ trunk/docs/tutorial.html 2008-03-26 11:37:06 UTC (rev 272)
@@ -179,7 +179,7 @@
<p>You can also customize the right part of the "View feed" page a little. For example, you may want to include
a "Back to MyProject page" link and a logo. You can do that, by setting a "Group header". It is a piece of HTML,
which will be displayed right below the "Feeds home" link, when viewing any feed or post belonging to that group.
- To set it, got to administration -> manage groups -> edit group.</p>
+ To set it, got to manage home -> manage groups -> edit group.</p>
<p>Here is an example:</p>
@@ -216,6 +216,11 @@
<p>To receive notifications about new proposed feeds in your group, you have to set the "Administrator e-mail"
field in group administration (see the "Administration" section, page: Manage feeds -> Manage feed groups ->
Group X edit).</p>
+
+ <p>To accept or reject proposed feeds, go to manage home -> pending feed propositions. There you'll see a table
+ presenting the proposed feeds, with the feed address (so that you can actually look at the posts) and a
+ regular expression determining posts from which categories will be included. When you click "Accept", you'll have
+ the possibility to change the properties of the feed, as well as see which posts will be saved.</p>
</div>
<div class="sect1">
Modified: trunk/resources/WEB-INF/pages.xml
===================================================================
--- trunk/resources/WEB-INF/pages.xml 2008-03-25 13:24:53 UTC (rev 271)
+++ trunk/resources/WEB-INF/pages.xml 2008-03-26 11:37:06 UTC (rev 272)
@@ -88,11 +88,21 @@
</page>
<!-- Manage propositions -->
-
- <page view-id="/manage/proposition/proposition_accept.xhtml" login-required="true">
+
+ <page view-id="/manage/proposition/proposition_accept_1.xhtml" login-required="true">
<restrict>#{identity.hasPermission('feed', 'edit', feedMod.feed, feedMod.feed.group)}</restrict>
<begin-conversation flush-mode="manual" join="true" />
<param name="name" converterId="feedConverter" value="#{feedMod.feed}" />
+ <navigation from-action="#{remoteFeedMod.saveExisting}">
+ <redirect view-id="/manage/proposition/proposition_accept_2.xhtml" />
+ </navigation>
+ <navigation from-action="#{remoteFeedMod.savePartial}">
+ <redirect view-id="/manage/proposition/proposition_accept_2.xhtml" />
+ </navigation>
+ </page>
+
+ <page view-id="/manage/proposition/proposition_accept_2.xhtml" login-required="true" conversation-required="true">
+ <restrict>#{identity.hasPermission('feed', 'edit', feedMod.feed, feedMod.feed.group)}</restrict>
<navigation from-action="#{feedMod.saveExisting}">
<raise-event type="org.jboss.blog.feed.accept" />
<end-conversation />
Modified: trunk/resources/messages_en.properties
===================================================================
--- trunk/resources/messages_en.properties 2008-03-25 13:24:53 UTC (rev 271)
+++ trunk/resources/messages_en.properties 2008-03-26 11:37:06 UTC (rev 272)
@@ -92,7 +92,7 @@
blog.feed.updated=Feed {0} updated.
blog.feed.added=Feed {0} added.
blog.feed.accepted=Feed {0} accepted. Its posts will bead read and saved in a moment.
-blog.feed.proposed=Your feed: '{0}' has been added to our proposition queue. It will be now reviewed.
+blog.feed.proposed=Your feed: '{0}' has been added to our propositions queue. It will be now reviewed.
blog.template.deleted=Template {0} of type {1} deleted.
blog.template.updated=Template {0} of type {1} updated.
@@ -103,8 +103,7 @@
blog.feed.enclosure.invalid=Enclosure on post: '#0' with url '#1', property: #2, #3
blog.feed.image.invalid=Image for post: '#0', property: #1, #2
-blog.feed.remote.address.updated=Remote feed's {0} address changed.
-blog.feed.remote.postauthor.updated=Remote feed {0} updated.
+blog.feed.remote.updated=Remote feed {0} updated.
blog.feed.remote.adding.quickstart=Enter your atom/rss2 feed address in the box to the left; if it is correct \
and the feed parses without any problems, you'll be able to proceed and fill in other details of the new feed.
blog.feed.remote.mod.authors=You can choose how the author of a post is determined: the value can be either taken \
Modified: trunk/src/action/org/jboss/blog/session/feed/mod/RemoteFeedModBean.java
===================================================================
--- trunk/src/action/org/jboss/blog/session/feed/mod/RemoteFeedModBean.java 2008-03-25 13:24:53 UTC (rev 271)
+++ trunk/src/action/org/jboss/blog/session/feed/mod/RemoteFeedModBean.java 2008-03-26 11:37:06 UTC (rev 272)
@@ -234,7 +234,7 @@
entityManager.flush();
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "blog.feed.remote.address.updated",
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "blog.feed.remote.updated",
getRemoteFeed().getName());
Events.instance().raiseEvent("org.jboss.blog.feed.updated", getRemoteFeed());
@@ -251,7 +251,7 @@
entityManager.flush();
- facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "blog.feed.remote.postauthor.updated",
+ facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_INFO, "blog.feed.remote.updated",
getRemoteFeed().getName());
Events.instance().raiseEvent("org.jboss.blog.feed.updated", getRemoteFeed());
Modified: trunk/src/tools/org/jboss/blog/tools/GeneralTools.java
===================================================================
--- trunk/src/tools/org/jboss/blog/tools/GeneralTools.java 2008-03-25 13:24:53 UTC (rev 271)
+++ trunk/src/tools/org/jboss/blog/tools/GeneralTools.java 2008-03-26 11:37:06 UTC (rev 272)
@@ -130,8 +130,8 @@
}
public static int compareDates(Date date1, Date date2) {
- long seconds1 = date1.getTime() / 1000;
- long seconds2 = date2.getTime() / 1000;
+ long seconds1 = (date1 == null) ? 0 : (date1.getTime() / 1000);
+ long seconds2 = (date2 == null) ? 0 : (date2.getTime() / 1000);
if (seconds1 == seconds2) {
return 0;
Copied: trunk/view/manage/proposition/proposition_accept_1.xhtml (from rev 271, trunk/view/manage/remote/remote_propose.xhtml)
===================================================================
--- trunk/view/manage/proposition/proposition_accept_1.xhtml (rev 0)
+++ trunk/view/manage/proposition/proposition_accept_1.xhtml 2008-03-26 11:37:06 UTC (rev 272)
@@ -0,0 +1,35 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ template="../../layout/template.xhtml">
+ <ui:define name="header">
+ Accept feed: #{feedMod.feed.name}, remote feed-type-specific settings
+ </ui:define>
+
+ <ui:define name="body">
+ <div class="TwoColumnBlogSubnav">
+ <h4>Tips</h4>
+ <ul>
+ <li>
+ To see which posts will be saved, click "Read and parse the feed". You can also skip this step
+ by clicking "Save only 'Post author' and 'Include category'".
+ </li>
+ <li class="last">
+ #{messages['blog.feed.remote.mod.authors']}
+ </li>
+ </ul>
+ </div>
+
+ <ui:include src="../remote/remote_mod.xhtml">
+ <ui:param name="new" value="false" />
+ <ui:param name="showCaptcha" value="false" />
+ <ui:param name="backTo" value="/manage/proposition/proposition_list.xhtml" />
+ </ui:include>
+ </ui:define>
+</ui:composition>
Copied: trunk/view/manage/proposition/proposition_accept_2.xhtml (from rev 240, trunk/view/manage/proposition/proposition_accept.xhtml)
===================================================================
--- trunk/view/manage/proposition/proposition_accept_2.xhtml (rev 0)
+++ trunk/view/manage/proposition/proposition_accept_2.xhtml 2008-03-26 11:37:06 UTC (rev 272)
@@ -0,0 +1,20 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ template="../../layout/template.xhtml">
+ <ui:define name="header">
+ Accept feed: #{feedMod.feed.name}, common settings
+ </ui:define>
+
+ <ui:define name="body">
+ <ui:include src="../feed_mod.xhtml">
+ <ui:param name="new" value="false" />
+ </ui:include>
+ </ui:define>
+</ui:composition>
Modified: trunk/view/manage/proposition/proposition_list.xhtml
===================================================================
--- trunk/view/manage/proposition/proposition_list.xhtml 2008-03-25 13:24:53 UTC (rev 271)
+++ trunk/view/manage/proposition/proposition_list.xhtml 2008-03-26 11:37:06 UTC (rev 272)
@@ -18,6 +18,7 @@
<td class="tableheaderfirst" style="width:160px;">Feed title</td>
<td class="tableheader">Feed name</td>
<td class="tableheader">Feed address</td>
+ <td class="tableheader">Feed category regexp</td>
<td class="tableheader">Accept the feed</td>
<td class="tableheader">Delete the feed</td>
</tr>
@@ -41,8 +42,9 @@
<td class="rowlinefirst" style="font-weight:bold;">#{feed.title}</td>
<td class="rowline">#{feed.name}</td>
<td class="rowline"><h:outputLink value="#{feed.remoteLink}">#{feed.remoteLink}</h:outputLink></td>
+ <td class="rowline">#{feed.includeCategoryRegexp}</td>
<td class="rowline">
- <s:link view="/manage/proposition/proposition_accept.xhtml" value="Accept"
+ <s:link view="/manage/proposition/proposition_accept_1.xhtml" value="Accept"
rendered="#{identity.hasPermission('feed', 'edit', feed, group)}">
<f:param name="name" value="#{feed.name}" />
</s:link>
Modified: trunk/view/manage/remote/remote_mod.xhtml
===================================================================
--- trunk/view/manage/remote/remote_mod.xhtml 2008-03-25 13:24:53 UTC (rev 271)
+++ trunk/view/manage/remote/remote_mod.xhtml 2008-03-26 11:37:06 UTC (rev 272)
@@ -58,7 +58,7 @@
style="width: 200px">
<f:selectItems value="#{remoteFeedMod.includeCategories}" />
<s:validate />
- <a:support event="onchange" reRender="includeCategoryBody,postsIncluded,regexpHelp" ajaxSingle="true"
+ <a:support event="onchange" reRender="includeCategoryBody,postsIncluded" ajaxSingle="true"
action="#{remoteFeedMod.generateVisiblePosts}" />
</h:selectOneMenu>
<h:inputText id="includeOtherCategory" rendered="#{remoteFeedMod.includeCategory == 'OTHER'}"
@@ -103,11 +103,11 @@
</s:fragment>
<s:fragment rendered="#{remoteFeedMod.parseOk and !new}">
<li>
- <h:commandButton value="Save all" action="#{remoteFeedMod.saveExisting}"
- styleClass="submit" />
+ <h:commandButton value="Save" action="#{remoteFeedMod.saveExisting}"
+ styleClass="submit_first" />
</li>
</s:fragment>
- <s:fragment rendered="#{!new}">
+ <s:fragment rendered="#{!remoteFeedMod.parseOk and !new}">
<li>
<h:commandButton value="Save only 'Post author' and 'Include category'" action="#{remoteFeedMod.savePartial}"
styleClass="submit" />
@@ -135,7 +135,7 @@
<ul>
<ui:repeat var="post" value="#{remoteFeedMod.visiblePosts}">
- <li>#{post.title}</li>
+ <li><a href="#{post.link}">#{post.title}</a></li>
</ui:repeat>
</ul>
</s:fragment>
More information about the jboss-cvs-commits
mailing list