From: <jbo...@li...> - 2006-04-18 17:21:33
|
Author: unibrew Date: 2006-04-18 13:21:24 -0400 (Tue, 18 Apr 2006) New Revision: 3766 Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewProfile.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/usermessage_body.xhtml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/viewprofile_body.xhtml Removed: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/user/ Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml Log: [JBFORUMS-38] Adding files for UserView + configuring everything. Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java 2006-04-18 13:54:52 UTC (rev 3765) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java 2006-04-18 17:21:24 UTC (rev 3766) @@ -36,6 +36,7 @@ public static final String p_categoryId = "c"; public static final String p_forumId = "f"; public static final String p_topicId = "t"; + public static final String p_userId = "uid"; public static final String p_option = "o"; public static final String p_poll_title = "POLL_TITLE"; public static final String p_poll_delete = "POLL_DELETE"; Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewProfile.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewProfile.java 2006-04-18 13:54:52 UTC (rev 3765) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewProfile.java 2006-04-18 17:21:24 UTC (rev 3766) @@ -0,0 +1,76 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ + +package org.jboss.portlet.forums.ui.view; + +import org.jboss.portlet.forums.model.Poster; +import org.jboss.portlet.forums.ui.BaseController; +import org.jboss.portlet.forums.ui.Constants; +import org.jboss.portlet.forums.ui.ForumUtil; +import org.jboss.portlet.forums.ui.JSFUtil; + +/** + * @author <a href="mailto:rys...@jb...">Ryszard Kozmik</a> + */ +public class ViewProfile extends BaseController +{ + + private Poster poster; + + + public Poster getPoster() + { + return poster; + } + + /** + * @author Ryszard Kozmik + */ + public ViewProfile() + { + + super(); + try + { + this.execute(); + } + catch(Exception e) + { + JSFUtil.handleException(e); + } + + } + + //ui actions supported by this bean---------------------------------------------------------------------------------------------------- + /** + * This method gets userId from parameters and tries to find Poster with this uid. + */ + private void execute() throws Exception + { + String userId = ForumUtil.getParameter(Constants.p_userId); + if(userId!=null && !userId.trim().equals("")) + { + this.poster = BaseController.getForumsModule().findPosterByUserId(userId); + } + } + +} Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java 2006-04-18 13:54:52 UTC (rev 3765) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java 2006-04-18 17:21:24 UTC (rev 3766) @@ -102,7 +102,7 @@ //ui actions supported by this bean---------------------------------------------------------------------------------------------------- /** - * this generates topic + * This method gets topicId from parameters and tries to find topic with that id. */ private void execute() throws Exception { Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/usermessage_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/usermessage_body.xhtml 2006-04-18 13:54:52 UTC (rev 3765) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/usermessage_body.xhtml 2006-04-18 17:21:24 UTC (rev 3766) @@ -0,0 +1,35 @@ +<!-- +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ +--> + +<div xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:c="http://java.sun.com/jstl/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:forums="http://www.jboss.com/products/jbossportal/forums" class="bb"> + <ui:include src="/views/common/common.xhtml"/> + + <h:outputText value="VIEW SHOWING AN EDITOR OF MEESSAGE SENT TO USER" /> + +</div> \ No newline at end of file Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/viewprofile_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/viewprofile_body.xhtml 2006-04-18 13:54:52 UTC (rev 3765) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/profile/viewprofile_body.xhtml 2006-04-18 17:21:24 UTC (rev 3766) @@ -0,0 +1,143 @@ +<!-- +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, JBoss Inc., and individual contributors as indicated +* by the @authors tag. See the copyright.txt in the distribution for a +* full listing of individual contributors. +* +* This is free software; you can redistribute it and/or modify it +* under the terms of the GNU Lesser General Public License as +* published by the Free Software Foundation; either version 2.1 of +* the License, or (at your option) any later version. +* +* This software is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this software; if not, write to the Free +* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA, or see the FSF site: http://www.fsf.org. +*/ +--> + +<div xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets" + xmlns:c="http://java.sun.com/jstl/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:forums="http://www.jboss.com/products/jbossportal/forums" class="bb"> + <ui:include src="/views/common/common.xhtml"/> + + +<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> + <tr> + <%-- <td align="left"><span class="nav"><a href="${n:out("U_INDEX")}" class="nav">${n:out("L_INDEX")}</a></span></td>--%> + <td align="left" valign="middle" width="100%"><span class="nav"> <a href="${n:out("U_VIEW_MAIN_PAGE")}" class="nav">${n:out("MAIN_PAGE_NAME")}</a> + <!---> <a href="${n:out("U_VIEW_CATEGORY")}" class="nav">${n:out("CATEGORY_NAME")}</a> + -> <a href="${n:out("U_VIEW_FORUM")}" class="nav">${n:out("FORUM_NAME")}</a>--></span></td> + </tr> +</table> + +<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0" align="center"> + <tr> + <th class="thHead" colspan="2" height="25" nowrap="nowrap">${n:i18n("L_VIEWING_PROFILE")}</th> + </tr> +<%-- <tr> + <td class="catLeft" width="40%" height="28" align="center"><b><span class="gen">${n:i18n("L_AVATAR")}</span></b> + </td> + <td class="catRight" width="60%"><b><span class="gen">${n:i18n("L_ABOUT_USER")}</span></b></td> + </tr>--%> + <tr> + <!--<td class="row1" height="6" valign="top" align="center">${n:out("AVATAR_IMG")}<br/><span + class="postdetails">${n:out("POSTER_RANK")}</span></td>--> + <td class="row1" rowspan="3" valign="top"> + <table width="100%" border="0" cellspacing="1" cellpadding="3"> + <tr> + <td valign="middle" align="right" nowrap="nowrap"><span class="gen">${n:i18n("L_JOINED")}: </span> + </td> + <td width="100%"><b><span class="gen">${n:out("JOINED")}</span></b></td> + </tr> + <tr> + <td valign="top" align="right" nowrap="nowrap"><span class="gen">${n:i18n("L_TOTAL_POSTS")}: </span> + </td> + <td valign="top"><b><span class="gen">${n:out("POSTS")}</span></b><%--<br/><span + class="genmed">[${n:out("POST_PERCENT_STATS")} / ${n:out("POST_DAY_STATS")}]</span> <br/><span + class="genmed"><a href="${n:out("U_SEARCH_USER")}" class="genmed">${n:i18n("L_SEARCH_USER_POSTS")}</a></span>--%> + </td> + </tr> + <tr> + <td valign="middle" align="right" nowrap="nowrap"><span class="gen">${n:i18n("L_LOCATION")}: </span> + </td> + <td><b><span class="gen">${n:out("LOCATION")}</span></b></td> + </tr> + <tr> + <td valign="middle" align="right" nowrap="nowrap"><span class="gen">${n:i18n("L_WEBSITE")}: </span> + </td> + <td><span class="gen"><b>${n:out("WWW")}</b></span></td> + </tr> + <tr> + <td valign="middle" align="right" nowrap="nowrap"><span + class="gen">${n:i18n("L_OCCUPATION")}: </span></td> + <td><b><span class="gen">${n:out("OCCUPATION")}</span></b></td> + </tr> + <tr> + <td valign="top" align="right" nowrap="nowrap"><span class="gen">${n:i18n("L_INTERESTS")}:</span></td> + <td><b><span class="gen">${n:out("INTERESTS")}</span></b></td> + </tr> + </table> + </td> + </tr> + <tr> + <td class="catLeft" align="center" height="28"><b><span + class="gen">${n:i18n("L_CONTACT")}: ${n:out("USERNAME")} </span></b></td> + </tr> + <tr> + <td class="row1" valign="top"> + <table width="100%" border="0" cellspacing="1" cellpadding="3"> + <tr> + <td valign="middle" align="right" nowrap="nowrap"><span class="gen">${n:i18n("L_EMAIL_ADDRESS")}:</span> + </td> + <td class="row1" valign="middle" width="100%"><b><span class="gen">${n:out("EMAIL_IMG")}</span></b></td> + </tr> + <tr> + <td valign="middle" nowrap="nowrap" align="right"><span class="gen">${n:i18n("L_SKYPE")}:</span></td> + <td class="row1" valign="middle"<span class="gen">${n:out("SKYPE_IMG")}</span></td> + </tr> + <tr> + <td valign="middle" nowrap="nowrap" align="right"><span class="gen">${n:i18n("L_MESSENGER")}:</span></td> + <td class="row1" valign="middle"><span class="gen">${n:out("MSN_IMG")}</span></td> + </tr> + <tr> + <td valign="middle" nowrap="nowrap" align="right"><span class="gen">${n:i18n("L_YAHOO")}:</span></td> + <td class="row1" valign="middle"><span class="gen">${n:out("YIM_IMG")}</span></td> + </tr> + <tr> + <td valign="middle" nowrap="nowrap" align="right"><span class="gen">${n:i18n("L_AIM")}:</span></td> + <td class="row1" valign="middle"><span class="gen">${n:out("AIM_IMG")}</span></td> + </tr> + <tr> + <td valign="middle" nowrap="nowrap" align="right"><span class="gen">${n:i18n("L_ICQ_NUMBER")}:</span></td> + <td class="row1"><script language="JavaScript" type="text/javascript"><!-- + + if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 ) + document.write(' ${n:out("ICQ_IMG")}'); + else + document.write('<table cellspacing="0" cellpadding="0" border="0"><tr><td nowrap="nowrap"><div style="position:relative;height:18px"><div style="position:absolute">${n:out("ICQ_IMG")}</div><div style="position:absolute;left:3px;top:-1px">${n:out("ICQ_STATUS_IMG")}</div></div></td></tr></table>'); + + //--></script><noscript>${n:out("ICQ_IMG")}</noscript></td> + </tr> + </table> + </td> + </tr> +</table> + +<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> + <tr> + <td align="right"><span class="nav"><br/>${n:out("JUMPBOX")}</span></td> + </tr> +</table> + + +</div> \ No newline at end of file Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-04-18 13:54:52 UTC (rev 3765) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-04-18 17:21:24 UTC (rev 3766) @@ -274,7 +274,7 @@ <tr> <td valign="middle" nowrap="nowrap"> - <h:outputLink value="#{forums:outputLink(shared.links['user'],true)}" style="text-decoration: none;"> + <h:outputLink value="#{forums:outputLink(shared.links['profile'],true)}" style="text-decoration: none;"> <f:param name="uid" value="#{postrow.poster.user.id}"/> <f:verbatim> |