mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
User Profile for any user now visible by clicking a username link in the Manage Space/Content Users screens
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7510 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1289,7 +1289,7 @@ user_organization=Organization
|
|||||||
user_jobtitle=Job Title
|
user_jobtitle=Job Title
|
||||||
user_location=Location
|
user_location=Location
|
||||||
user_description=Biography
|
user_description=Biography
|
||||||
user_avatar=Photo
|
user_avatar=Avatar
|
||||||
|
|
||||||
# Trashcan messages
|
# Trashcan messages
|
||||||
title_deleted_items=Deleted Items
|
title_deleted_items=Deleted Items
|
||||||
@@ -1426,6 +1426,8 @@ title_edit_user_details=Edit User Details
|
|||||||
user_console=User Profile
|
user_console=User Profile
|
||||||
user_console_info=User Profile and Settings
|
user_console_info=User Profile and Settings
|
||||||
user_console_description=Use this page to change your visible profile, preferences and application settings
|
user_console_description=Use this page to change your visible profile, preferences and application settings
|
||||||
|
user_profile=User Profile
|
||||||
|
user_profile_for=Profile for user ''{0}''
|
||||||
my_details=My Details
|
my_details=My Details
|
||||||
general_pref=General Preferences
|
general_pref=General Preferences
|
||||||
change_my_password_description=Use this view to change your password
|
change_my_password_description=Use this view to change your password
|
||||||
|
@@ -438,6 +438,10 @@
|
|||||||
icon="/images/icons/user_console_large.gif" title-id="user_console_info"
|
icon="/images/icons/user_console_large.gif" title-id="user_console_info"
|
||||||
description-id="user_console_description" show-ok-button="false"/>
|
description-id="user_console_description" show-ok-button="false"/>
|
||||||
|
|
||||||
|
<dialog name="userProfile" page="/jsp/users/user-profile.jsp" managed-bean="UserProfileDialog"
|
||||||
|
icon="/images/icons/user_console_large.gif" title-id="user_profile"
|
||||||
|
show-ok-button="false"/>
|
||||||
|
|
||||||
<dialog name="recoveryReport" page="/jsp/trashcan/recovery-report.jsp" managed-bean="TrashcanRecoveryReportDialog"
|
<dialog name="recoveryReport" page="/jsp/trashcan/recovery-report.jsp" managed-bean="TrashcanRecoveryReportDialog"
|
||||||
icon="/images/icons/recover_all_large.gif" title-id="recovery_report"
|
icon="/images/icons/recover_all_large.gif" title-id="recovery_report"
|
||||||
description-id="recovery_report_info" show-ok-button="false" />
|
description-id="recovery_report_info" show-ok-button="false" />
|
||||||
|
@@ -31,8 +31,7 @@ import org.alfresco.web.bean.dialog.BaseDialogBean;
|
|||||||
|
|
||||||
public class UserConsoleDialog extends BaseDialogBean
|
public class UserConsoleDialog extends BaseDialogBean
|
||||||
{
|
{
|
||||||
|
private static final String MSG_CLOSE = "close";
|
||||||
private static final String BUTTON_CLOSE = "close";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||||
@@ -43,7 +42,7 @@ public class UserConsoleDialog extends BaseDialogBean
|
|||||||
@Override
|
@Override
|
||||||
public String getCancelButtonLabel()
|
public String getCancelButtonLabel()
|
||||||
{
|
{
|
||||||
return Application.getMessage(FacesContext.getCurrentInstance(), BUTTON_CLOSE);
|
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -346,6 +346,7 @@ public abstract class UserMembersBean implements IContextListener
|
|||||||
props.put("fullName", ((String)props.get("firstName")) + ' ' + ((String)props.get("lastName")));
|
props.put("fullName", ((String)props.get("firstName")) + ' ' + ((String)props.get("lastName")));
|
||||||
props.put("roles", roleListToString(context, permissionMap.get(authority)));
|
props.put("roles", roleListToString(context, permissionMap.get(authority)));
|
||||||
props.put("icon", WebResources.IMAGE_PERSON);
|
props.put("icon", WebResources.IMAGE_PERSON);
|
||||||
|
props.put("isGroup", Boolean.FALSE);
|
||||||
|
|
||||||
personNodes.add(node);
|
personNodes.add(node);
|
||||||
}
|
}
|
||||||
@@ -366,6 +367,7 @@ public abstract class UserMembersBean implements IContextListener
|
|||||||
node.put("id", authority);
|
node.put("id", authority);
|
||||||
node.put("roles", roleListToString(context, permissionMap.get(authority)));
|
node.put("roles", roleListToString(context, permissionMap.get(authority)));
|
||||||
node.put("icon", WebResources.IMAGE_GROUP);
|
node.put("icon", WebResources.IMAGE_GROUP);
|
||||||
|
node.put("isGroup", Boolean.TRUE);
|
||||||
personNodes.add(node);
|
personNodes.add(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4989,7 +4989,7 @@
|
|||||||
</managed-bean>
|
</managed-bean>
|
||||||
|
|
||||||
<managed-bean>
|
<managed-bean>
|
||||||
<description>The bean for Change Users Password Screen.</description>
|
<description>The bean for Users Profile and Settings screen.</description>
|
||||||
<managed-bean-name>UserConsoleDialog</managed-bean-name>
|
<managed-bean-name>UserConsoleDialog</managed-bean-name>
|
||||||
<managed-bean-class>
|
<managed-bean-class>
|
||||||
org.alfresco.web.bean.users.UserConsoleDialog
|
org.alfresco.web.bean.users.UserConsoleDialog
|
||||||
@@ -4997,6 +4997,19 @@
|
|||||||
<managed-bean-scope>session</managed-bean-scope>
|
<managed-bean-scope>session</managed-bean-scope>
|
||||||
</managed-bean>
|
</managed-bean>
|
||||||
|
|
||||||
|
<managed-bean>
|
||||||
|
<description>The bean for a User Profile.</description>
|
||||||
|
<managed-bean-name>UserProfileDialog</managed-bean-name>
|
||||||
|
<managed-bean-class>
|
||||||
|
org.alfresco.web.bean.users.UserProfileDialog
|
||||||
|
</managed-bean-class>
|
||||||
|
<managed-bean-scope>session</managed-bean-scope>
|
||||||
|
<managed-property>
|
||||||
|
<property-name>properties</property-name>
|
||||||
|
<value>#{UsersBeanProperties}</value>
|
||||||
|
</managed-property>
|
||||||
|
</managed-bean>
|
||||||
|
|
||||||
<managed-bean>
|
<managed-bean>
|
||||||
<description>The bean for the Recovery Report Screen.</description>
|
<description>The bean for the Recovery Report Screen.</description>
|
||||||
<managed-bean-name>TrashcanRecoveryReportDialog</managed-bean-name>
|
<managed-bean-name>TrashcanRecoveryReportDialog</managed-bean-name>
|
||||||
|
@@ -136,7 +136,10 @@
|
|||||||
<f:facet name="small-icon">
|
<f:facet name="small-icon">
|
||||||
<h:graphicImage url="#{r.icon}" />
|
<h:graphicImage url="#{r.icon}" />
|
||||||
</f:facet>
|
</f:facet>
|
||||||
<h:outputText value="#{r.fullName}" />
|
<a:actionLink id="user-link" value="#{r.fullName}" actionListener="#{UsersDialog.setupUserAction}" action="dialog:userProfile" rendered="#{!r.isGroup}">
|
||||||
|
<f:param name="id" value="#{r.id}" />
|
||||||
|
</a:actionLink>
|
||||||
|
<h:outputText id="user-txt" value="#{r.fullName}" rendered="#{r.isGroup}" />
|
||||||
</a:column>
|
</a:column>
|
||||||
|
|
||||||
<%-- Username column --%>
|
<%-- Username column --%>
|
||||||
|
@@ -136,7 +136,10 @@
|
|||||||
<f:facet name="small-icon">
|
<f:facet name="small-icon">
|
||||||
<h:graphicImage url="#{r.icon}" />
|
<h:graphicImage url="#{r.icon}" />
|
||||||
</f:facet>
|
</f:facet>
|
||||||
<h:outputText value="#{r.fullName}" />
|
<a:actionLink id="user-link" value="#{r.fullName}" actionListener="#{UsersDialog.setupUserAction}" action="dialog:userProfile" rendered="#{!r.isGroup}">
|
||||||
|
<f:param name="id" value="#{r.id}" />
|
||||||
|
</a:actionLink>
|
||||||
|
<h:outputText id="user-txt" value="#{r.fullName}" rendered="#{r.isGroup}" />
|
||||||
</a:column>
|
</a:column>
|
||||||
|
|
||||||
<%-- Username column --%>
|
<%-- Username column --%>
|
||||||
|
82
source/web/jsp/users/user-profile.jsp
Normal file
82
source/web/jsp/users/user-profile.jsp
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<%--
|
||||||
|
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||||
|
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
* This program 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 General Public License for more details.
|
||||||
|
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
* As a special exception to the terms and conditions of version 2.0 of
|
||||||
|
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||||
|
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||||
|
* FLOSS exception. You should have recieved a copy of the text describing
|
||||||
|
* the FLOSS exception, and it is also available here:
|
||||||
|
* http://www.alfresco.com/legal/licensing"
|
||||||
|
--%>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
||||||
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||||
|
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||||
|
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||||
|
|
||||||
|
<a:panel label="#{msg.user_console}" id="userdetails-panel"
|
||||||
|
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
|
||||||
|
<h:panelGrid columns="2" columnClasses="alignTop,alignTop">
|
||||||
|
<h:panelGrid columns="2" cellpadding="2" cellspacing="2" columnClasses="userPropertyLabel,userPropertyValue">
|
||||||
|
<h:outputText value="#{msg.first_name}:" styleClass="propertiesLabel" />
|
||||||
|
<h:outputText value="#{UsersBeanProperties.person.properties.firstName}" />
|
||||||
|
|
||||||
|
<h:outputText value="#{msg.last_name}:" styleClass="propertiesLabel" />
|
||||||
|
<h:outputText value="#{UsersBeanProperties.person.properties.lastName}" />
|
||||||
|
|
||||||
|
<h:outputText value="#{msg.email}:" styleClass="propertiesLabel" />
|
||||||
|
<h:outputText value="#{UsersBeanProperties.person.properties.email}" />
|
||||||
|
|
||||||
|
<h:outputText value="#{msg.user_description}:" styleClass="propertiesLabel" />
|
||||||
|
<h:panelGroup rendered="#{!empty UsersBeanProperties.personDescription}">
|
||||||
|
<f:verbatim><div style="border: 1px solid #cccccc;padding:4px"></f:verbatim>
|
||||||
|
<h:outputText value="#{UsersBeanProperties.personDescription}" escape="false" />
|
||||||
|
<f:verbatim></div></f:verbatim>
|
||||||
|
</h:panelGroup>
|
||||||
|
</h:panelGrid>
|
||||||
|
|
||||||
|
<h:panelGrid columns="2" cellpadding="2" cellspacing="2" columnClasses="userPropertyLabel,userPropertyValue">
|
||||||
|
<h:outputText value="#{msg.user_organization}:" styleClass="propertiesLabel" />
|
||||||
|
<h:outputText value="#{UsersBeanProperties.person.properties.organization}" />
|
||||||
|
|
||||||
|
<h:outputText value="#{msg.user_jobtitle}:" styleClass="propertiesLabel" />
|
||||||
|
<h:outputText value="#{UsersBeanProperties.person.properties.jobtitle}" />
|
||||||
|
|
||||||
|
<h:outputText value="#{msg.user_location}:" styleClass="propertiesLabel" />
|
||||||
|
<h:outputText value="#{UsersBeanProperties.person.properties.location}" />
|
||||||
|
|
||||||
|
<h:outputText value="#{msg.user_avatar}:" styleClass="propertiesLabel" />
|
||||||
|
<h:panelGroup>
|
||||||
|
<h:panelGroup rendered="#{UsersBeanProperties.avatarUrl == null}">
|
||||||
|
<f:verbatim><div style="border: 2px solid #cccccc;width:120px;height:120px"></f:verbatim>
|
||||||
|
</h:panelGroup>
|
||||||
|
<h:panelGroup rendered="#{UsersBeanProperties.avatarUrl != null}">
|
||||||
|
<f:verbatim><div style="border: 2px solid #cccccc;width:120px;height:auto"></f:verbatim>
|
||||||
|
</h:panelGroup>
|
||||||
|
<h:graphicImage url="#{UsersBeanProperties.avatarUrl}" width="120" rendered="#{UsersBeanProperties.avatarUrl != null}" />
|
||||||
|
<f:verbatim></div></f:verbatim>
|
||||||
|
</h:panelGroup>
|
||||||
|
</h:panelGrid>
|
||||||
|
</h:panelGrid>
|
||||||
|
|
||||||
|
<!-- custom properties for cm:person type -->
|
||||||
|
<f:verbatim><div style="padding-bottom:12px"></f:verbatim>
|
||||||
|
<r:propertySheetGrid id="person-props" value="#{UsersBeanProperties.person}"
|
||||||
|
var="personProps" columns="1" mode="view" labelStyleClass="propertiesLabel"
|
||||||
|
externalConfig="true" />
|
||||||
|
<f:verbatim></div></f:verbatim>
|
||||||
|
</a:panel>
|
Reference in New Issue
Block a user