Author: christian.bauer(a)jboss.com
Date: 2008-06-20 13:44:36 -0400 (Fri, 20 Jun 2008)
New Revision: 8398
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/ProfilePluginModule.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/profile_userSummary.xhtml
trunk/examples/wiki/view/includes/userProfileLink.xhtml
trunk/examples/wiki/view/userProfile_d.xhtml
trunk/examples/wiki/view/userProfile_m.xhtml
Removed:
trunk/examples/wiki/view/includes/userInfoLink.xhtml
trunk/examples/wiki/view/userInfo_d.xhtml
trunk/examples/wiki/view/userInfo_m.xhtml
Modified:
trunk/examples/wiki/src/etc/WEB-INF/pages.xml
trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
trunk/examples/wiki/src/etc/i18n/messages_en.properties
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/MacroPluginModule.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginModule.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiURLRenderer.java
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml
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/lastModifiedDocuments.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml
trunk/examples/wiki/view/dirDisplay_d.xhtml
trunk/examples/wiki/view/docDisplay_m.xhtml
trunk/examples/wiki/view/includes/commentsDisplay.xhtml
trunk/examples/wiki/view/includes/userControl.xhtml
trunk/examples/wiki/view/includes/userInfo.xhtml
trunk/examples/wiki/view/tagDisplay_d.xhtml
trunk/examples/wiki/view/themes/default/css/template.css
trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
trunk/examples/wiki/view/userHome_d.xhtml
trunk/examples/wiki/view/userList_d.xhtml
Log:
Introduced user profile plugin modules
Modified: trunk/examples/wiki/src/etc/WEB-INF/pages.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/etc/WEB-INF/pages.xml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -21,7 +21,7 @@
</page>
<page view-id="/docDisplay*">
- <param name="documentId"
value="#{documentHome.nodeId}"/>
+ <param name="documentId" value="#{documentHome.nodeId}"
required="true"/>
</page>
<page view-id="/docHistory*"
no-conversation-view-id="/wiki.xhtml">
@@ -79,7 +79,7 @@
</page>
<page view-id="/dirDisplay*">
- <param name="directoryId"
value="#{directoryBrowser.directoryId}"/>
+ <param name="directoryId"
value="#{directoryBrowser.directoryId}" required="true"/>
<navigation>
<rule if-outcome="removed">
<redirect view-id="/dirDisplay_#{skin}.xhtml">
@@ -164,7 +164,7 @@
</page>
<page view-id="/tagDisplay*">
- <param name="tag" value="#{tagQuery.tag}"/>
+ <param name="tag" value="#{tagQuery.tag}"
required="true"/>
</page>
<page view-id="/search*">
@@ -214,7 +214,7 @@
</navigation>
</page>
- <page view-id="/userInfo*">
+ <page view-id="/userProfile*">
<param name="userId" value="#{userHome.userId}"/>
<param name="username"
value="#{userHome.requestedUsername}"/>
<action execute="#{userHome.initDisplay}"/>
@@ -225,7 +225,7 @@
</page>
<page view-id="/confirmRegistration.xhtml"
action="#{authenticator.activate}">
- <param name="activationCode"
value="#{authenticator.activationCode}"/>
+ <param name="activationCode"
value="#{authenticator.activationCode}" required="true"/>
<navigation>
<rule if-outcome="activated">
<redirect view-id="/wiki.xhtml">
@@ -242,7 +242,7 @@
</page>
<page view-id="/resetPassword.xhtml"
action="#{userPasswordReset.prepare}">
- <param name="activationCode"
value="#{userPasswordReset.activationCode}"/>
+ <param name="activationCode"
value="#{userPasswordReset.activationCode}" required="true"/>
<navigation>
<rule if-outcome="prepared">
<redirect view-id="/wiki.xhtml">
@@ -362,6 +362,13 @@
</http-error>
</exception>
+ <exception class="javax.faces.validator.ValidatorException">
+ <end-conversation/>
+ <http-error error-code="400">
+
<message>#{messages['lacewiki.msg.RequestError']}</message>
+ </http-error>
+ </exception>
+
<!-- We send a BAD REQUEST here because we don't want the client to retry
later (Googlebot...) -->
<exception log="true" logLevel="error">
<end-conversation/>
Modified: trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml
===================================================================
--- trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/etc/WEB-INF/urlrewrite.xml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -53,7 +53,7 @@
<set type="session" name="skin">m</set>
</rule>
- <!-- /123.lace -->
+ <!-- /123.html -->
<rule>
<from>^/([0-9]+)\.[a-zA-z]+$</from>
<to last="true">/wiki.seam?nodeId=$1</to>
@@ -68,7 +68,7 @@
<!-- /user/foo -->
<rule>
<from
casesensitive="true">^/user/([a-zA-Z]?[a-zA-Z0-9]+)$</from>
- <to
last="true">/userInfo_%{session-attribute:skin}.seam?username=$1</to>
+ <to
last="true">/userProfile_%{session-attribute:skin}.seam?username=$1</to>
</rule>
<!-- /tag/Foo+Bar-->
@@ -122,7 +122,7 @@
</rule>
<rule>
<from
casesensitive="true">^/cgi-bin/blosxom.cgi/index.rss$</from>
- <to last="true"
type="permanent-redirect">%{scheme}://%{server-name}%{context-path}/Feed/atom</to>
+ <to last="true"
type="permanent-redirect">%{scheme}://%{server-name}%{context-path}/service/Feed/atom</to>
</rule>
<!-- ROOT / -->
Modified: trunk/examples/wiki/src/etc/i18n/messages_en.properties
===================================================================
--- trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-06-20 05:23:39 UTC (rev
8397)
+++ trunk/examples/wiki/src/etc/i18n/messages_en.properties 2008-06-20 17:44:36 UTC (rev
8398)
@@ -466,17 +466,11 @@
lacewiki.label.userList.Edit=Edit
lacewiki.label.userList.NotAvailableForSkin=User search is not available with this skin.
-# User Info
+# User Profile
-lacewiki.label.userInfo.UserInfo=User Summary
-lacewiki.label.userInfo.NotActivated=Not Activated
-lacewiki.label.userInfo.NoProfile=No profile available.
-lacewiki.label.userInfo.Name=Name
-lacewiki.label.userInfo.JoinedOn=Joined
-lacewiki.label.userInfo.LastLoginOn=Last Login
-lacewiki.label.userInfo.RatingPoints=Rating Points
-lacewiki.button.userInfo.EditAccount=<u>E</u>dit Account
-lacewiki.button.userInfo.EditAccount.accesskey=E
+lacewiki.label.userProfile.UserProfile=User Profile
+lacewiki.button.userProfile.EditAccount=<u>E</u>dit Account/Profile
+lacewiki.button.userProfile.EditAccount.accesskey=E
# Document History
@@ -700,6 +694,7 @@
lacewiki.msg.OptimisticLockError=Someone modified the same record while you were editing
it. Your workspace has been closed.
lacewiki.msg.AccessDenied=Access Denied
lacewiki.msg.FatalError=Request failed, please check the application log or contact the
administrator
+lacewiki.msg.RequestError=Request failed, most likely because a request parameter was
missing
lacewiki.msg.Trash.Emptied=All items in the trash have been permanently deleted.
lacewiki.msg.AutomaticallyGeneratedFeed=Aggregated Feed
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/CommentHome.java 2008-06-20
17:44:36 UTC (rev 8398)
@@ -365,6 +365,8 @@
getLog().debug("request parameter sets comment form visible, starts
conversation");
Conversation.instance().begin(true, false);
Conversation.instance().changeFlushMode(FlushModeType.MANUAL);
+
+ setParentNodeId(documentHome.getInstance().getId());
newComment();
}
}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/PluginRegistry.java 2008-06-20
17:44:36 UTC (rev 8398)
@@ -17,6 +17,7 @@
import org.jboss.seam.log.Logging;
import org.jboss.seam.wiki.core.plugin.metamodel.Plugin;
import org.jboss.seam.wiki.core.plugin.metamodel.MacroPluginModule;
+import org.jboss.seam.wiki.core.plugin.metamodel.ProfilePluginModule;
import org.jboss.seam.wiki.core.plugin.binding.PluginBinder;
import org.jboss.seam.wiki.core.exception.InvalidWikiConfigurationException;
import org.jboss.seam.wiki.core.model.WikiTextMacro;
@@ -42,6 +43,7 @@
private SortedMap<String, Plugin> plugins = new TreeMap<String,
Plugin>();
private SortedMap<String, MacroPluginModule> macroPluginModulesByKey = new
TreeMap<String, MacroPluginModule>();
private SortedMap<String, MacroPluginModule> macroPluginModulesByMacroName =
new TreeMap<String, MacroPluginModule>();
+ private SortedSet<ProfilePluginModule> profilePluginModulesByPriority = new
TreeSet<ProfilePluginModule>();
public void addPlugin(String key, Plugin p) {
if (plugins.containsKey(key)) {
@@ -76,6 +78,15 @@
return macroPluginModulesByMacroName;
}
+ // TODO: This should be unmodifiable and additions only allowed through a new
registry method
+ public SortedSet<ProfilePluginModule> getProfilePluginModulesByPriority() {
+ return profilePluginModulesByPriority;
+ }
+
+ public List<ProfilePluginModule> getProfilePluginModulesAsList() {
+ return new ArrayList<ProfilePluginModule>(profilePluginModulesByPriority);
+ }
+
public WikiPluginMacro createWikiPluginMacro(WikiTextMacro wikiTextMacro) {
if (getMacroPluginModulesByMacroName().containsKey(wikiTextMacro.getName())) {
log.debug("binding WikiTextMacro metadata to create WikiPluginMacro
instance: " + wikiTextMacro);
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/binding/lacewiki/PluginBinder.java 2008-06-20
17:44:36 UTC (rev 8398)
@@ -68,7 +68,8 @@
plugin.setLabel(pluginLabel);
bindPluginInfo(root, plugin);
- bindMacroPluginsModules(registry, root, plugin);
+ bindMacroPluginModules(registry, root, plugin);
+ bindProfilePluginModules(registry, root, plugin);
}
bindMacroParameters(registry);
@@ -105,78 +106,101 @@
}
}
- private void bindMacroPluginsModules(PluginRegistry registry, Element root, Plugin
plugin) {
+ private void bindMacroPluginModules(PluginRegistry registry, Element root, Plugin
plugin) {
// Iterate through the XML descriptor and bind every <macro> to
corresponding metamodel instances
List<Element> macroPlugins = root.elements("macro");
- for (Element macroPluginModuleDescriptor : macroPlugins) {
+ for (Element descriptor : macroPlugins) {
- String moduleKey =
macroPluginModuleDescriptor.attributeValue("key");
- MacroPluginModule macroPluginModule = new MacroPluginModule(plugin,
moduleKey);
+ String moduleKey = descriptor.attributeValue("key");
+ MacroPluginModule module = new MacroPluginModule(plugin, moduleKey);
- log.debug("binding macro plugin module: " +
macroPluginModule.getFullyQualifiedKey());
+ log.debug("binding macro plugin module: " +
module.getFullyQualifiedKey());
+ bindLabelDescription(descriptor, module, plugin);
+ bindMacroApplicableTo(descriptor, module);
+ bindMacroRenderOptions(descriptor, module);
+ bindSkins(descriptor, module);
+ bindCacheRegions(descriptor, module);
- String macroName =
macroPluginModuleDescriptor.attributeValue("name");
+ String macroName = descriptor.attributeValue("name");
if (registry.getMacroPluginModulesByMacroName().containsKey(macroName)) {
throw new InvalidWikiConfigurationException("Duplicate macro name,
needs to be globally unique: " + macroName);
}
- macroPluginModule.setName(macroName);
+ module.setName(macroName);
- String label =
macroPluginModuleDescriptor.attributeValue("label");
- if (label == null) label = getMessage(plugin.getKey() + "." +
moduleKey + ".label");
- macroPluginModule.setLabel(label);
- String description =
macroPluginModuleDescriptor.attributeValue("description");
- if (description == null) description = getMessage(plugin.getKey() +
"." + moduleKey + ".description");
- macroPluginModule.setDescription(description);
+ // Finally, bind it
+ plugin.getModules().add(module);
+ registry.getMacroPluginModulesByKey().put(module.getFullyQualifiedKey(),
module);
+ registry.getMacroPluginModulesByMacroName().put(module.getName(), module);
+ }
- bindMacroApplicableTo(macroPluginModuleDescriptor, macroPluginModule);
- bindMacroRenderOptions(macroPluginModuleDescriptor, macroPluginModule);
+ }
- Element skins = macroPluginModuleDescriptor.element("skins");
- if (skins != null) {
- bindMacroSkins(skins, macroPluginModule);
- }
+ private void bindProfilePluginModules(PluginRegistry registry, Element root, Plugin
plugin) {
- Element cacheRegions =
macroPluginModuleDescriptor.element("cache-regions");
- if (cacheRegions != null) {
- bindFragmentCacheRegions(cacheRegions, macroPluginModule);
- }
+ // Iterate through the XML descriptor and bind every <profile> to
corresponding metamodel instances
+ List<Element> profilePlugins = root.elements("profile");
+ for (Element descriptor : profilePlugins) {
+ String moduleKey = descriptor.attributeValue("key");
+ ProfilePluginModule module = new ProfilePluginModule(plugin, moduleKey);
+
+ log.debug("binding profile plugin module: " +
module.getFullyQualifiedKey());
+
+ bindLabelDescription(descriptor, module, plugin);
+ bindSkins(descriptor, module);
+
+ module.setTemplate(descriptor.attributeValue("template"));
+ module.setPriority(new
Integer(descriptor.attributeValue("priority")));
+
// Finally, bind it
- plugin.getModules().add(macroPluginModule);
-
registry.getMacroPluginModulesByKey().put(macroPluginModule.getFullyQualifiedKey(),
macroPluginModule);
- registry.getMacroPluginModulesByMacroName().put(macroPluginModule.getName(),
macroPluginModule);
+ plugin.getModules().add(module);
+ registry.getProfilePluginModulesByPriority().add(module);
}
}
- private void bindFragmentCacheRegions(Element moduleDescriptor, PluginModule module)
{
+ private void bindLabelDescription(Element descriptor, PluginModule module, Plugin
plugin) {
+ String label = descriptor.attributeValue("label");
+ if (label == null) label = getMessage(plugin.getKey() + "." +
module.getKey() + ".label");
+ module.setLabel(label);
+ String description = descriptor.attributeValue("description");
+ if (description == null) description = getMessage(plugin.getKey() + "."
+ module.getKey() + ".description");
+ module.setDescription(description);
+ }
- List<Element> cacheRegions =
moduleDescriptor.elements("cache-region");
- if (cacheRegions.size() > 0) {
- for (Element cacheRegion : cacheRegions) {
+ private void bindCacheRegions(Element descriptor, PluginModule module) {
+ Element cacheRegionsDescriptor = descriptor.element("cache-regions");
+ if (cacheRegionsDescriptor != null) {
+ List<Element> cacheRegions =
cacheRegionsDescriptor.elements("cache-region");
+ if (cacheRegions.size() > 0) {
+ for (Element cacheRegion : cacheRegions) {
+ String unqualifiedCacheRegionName =
cacheRegion.attributeValue("name");
+ module.addFragmentCacheRegion(unqualifiedCacheRegionName);
- String unqualifiedCacheRegionName =
cacheRegion.attributeValue("name");
- module.addFragmentCacheRegion(unqualifiedCacheRegionName);
-
- List<Element> invalidationEvents =
cacheRegion.elements("invalidation-event");
- if (invalidationEvents != null) {
- for (Element invalidationEvent : invalidationEvents) {
- String eventName =
invalidationEvent.attributeValue("name");
- PluginCacheManager.registerBinding(
- eventName,
-
module.getQualifiedCacheRegionName(unqualifiedCacheRegionName)
- );
+ List<Element> invalidationEvents =
cacheRegion.elements("invalidation-event");
+ if (invalidationEvents != null) {
+ for (Element invalidationEvent : invalidationEvents) {
+ String eventName =
invalidationEvent.attributeValue("name");
+ PluginCacheManager.registerBinding(
+ eventName,
+
module.getQualifiedCacheRegionName(unqualifiedCacheRegionName)
+ );
+ }
}
}
-
}
}
}
- private void bindMacroSkins(Element moduleDescriptor, MacroPluginModule module) {
- List<Element> skins = moduleDescriptor.elements("skin");
+ private void bindSkins(Element descriptor, PluginModule module) {
+ Element skins = descriptor.element("skins");
+ if (skins != null) bindSkin(skins, module);
+ }
+
+ private void bindSkin(Element descriptor, PluginModule module) {
+ List<Element> skins = descriptor.elements("skin");
if (skins.size() > 0) {
String[] skinNames = new String[skins.size()];
for (int i = 0; i < skins.size(); i++)
@@ -185,8 +209,8 @@
}
}
- private void bindMacroApplicableTo(Element moduleDescriptor, MacroPluginModule
module) {
- Element applicableTo = moduleDescriptor.element("applicable-to");
+ private void bindMacroApplicableTo(Element descriptor, MacroPluginModule module) {
+ Element applicableTo = descriptor.element("applicable-to");
if (applicableTo != null) {
boolean header =
Boolean.parseBoolean(applicableTo.attributeValue("header"));
boolean content =
Boolean.parseBoolean(applicableTo.attributeValue("content"));
@@ -200,8 +224,8 @@
}
}
- private void bindMacroRenderOptions(Element moduleDescriptor, MacroPluginModule
module) {
- Element renderOptions = moduleDescriptor.element("render-options");
+ private void bindMacroRenderOptions(Element descriptor, MacroPluginModule module) {
+ Element renderOptions = descriptor.element("render-options");
if (renderOptions != null) {
List<MacroPluginModule.RenderOption> renderOptionList =
new ArrayList<MacroPluginModule.RenderOption>();
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/MacroPluginModule.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/MacroPluginModule.java 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/MacroPluginModule.java 2008-06-20
17:44:36 UTC (rev 8398)
@@ -17,7 +17,6 @@
public class MacroPluginModule extends PluginModule {
private String name;
- private String[] skins = {"d"};
private DocumentArea[] applicableTo = {DocumentArea.CONTENT};
private RenderOption[] renderOptions;
private RenderDependency[] renderDependencies;
@@ -69,21 +68,6 @@
this.name = name;
}
- public String[] getSkins() {
- return skins;
- }
-
- public void setSkins(String[] skins) {
- this.skins = skins;
- }
-
- public boolean isAvailableForSkin(String skin) {
- for (String s : skins) {
- if (skin.equals(s)) return true;
- }
- return false;
- }
-
public DocumentArea[] getApplicableTo() {
return applicableTo;
}
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/Plugin.java 2008-06-20
17:44:36 UTC (rev 8398)
@@ -105,10 +105,10 @@
+ "/" + currentTheme;
}
- public String getPackageDefaultTemplatePath(String macroName) {
+ public String getPackageDefaultTemplatePath(String templateName) {
return getDescriptorPackagePath()
+ "/" + Plugin.PACKAGE_TEMPLATES
- + "/" + macroName + ".xhtml";
+ + "/" + templateName + ".xhtml";
}
public String getPackageI18NPath() {
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginModule.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginModule.java 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/PluginModule.java 2008-06-20
17:44:36 UTC (rev 8398)
@@ -22,6 +22,7 @@
private String label;
private String description;
private String className;
+ private String[] skins = {"d"};
private SortedSet<String> fragmentCacheRegions = new TreeSet<String>();
protected PluginModule(Plugin plugin, String key) {
@@ -69,6 +70,21 @@
this.className = className;
}
+ public String[] getSkins() {
+ return skins;
+ }
+
+ public void setSkins(String[] skins) {
+ this.skins = skins;
+ }
+
+ public boolean isAvailableForSkin(String skin) {
+ for (String s : skins) {
+ if (skin.equals(s)) return true;
+ }
+ return false;
+ }
+
public SortedSet<String> getFragmentCacheRegions() {
return fragmentCacheRegions;
}
@@ -92,6 +108,4 @@
public String getQualifiedCacheRegionName(String name) {
return getFullyQualifiedKey() + "." + name;
}
-
-
}
Added:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/ProfilePluginModule.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/ProfilePluginModule.java
(rev 0)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/metamodel/ProfilePluginModule.java 2008-06-20
17:44:36 UTC (rev 8398)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ *
+ * Distributable under LGPL license.
+ * See terms of license at
gnu.org.
+ */
+package org.jboss.seam.wiki.core.plugin.metamodel;
+
+/**
+ * @author Christian Bauer
+ */
+public class ProfilePluginModule extends PluginModule implements Comparable {
+
+ private String template;
+ private int priority = 100;
+ private String[] skins = {"d"};
+
+ public ProfilePluginModule(Plugin plugin, String key) {
+ super(plugin, key);
+ }
+
+ public String getTemplate() {
+ return template;
+ }
+
+ public void setTemplate(String template) {
+ this.template = template;
+ }
+
+ public int getPriority() {
+ return priority;
+ }
+
+ public void setPriority(int priority) {
+ this.priority = priority;
+ }
+
+ public String[] getSkins() {
+ return skins;
+ }
+
+ public void setSkins(String[] skins) {
+ this.skins = skins;
+ }
+
+ public int compareTo(Object o) {
+ int result = new
Integer(((ProfilePluginModule)o).getPriority()).compareTo(this.getPriority());
+ return result == 0
+ ? this.getKey().compareTo( ((ProfilePluginModule)o).getKey() )
+ : result;
+ }
+
+}
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd 2008-06-20
05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/plugin/plugin-1.0.xsd 2008-06-20
17:44:36 UTC (rev 8398)
@@ -3,6 +3,8 @@
targetNamespace="http://jboss.com/products/seam/wiki/plugin"
xmlns:plugin="http://jboss.com/products/seam/wiki/plugin">
+ <!-- Plugin root -->
+
<xs:element name="plugin">
<xs:annotation>
<xs:documentation>Wiki plugin.</xs:documentation>
@@ -11,6 +13,7 @@
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1"
ref="plugin:plugin-info"/>
<xs:element minOccurs="0" maxOccurs="unbounded"
ref="plugin:macro"/>
+ <xs:element minOccurs="0" maxOccurs="unbounded"
ref="plugin:profile"/>
</xs:sequence>
<xs:attribute name="key" type="xs:string"
use="required">
<xs:annotation>
@@ -28,6 +31,8 @@
</xs:complexType>
</xs:element>
+ <!-- Plugin details -->
+
<xs:element name="plugin-info">
<xs:annotation>
<xs:documentation>
@@ -36,8 +41,18 @@
</xs:annotation>
<xs:complexType>
<xs:all>
- <xs:element ref="plugin:application-version"/>
- <xs:element ref="plugin:vendor"/>
+ <xs:element name="application-version">
+ <xs:complexType>
+ <xs:attribute name="min" type="xs:string"
use="required"/>
+ <xs:attribute name="max" type="xs:string"
use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vendor">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string"
use="required"/>
+ <xs:attribute name="url" type="xs:string"
use="required"/>
+ </xs:complexType>
+ </xs:element>
</xs:all>
<xs:attribute name="description" type="xs:string">
<xs:annotation>
@@ -50,20 +65,8 @@
</xs:complexType>
</xs:element>
- <xs:element name="application-version">
- <xs:complexType>
- <xs:attribute name="min" type="xs:string"
use="required"/>
- <xs:attribute name="max" type="xs:string"
use="required"/>
- </xs:complexType>
- </xs:element>
+ <!-- Macro module -->
- <xs:element name="vendor">
- <xs:complexType>
- <xs:attribute name="name" type="xs:string"
use="required"/>
- <xs:attribute name="url" type="xs:string"
use="required"/>
- </xs:complexType>
- </xs:element>
-
<xs:element name="macro">
<xs:annotation>
<xs:documentation>
@@ -72,24 +75,7 @@
</xs:annotation>
<xs:complexType>
<xs:all>
- <xs:element name="skins">
- <xs:complexType>
- <xs:sequence maxOccurs="unbounded">
- <xs:element name="skin">
- <xs:complexType>
- <xs:attribute name="name"
type="xs:string" use="required">
- <xs:annotation>
- <xs:documentation>
- Wiki skins this macro is available in,
e.g. "d" for desktop and "m" for mobile skins.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
-
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
+ <xs:element minOccurs="1" maxOccurs="1"
ref="plugin:skins"/>
<xs:element name="applicable-to">
<xs:annotation>
<xs:documentation>
@@ -122,38 +108,71 @@
</xs:element>
<xs:element minOccurs="0"
ref="plugin:cache-regions"/>
</xs:all>
- <xs:attribute name="key" type="xs:string"
use="required">
+ <xs:attribute name="name" type="xs:string"
use="required">
<xs:annotation>
<xs:documentation>
- Plugin module key, unique within the plugin.
+ The name of the wiki text macro.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="label" type="xs:string">
+ <xs:attributeGroup ref="plugin:key"/>
+ <xs:attributeGroup ref="plugin:labelDescription"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Profile module -->
+
+ <xs:element name="profile">
+ <xs:annotation>
+ <xs:documentation>
+ Plugin module for user profile screen
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:all>
+ <xs:element minOccurs="1" maxOccurs="1"
ref="plugin:skins"/>
+ </xs:all>
+ <xs:attribute name="template" type="xs:string"
use="required">
<xs:annotation>
<xs:documentation>
- Plain text description of plugin module, used in menus.
- If empty, the key is looked up in the message bundles.
+ The name of the XHTML template to include on the profile screen.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="name" type="xs:string"
use="required">
+ <xs:attribute name="priority" type="xs:int"
use="required">
<xs:annotation>
<xs:documentation>
- The name of the wiki text macro.
+ Priority of rendering position, compared to other profile plugin
modules.
+ Lowest values are rendered first, use values greater than 100.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="description" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- Short English description/documentation of the plugin.
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
+ <xs:attributeGroup ref="plugin:key"/>
+ <xs:attributeGroup ref="plugin:labelDescription"/>
</xs:complexType>
</xs:element>
+
+ <!-- Commons -->
+
+ <xs:element name="skins">
+ <xs:complexType>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="skin">
+ <xs:complexType>
+ <xs:attribute name="name" type="xs:string"
use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Wiki skins this plugin can be rendered in, e.g.
"d" for desktop and "m" for mobile skins.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
<xs:element name="cache-regions">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
@@ -186,5 +205,41 @@
</xs:complexType>
</xs:element>
+ <xs:attributeGroup name="key">
+ <xs:attribute name="key" type="xs:string"
use="required">
+ <xs:annotation>
+ <xs:documentation>
+ Plugin module key, unique within the plugin.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name="labelDescription">
+ <xs:attribute name="label" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Plain text description of plugin module, used in menus.
+ If empty, the key is looked up in the message bundles.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="description" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>
+ Short English description/documentation of the plugin.
+ If empty, the key is looked up in the message bundles.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:attributeGroup>
+
+
+
+
+
+
+
+
+
</xs:schema>
\ No newline at end of file
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiURLRenderer.java
===================================================================
---
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiURLRenderer.java 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/WikiURLRenderer.java 2008-06-20
17:44:36 UTC (rev 8398)
@@ -66,11 +66,11 @@
return url.toString();
}
- public String renderUserInfoURL(User user) {
- return renderUserInfoURL(user, false);
+ public String renderUserProfileURL(User user) {
+ return renderUserProfileURL(user, false);
}
- public String renderUserInfoURL(User user, boolean usePrefsPath) {
+ public String renderUserProfileURL(User user, boolean usePrefsPath) {
if (user == null || user.getUsername() == null) return "";
StringBuilder url = new StringBuilder();
url.append(usePrefsPath ? prefs.getBaseUrl() : contextPath);
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/Basic.plugin.xml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -169,5 +169,12 @@
-->
</macro>
+ <profile key="userSummary" template="profile_userSummary"
priority="10">
+ <skins>
+ <skin name="d"/>
+ <skin name="m"/>
+ </skins>
+ </profile>
+
</plugin>
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-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/i18n/messages_basic_en.properties 2008-06-20
17:44:36 UTC (rev 8398)
@@ -81,3 +81,16 @@
basic.userProfile.label=User Profile
basic.userProfile.description=Display the profile of the current document owner/creator
+
+basic.userSummary.label=User Summary
+basic.userSummary.description=Display a summary of a users statistics
+basic.userSummary.label.Portrait=Portrait
+basic.userSummary.label.Bio=Bio
+basic.userSummary.label.Website=Website
+basic.userSummary.label.Location=Location
+basic.userSummary.label.Occupation=Occupation
+basic.userSummary.label.JoinedOn=Joined
+basic.userSummary.label.LastLoginOn=Last Login
+basic.userSummary.label.RatingPoints=Rating Points
+basic.userSummary.label.NotActivated=Not Activated
+basic.userSummary.button.GoToUserHome=Go to users home
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/lastModifiedDocuments.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/lastModifiedDocuments.xhtml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/lastModifiedDocuments.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -31,7 +31,7 @@
<s:fragment
rendered="#{preferences.get('LastModifiedDocuments',
currentMacro).showUsernames}">
(<s:span styleClass="undecoratedLink"
rendered="#{wiki:isRegularUser(doc.lastModifiedBy)}">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(doc.lastModifiedBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(doc.lastModifiedBy)}">
<h:outputText
value="#{doc.lastModifiedBy.username}"/>
</h:outputLink>
</s:span>
Added:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/profile_userSummary.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/profile_userSummary.xhtml
(rev 0)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/basic/templates/profile_userSummary.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -0,0 +1,111 @@
+<s:fragment
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:wiki="http://jboss.com/products/seam/wiki"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:div styleClass="box">
+
+ <s:div styleClass="boxHeader">
+
+ <h:panelGrid columns="3" style="width:100%;"
+ columnClasses="noWrapWhitespace alignLeft, fullWidth
alignRight, noWrapWhitespace alignRight"
+ cellpadding="0" cellspacing="0"
border="0">
+
+ <h:outputText value="#{userHome.instance.fullname}"/>
+
+ <s:fragment>
+ <h:outputLink rendered="#{wiki:showEmailAddress() and not
userHome.instance.guest}"
+ styleClass="smallFont minorPadding"
+
value="#{wiki:escapeEmailURL(wiki:concat('mailto:',
userHome.instance.email))}">
+ <h:outputText
value="#{wiki:escapeAtSymbol(userHome.instance.email)}"/>
+ </h:outputLink>
+ </s:fragment>
+
+ <s:fragment>
+ <h:outputLink styleClass="buttonNonpersistent"
+
value="#{wikiURLRenderer.renderURL(userHome.instance.memberHome)}"
+ rendered="#{!empty
userHome.instance.memberHome}">
+ <h:outputText styleClass="buttonLabel"
value="#{messages['basic.userSummary.button.GoToUserHome']}"/>
+ </h:outputLink>
+ </s:fragment>
+
+ </h:panelGrid>
+
+ </s:div>
+
+ <s:div styleClass="boxContent">
+
+ <h:panelGrid columns="2"
+ styleClass="wideEntry" columnClasses="label,
output"
+ cellpadding="0" cellspacing="0"
border="0">
+
+ <h:outputText
value="#{messages['basic.userSummary.label.Portrait']}:"
+ rendered="#{!empty
userHome.instance.profile.imageContentType}"/>
+
+ <s:graphicImage rendered="#{!empty
userHome.instance.profile.imageContentType}"
+ styleClass="userInfoPortraitImage"
value="#{userHome.instance.profile.image}">
+ <s:transformImageSize width="80"
maintainRatio="true"/>
+ </s:graphicImage>
+
+ <h:outputText
value="#{messages['basic.userSummary.label.Bio']}:"
+ rendered="#{not empty
userHome.instance.profile.bio}"/>
+
+ <s:span styleClass="inlineWikiText" rendered="#{not
empty userHome.instance.profile.bio}">
+ <wiki:formattedText
value="#{userHome.instance.profile.bio}"
+ linkStyleClass="regularLink"
+ brokenLinkStyleClass="brokenLink"
+ attachmentLinkStyleClass="regularLink"
+ thumbnailLinkStyleClass="regularLink"
+ linkBaseFile="#{wikiStart}"
+
currentAreaNumber="#{wikiStart.areaNumber}"
+ internalTargetFrame="_top"
+ externalTargetFrame="_top"
+ enableMacroRendering="false"/>
+ </s:span>
+
+ <h:outputText
value="#{messages['basic.userSummary.label.Website']}:"
+ rendered="#{not empty
userHome.instance.profile.website}"/>
+ <h:outputLink target="_top"
value="#{userHome.instance.profile.website}"
+ rendered="#{not empty
userHome.instance.profile.website}">
+ <h:outputText
value="#{wiki:truncateString(userHome.instance.profile.website, 150,
'...')}"/>
+ </h:outputLink>
+
+ <h:outputText
value="#{messages['basic.userSummary.label.Location']}:"
+ rendered="#{not empty
userHome.instance.profile.location}"/>
+ <h:outputText value="#{userHome.instance.profile.location}"
+ rendered="#{not empty
userHome.instance.profile.location}"/>
+
+ <h:outputText
value="#{messages['basic.userSummary.label.Occupation']}:"
+ rendered="#{not empty
userHome.instance.profile.occupation}"/>
+ <h:outputText
value="#{userHome.instance.profile.occupation}"
+ rendered="#{not empty
userHome.instance.profile.occupation}"/>
+
+ <h:outputText
value="#{messages['basic.userSummary.label.JoinedOn']}:"/>
+ <s:span>
+ <h:outputText
value="#{userHome.instance.createdOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+ <h:outputText
value=" (#{messages['basic.userSummary.label.NotActivated']})"
+ rendered="#{wiki:isRegularUser(userHome.instance)
and not userHome.instance.activated}"/>
+ </s:span>
+
+ <h:outputText
value="#{messages['basic.userSummary.label.LastLoginOn']}:"/>
+ <h:outputText value="#{userHome.instance.lastLoginOn}">
+ <f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
+ </h:outputText>
+
+ <h:outputText
value="#{messages['basic.userSummary.label.RatingPoints']}:"/>
+ <h:outputText value="#{userHome.ratingPoints}"/>
+
+ </h:panelGrid>
+
+ </s:div>
+
+ </s:div>
+
+ <div class="boxFooter"/>
+
+</s:fragment>
\ No newline at end of file
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/blog/templates/blogDirectory.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -33,7 +33,7 @@
rendered="#{!empty
blogEntry.entryDocument.createdBy.memberHome}">
<h:outputText
value="#{blogEntry.entryDocument.createdBy.fullname}"/>
</h:outputLink>
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(blogEntry.entryDocument.createdBy)}"
target="_top"
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(blogEntry.entryDocument.createdBy)}"
target="_top"
rendered="#{empty
blogEntry.entryDocument.createdBy.memberHome}">
<h:outputText
value="#{blogEntry.entryDocument.createdBy.fullname}"/>
</h:outputLink>
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/faqBrowser/templates/faqControls.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -101,7 +101,7 @@
<f:convertDateTime pattern="dd. MMM yyyy,
HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(q.lastModifiedBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(q.lastModifiedBy)}">
<h:outputText
value="#{q.lastModifiedBy.username}"/>
</h:outputLink>
</s:span>)
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/feed/templates/feedAggregator.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -96,7 +96,7 @@
</div>
- <s:div styleClass="feedAggregatorEmpty"
+ <s:div styleClass="feedAggregatorEmpty minorPadding"
rendered="#{empty feedAggregator.getFeedEntries(currentMacro) or
feedAggregator.getFeedEntries(currentMacro).size() ==
0}">
<h:outputText
value="#{messages['feed.aggregator.label.NoEntriesFound']}"/>
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumPostingHeader.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -99,7 +99,7 @@
</s:div>
<s:div rendered="#{currentDocument.ownedByRegularUser}">
<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(currentDocument.createdBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(currentDocument.createdBy)}">
<h:outputText
value="#{currentDocument.createdBy.fullname}"/>
</h:outputLink>
</s:span>
@@ -117,7 +117,7 @@
<s:fragment rendered="#{currentDocument.ownedByRegularUser and !empty
currentDocument.createdBy.profile.imageContentType}">
<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(currentDocument.createdBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(currentDocument.createdBy)}">
<s:graphicImage
styleClass="commentAuthorPortraitImage"
value="#{currentDocument.createdBy.profile.image}">
<s:transformImageSize width="30"
maintainRatio="true"/>
</s:graphicImage>
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/forumTopPosters.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -38,7 +38,7 @@
<f:facet name="header">
<h:outputText
value="#{messages['forum.topPosters.label.User']}"/>
</f:facet>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user" value="#{p}"/>
</ui:include>
</h:column>
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/lastTopicPost.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -21,7 +21,7 @@
</h:outputText>
</s:div>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user" value="#{createdBy}"/>
</ui:include>
Modified:
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml
===================================================================
---
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml 2008-06-20
05:23:39 UTC (rev 8397)
+++
trunk/examples/wiki/src/plugin/org/jboss/seam/wiki/plugin/forum/templates/topicTable.xhtml 2008-06-20
17:44:36 UTC (rev 8398)
@@ -51,7 +51,7 @@
<h:column>
<f:facet name="header">Author</f:facet>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user"
value="#{t.topic.createdBy}"/>
</ui:include>
@@ -68,7 +68,7 @@
<h:graphicImage styleClass="topicGotoIcon"
value="#{currentMacro.requestImagePath}/icon.posting_goto.gif"
width="18" height="9"/>
</h:outputLink>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user"
value="#{t.lastComment.createdBy}"/>
</ui:include>
@@ -82,7 +82,7 @@
<h:graphicImage styleClass="topicGotoIcon"
value="#{currentMacro.requestImagePath}/icon.posting_goto.gif"
width="18" height="9"/>
</h:outputLink>
- <ui:include src="/includes/userInfoLink.xhtml">
+ <ui:include src="/includes/userProfileLink.xhtml">
<ui:param name="user"
value="#{t.topic.createdBy}"/>
</ui:include>
Modified: trunk/examples/wiki/view/dirDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/dirDisplay_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -359,7 +359,7 @@
</ui:include>
<s:span styleClass="undecoratedLink"
rendered="#{node.ownedByRegularUser}">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(node.createdBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(node.createdBy)}">
<h:outputText
value="#{node.createdBy.fullname}"/>
</h:outputLink>
</s:span>
@@ -394,7 +394,7 @@
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(node.lastModifiedBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(node.lastModifiedBy)}">
<h:outputText
value="#{node.lastModifiedBy.username}"/>
</h:outputLink>
</s:span>)
Modified: trunk/examples/wiki/view/docDisplay_m.xhtml
===================================================================
--- trunk/examples/wiki/view/docDisplay_m.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/docDisplay_m.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -236,7 +236,7 @@
</h:outputText>
<s:div
rendered="#{c.ownedByRegularUser}">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(c.createdBy)}">
<h:outputText
value="#{c.createdBy.fullname}"/>
</h:outputLink>
<s:fragment
rendered="#{wiki:showEmailAddress()}">
Modified: trunk/examples/wiki/view/includes/commentsDisplay.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-06-20 05:23:39 UTC (rev
8397)
+++ trunk/examples/wiki/view/includes/commentsDisplay.xhtml 2008-06-20 17:44:36 UTC (rev
8398)
@@ -71,7 +71,7 @@
</s:div>
<s:div rendered="#{c.ownedByRegularUser}">
<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(c.createdBy)}">
<h:outputText
value="#{c.createdBy.fullname}"/>
</h:outputLink>
</s:span>
@@ -98,7 +98,7 @@
<s:fragment rendered="#{c.ownedByRegularUser and !empty
c.createdBy.profile.imageContentType}">
<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(c.createdBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(c.createdBy)}">
<s:graphicImage
styleClass="commentAuthorPortraitImage"
value="#{c.createdBy.profile.image}">
<s:transformImageSize width="30"
maintainRatio="true"/>
</s:graphicImage>
Modified: trunk/examples/wiki/view/includes/userControl.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userControl.xhtml 2008-06-20 05:23:39 UTC (rev
8397)
+++ trunk/examples/wiki/view/includes/userControl.xhtml 2008-06-20 17:44:36 UTC (rev
8398)
@@ -139,16 +139,15 @@
<h:outputLink styleClass="link" tabindex="70"
accesskey="#{messages['lacewiki.button.userControl.Home.accesskey']}"
value="#{wikiURLRenderer.renderURL(currentUser.memberHome)}"
- rendered="#{!empty currentUser.memberHome}">
+ rendered="#{!empty currentUser.memberHome}">
<h:outputText styleClass="linkText" escape="false"
value="#{messages['lacewiki.button.userControl.Home']}"/>
</h:outputLink>
- <s:link styleClass="link" tabindex="70"
-
accesskey="#{messages['lacewiki.button.userControl.Profile.accesskey']}"
- view="/userHome_#{skin}.xhtml"
propagation="none">
+ <h:outputLink styleClass="link" tabindex="70"
+
accesskey="#{messages['lacewiki.button.userControl.Profile.accesskey']}"
+
value="#{wikiURLRenderer.renderUserProfileURL(currentUser)}">
<h:outputText styleClass="linkText" escape="false"
value="#{messages['lacewiki.button.userControl.Profile']}"/>
- <f:param name="userId" value="#{currentUser.id}"/>
- </s:link>
+ </h:outputLink>
<s:link styleClass="link" tabindex="70"
accesskey="#{messages['lacewiki.button.userControl.Members.accesskey']}"
Modified: trunk/examples/wiki/view/includes/userInfo.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userInfo.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/includes/userInfo.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -11,7 +11,11 @@
<div class="box">
<div class="boxHeader">
- <h:outputText value="#{user.fullname}"/>
+ <s:span styleClass="undecoratedLink">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(user)}">
+ <h:outputText value="#{user.fullname}"/>
+ </h:outputLink>
+ </s:span>
<s:div styleClass="userInfoEmail smallFont"
rendered="#{wiki:showEmailAddress()}">
<h:outputLink
value="#{wiki:escapeEmailURL(wiki:concat('mailto:', user.email))}">
<h:outputText
value="#{wiki:escapeAtSymbol(user.email)}"/>
Deleted: trunk/examples/wiki/view/includes/userInfoLink.xhtml
===================================================================
--- trunk/examples/wiki/view/includes/userInfoLink.xhtml 2008-06-20 05:23:39 UTC (rev
8397)
+++ trunk/examples/wiki/view/includes/userInfoLink.xhtml 2008-06-20 17:44:36 UTC (rev
8398)
@@ -1,20 +0,0 @@
-<s:fragment
-
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:c="http://java.sun.com/jstl/core"
-
xmlns:wiki="http://jboss.com/products/seam/wiki"
-
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
-
xmlns:s="http://jboss.com/products/seam/taglib">
-
- <s:div styleClass="undecoratedLink"
rendered="#{wiki:isRegularUser(user)}">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(user)}">
- <h:outputText value="#{user.fullname}"/>
- </h:outputLink>
- </s:div>
- <s:div rendered="#{not wiki:isRegularUser(user)}">
- <h:outputText value="#{user.fullname}"/>
- </s:div>
-
-</s:fragment>
\ No newline at end of file
Copied: trunk/examples/wiki/view/includes/userProfileLink.xhtml (from rev 8385,
trunk/examples/wiki/view/includes/userInfoLink.xhtml)
===================================================================
--- trunk/examples/wiki/view/includes/userProfileLink.xhtml (rev
0)
+++ trunk/examples/wiki/view/includes/userProfileLink.xhtml 2008-06-20 17:44:36 UTC (rev
8398)
@@ -0,0 +1,20 @@
+<s:fragment
+
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:c="http://java.sun.com/jstl/core"
+
xmlns:wiki="http://jboss.com/products/seam/wiki"
+
xmlns:a="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <s:div styleClass="undecoratedLink"
rendered="#{wiki:isRegularUser(user)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(user)}">
+ <h:outputText value="#{user.fullname}"/>
+ </h:outputLink>
+ </s:div>
+ <s:div rendered="#{not wiki:isRegularUser(user)}">
+ <h:outputText value="#{user.fullname}"/>
+ </s:div>
+
+</s:fragment>
\ No newline at end of file
Property changes on: trunk/examples/wiki/view/includes/userProfileLink.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/examples/wiki/view/tagDisplay_d.xhtml
===================================================================
--- trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/tagDisplay_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -85,7 +85,7 @@
<h:outputText
value="#{messages['lacewiki.label.tagDisplay.Owner']}"/>
</f:facet>
<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(file.createdBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(file.createdBy)}">
<h:outputText value="#{file.createdBy.fullname}"/>
</h:outputLink>
</s:span>
@@ -106,7 +106,7 @@
<f:convertDateTime pattern="dd. MMM yyyy, HH:mm"
timeZone="#{preferences.get('Wiki').timeZone}"/>
</h:outputText>
(<s:span styleClass="undecoratedLink">
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(file.lastModifiedBy)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(file.lastModifiedBy)}">
<h:outputText
value="#{file.lastModifiedBy.username}"/>
</h:outputLink>
</s:span>)
Modified: trunk/examples/wiki/view/themes/default/css/template.css
===================================================================
--- trunk/examples/wiki/view/themes/default/css/template.css 2008-06-20 05:23:39 UTC (rev
8397)
+++ trunk/examples/wiki/view/themes/default/css/template.css 2008-06-20 17:44:36 UTC (rev
8398)
@@ -653,6 +653,29 @@
margin-left: 240px;
}
+.wideEntry {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+.wideEntry .label {
+ color: #000000;
+ font-weight:bold;
+ font-size: 85%;
+ vertical-align: top;
+ padding-right: 10px;
+ padding-top: 10px;
+ white-space: nowrap;
+}
+
+.wideEntry .output {
+ padding-top: 10px;
+}
+
+.wideEntry .output .inlineWikiText .wikiPara:first-child {
+ display: inline;
+}
+
.errorEntry {
background-color: #ffeeee;
}
Modified: trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css
===================================================================
--- trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-06-20 05:23:39
UTC (rev 8397)
+++ trunk/examples/wiki/view/themes/inrelationto/css/inrelationto.css 2008-06-20 17:44:36
UTC (rev 8398)
@@ -665,6 +665,28 @@
margin-left: 240px;
}
+.wideEntry {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+.wideEntry .label {
+ color: #000000;
+ font-weight:bold;
+ vertical-align: top;
+ padding-right: 10px;
+ padding-top: 10px;
+ white-space: nowrap;
+}
+
+.wideEntry .output {
+ padding-top: 10px;
+}
+
+.wideEntry .output .inlineWikiText .wikiPara:first-child {
+ display: inline;
+}
+
.errorEntry {
background-color: #ffeeee;
}
@@ -1391,13 +1413,12 @@
.boxFooter {
background: #d3d2c4 url(../img/th.bg.gif) 0 0 repeat-x;
- padding-top: 5px;
padding-left: 10px;
padding-right: 10px;
font-weight: normal;
color: #d75525;
text-decoration: none;
- text-align: right;c
+ text-align: right;
}
/* Plugin Preferences Editor
Modified: trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-06-20 05:23:39 UTC (rev
8397)
+++ trunk/examples/wiki/view/themes/sfwkorg/css/sfwk.css 2008-06-20 17:44:36 UTC (rev
8398)
@@ -950,6 +950,28 @@
margin-left: 240px;
}
+.wideEntry {
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+.wideEntry .label {
+ color: #000000;
+ font-weight:bold;
+ vertical-align: top;
+ padding-right: 10px;
+ padding-top: 10px;
+ white-space: nowrap;
+}
+
+.wideEntry .output {
+ padding-top: 10px;
+}
+
+.wideEntry .output .inlineWikiText .wikiPara:first-child {
+ display: inline;
+}
+
.errorEntry {
background-color: #ffeeee;
}
Modified: trunk/examples/wiki/view/userHome_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userHome_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/userHome_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -15,6 +15,7 @@
<ui:define name="controlTwo">
+ <!-- TODO: This should redirect to the /user/profile page -->
<s:link id="close" styleClass="linkNavigation
sessionEventTrigger" view="/wiki.xhtml" propagation="end"
accesskey="#{messages['lacewiki.button.Close.accesskey']}">
<h:outputText escape="false"
value="#{messages['lacewiki.button.Close']}"/>
Deleted: trunk/examples/wiki/view/userInfo_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userInfo_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/userInfo_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -1,94 +0,0 @@
-<!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:a="https://ajax4jsf.dev.java.net/ajax"
-
xmlns:wiki="http://jboss.com/products/seam/wiki"
-
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
-
-<ui:param name="hideControls" value="#{not
s:hasPermission('User', 'isAdmin', currentUser)}"/>
-
-<ui:define name="screenname">
- <h:outputText value="#{messages['lacewiki.label.userInfo.UserInfo']}
'#{userHome.instance.username}'"/>
-</ui:define>
-
-<ui:define name="controlTwo">
-
- <s:link id="editUser" styleClass="linkNavigation"
-
accesskey="#{messages['lacewiki.button.userInfo.EditAccount.accesskey']}"
- view="/userHome_#{skin}.xhtml" propagation="none"
- rendered="#{s:hasPermission('User', 'isAdmin',
currentUser)}">
- <f:param name="userId"
value="#{userHome.instance.id}"/>
- <h:outputText escape="false"
value="#{messages['lacewiki.button.userInfo.EditAccount']}"/>
- </s:link>
-
-</ui:define>
-
-<ui:define name="content">
-
- <h:panelGrid columns="2" styleClass="userInfo"
cellpadding="0" border="0" cellspacing="0"
- columnClasses="userInfoDetails, userInfoProfile">
-
- <s:div>
-
- <s:div styleClass="box form bottomBorder">
- <s:div styleClass="formHead">
- <h:outputText
value="#{messages['lacewiki.label.userInfo.UserInfo']}
'#{userHome.instance.username}'"/>
- </s:div>
- <s:div styleClass="formFields formBorder">
-
- <s:div styleClass="entry">
- <s:div styleClass="label">
- <h:outputText
value="#{messages['lacewiki.label.userInfo.JoinedOn']}:"/>
- </s:div>
- <s:div styleClass="output">
- <h:outputText
value="#{userHome.instance.createdOn}">
- <f:convertDateTime pattern="dd. MMM yyyy,
HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
- </h:outputText>
- <h:outputText
value=" (#{messages['lacewiki.label.userInfo.NotActivated']})"
- rendered="#{not userHome.instance.admin
and not userHome.instance.guest
- and not
userHome.instance.activated}"/>
- </s:div>
- </s:div>
-
- <s:div styleClass="entry" rendered="#{not empty
userHome.instance.lastLoginOn}">
- <s:div styleClass="label">
- <h:outputText
value="#{messages['lacewiki.label.userInfo.LastLoginOn']}:"/>
- </s:div>
- <s:div styleClass="output">
- <h:outputText
value="#{userHome.instance.lastLoginOn}">
- <f:convertDateTime pattern="dd. MMM yyyy,
HH:mm" timeZone="#{preferences.get('Wiki').timeZone}"/>
- </h:outputText>
- </s:div>
- </s:div>
-
- <s:div styleClass="entry">
- <s:div styleClass="label">
- <h:outputText
value="#{messages['lacewiki.label.userInfo.RatingPoints']}:"/>
- </s:div>
- <s:div styleClass="output">
- <h:outputText
value="#{userHome.ratingPoints}"/>
- </s:div>
- </s:div>
-
- </s:div>
- </s:div>
-
- </s:div>
-
- <s:div>
- <ui:include src="includes/userInfo.xhtml">
- <ui:param name="user"
value="#{userHome.instance}"/>
- </ui:include>
- </s:div>
-
- </h:panelGrid>
-
-</ui:define>
-
-<ui:define name="footer"> </ui:define>
-
-</ui:composition>
Deleted: trunk/examples/wiki/view/userInfo_m.xhtml
===================================================================
--- trunk/examples/wiki/view/userInfo_m.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/userInfo_m.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -1,19 +0,0 @@
-<!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:wiki="http://jboss.com/products/seam/wiki"
-
template="themes/#{preferences.get('Wiki').themeName}/#{skin}/template.xhtml">
-
-<ui:define name="screenname">
- <h:outputText
value="#{messages['lacewiki.label.userInfo.UserInfo']}"/>
-</ui:define>
-
-<ui:define name="content">
- <h:outputText
value="#{messages['lacewiki.label.userHome.NotAvailableForSkin']}"/>
-</ui:define>
-
-</ui:composition>
Modified: trunk/examples/wiki/view/userList_d.xhtml
===================================================================
--- trunk/examples/wiki/view/userList_d.xhtml 2008-06-20 05:23:39 UTC (rev 8397)
+++ trunk/examples/wiki/view/userList_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -160,7 +160,7 @@
<h:outputText rendered="#{!u.activated}"
value=" (#{messages['lacewiki.label.userList.NotActivated']})"/>
<ul>
<li>
- <h:outputLink
value="#{wikiURLRenderer.renderUserInfoURL(u)}">
+ <h:outputLink
value="#{wikiURLRenderer.renderUserProfileURL(u)}">
<h:outputText
value="#{messages['lacewiki.label.userList.View']}"/>
</h:outputLink>
</li>
Copied: trunk/examples/wiki/view/userProfile_d.xhtml (from rev 8385,
trunk/examples/wiki/view/userInfo_d.xhtml)
===================================================================
--- trunk/examples/wiki/view/userProfile_d.xhtml (rev 0)
+++ trunk/examples/wiki/view/userProfile_d.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -0,0 +1,47 @@
+<!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:a="https://ajax4jsf.dev.java.net/ajax"
+
xmlns:wiki="http://jboss.com/products/seam/wiki"
+
xmlns:c="http://java.sun.com/jstl/core"
+
template="themes/#{preferences.get('Wiki').themeName}/template.xhtml">
+
+<ui:param name="hideControls" value="#{not
s:hasPermission('User', 'isAdmin', currentUser)}"/>
+
+<ui:define name="screenname">
+ <h:outputText
value="#{messages['lacewiki.label.userProfile.UserProfile']}
'#{userHome.instance.username}'"/>
+</ui:define>
+
+<ui:define name="controlTwo">
+
+ <s:link id="editUser" styleClass="linkNavigation"
+
accesskey="#{messages['lacewiki.button.userProfile.EditAccount.accesskey']}"
+ view="/userHome_#{skin}.xhtml" propagation="none"
+ rendered="#{s:hasPermission('User', 'isAdmin',
currentUser) or userHome.instance.id == currentUser.id}">
+ <f:param name="userId"
value="#{userHome.instance.id}"/>
+ <h:outputText escape="false"
value="#{messages['lacewiki.button.userProfile.EditAccount']}"/>
+ </s:link>
+
+</ui:define>
+
+<ui:define name="content">
+
+ <h1 class="documentTitle">
+ <h:outputText
value="#{messages['lacewiki.label.userProfile.UserProfile']}
'#{userHome.instance.username}'"/>
+ </h1>
+
+ <s:div>
+ <c:forEach var="pm"
items="#{pluginRegistry.profilePluginModulesAsList}">
+ <ui:include
src="/#{pm.plugin.getPackageDefaultTemplatePath(pm.template)}"/>
+ </c:forEach>
+ </s:div>
+
+</ui:define>
+
+<ui:define name="footer"> </ui:define>
+
+</ui:composition>
Property changes on: trunk/examples/wiki/view/userProfile_d.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Copied: trunk/examples/wiki/view/userProfile_m.xhtml (from rev 8385,
trunk/examples/wiki/view/userInfo_m.xhtml)
===================================================================
--- trunk/examples/wiki/view/userProfile_m.xhtml (rev 0)
+++ trunk/examples/wiki/view/userProfile_m.xhtml 2008-06-20 17:44:36 UTC (rev 8398)
@@ -0,0 +1,19 @@
+<!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:wiki="http://jboss.com/products/seam/wiki"
+
template="themes/#{preferences.get('Wiki').themeName}/#{skin}/template.xhtml">
+
+<ui:define name="screenname">
+ <h:outputText
value="#{messages['lacewiki.label.userInfo.UserInfo']}"/>
+</ui:define>
+
+<ui:define name="content">
+ <h:outputText
value="#{messages['lacewiki.label.userHome.NotAvailableForSkin']}"/>
+</ui:define>
+
+</ui:composition>
Property changes on: trunk/examples/wiki/view/userProfile_m.xhtml
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native