[seam-commits] Seam SVN: r8504 - in trunk/examples/wiki: src/plugin/org/jboss/seam/wiki/plugin/basic/i18n and 2 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jul 28 00:58:58 EDT 2008
Author: christian.bauer at jboss.com
Date: 2008-07-28 00:58:58 -0400 (Mon, 28 Jul 2008)
New Revision: 8504
Added:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/OnlineMembersPreferences.java
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/onlineMembers.xhtml
trunk/examples/wiki/view/includes/onlineMembers.xhtml
Log:
Online members plugin now configurable
Copied: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/OnlineMembersPreferences.java (from rev 8455, trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/DirMenuPreferences.java)
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/OnlineMembersPreferences.java (rev 0)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/OnlineMembersPreferences.java 2008-07-28 04:58:58 UTC (rev 8504)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at gnu.org.
+ */
+package org.jboss.seam.wiki.plugin.basic;
+
+import org.hibernate.validator.Range;
+import org.jboss.seam.wiki.preferences.PreferenceVisibility;
+import org.jboss.seam.wiki.preferences.annotations.PreferenceProperty;
+import org.jboss.seam.wiki.preferences.annotations.Preferences;
+
+import java.io.Serializable;
+
+ at Preferences(
+ name = "OnlineMembers",
+ description = "#{messages['basic.onlineMembers.preferences.description']}",
+ mappedTo = "basic.onlineMembers"
+)
+public class OnlineMembersPreferences implements Serializable {
+
+ @PreferenceProperty(
+ description = "#{messages['basic.onlineMembers.preferences.property.membersPerRow']}",
+ visibility = {PreferenceVisibility.INSTANCE},
+ editorIncludeName = "NumberRange"
+ )
+ @Range(min = 1l, max = 50l)
+ private Long membersPerRow;
+
+ public Long getMembersPerRow() {
+ return membersPerRow;
+ }
+}
\ No newline at end of file
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties 2008-07-27 20:36:39 UTC (rev 8503)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties 2008-07-28 04:58:58 UTC (rev 8504)
@@ -84,6 +84,8 @@
basic.onlineMembers.label=Online Members
basic.onlineMembers.description=Display all currently online members and their portrait
+basic.onlineMembers.preferences.description=Plugin: Online Members
+basic.onlineMembers.preferences.property.membersPerRow=Member icons per row
basic.userSummary.label=User Summary
basic.userSummary.description=Display a summary of a users statistics
Modified: trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/onlineMembers.xhtml
===================================================================
--- trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/onlineMembers.xhtml 2008-07-27 20:36:39 UTC (rev 8503)
+++ trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/onlineMembers.xhtml 2008-07-28 04:58:58 UTC (rev 8504)
@@ -11,16 +11,14 @@
<s:div styleClass="boxHeader">
<h:outputText value="#{messages['lacewiki.label.userList.OnlineMembers']}"/>
- <!-- TODO: make configurable
- #{messages['lacewiki.label.userList.InTheLast']}
- #{wikiInit.authenticatedSessionTimeoutMinutes}
- #{messages['lacewiki.label.userList.Minutes']}"/>
- -->
</s:div>
<div class="boxContent">
- <ui:include src="/includes/onlineMembers.xhtml"/>
+ <ui:include src="/includes/onlineMembers.xhtml">
+ <ui:param name="membersPerRow"
+ value="#{preferences.get('OnlineMembers', currentMacro).membersPerRow}"/>
+ </ui:include>
</div>
Modified: trunk/examples/wiki/view/includes/onlineMembers.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/onlineMembers.xhtml 2008-07-27 20:36:39 UTC (rev 8503)
+++ trunk/examples/wiki/view/includes/onlineMembers.xhtml 2008-07-28 04:58:58 UTC (rev 8504)
@@ -6,7 +6,8 @@
xmlns:c="http://java.sun.com/jstl/core"
xmlns:s="http://jboss.com/products/seam/taglib">
- <h:panelGrid columns="8" rendered="#{not empty wikiHttpSessionManager.onlineMembers}"
+ <h:panelGrid columns="#{not empty membersPerRow ? membersPerRow : '8'}"
+ rendered="#{not empty wikiHttpSessionManager.onlineMembers}"
columnClasses="alignBottom alignCenter minorPadding"
style="margin-left:auto;margin-right:auto;">
<c:forEach var="ou" items="#{wikiHttpSessionManager.onlineMembers}">
More information about the seam-commits
mailing list