Last of the user related dialogs correctly converted to dialog framework, Users list and Quota info UI improvements.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7471 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-11-29 08:35:33 +00:00
parent de55e11515
commit f907501d38
3 changed files with 110 additions and 137 deletions

View File

@@ -112,6 +112,11 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
return this.users;
}
public int getUsersSize()
{
return getUsers().size();
}
public long getUsersTotalUsage()
{
long totalUsage = 0L;
@@ -121,7 +126,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
Long sizeLatest = (Long)properties.getUserUsage((String)user.getProperties().get("userName"));
if (sizeLatest != null)
{
totalUsage = totalUsage + sizeLatest;
totalUsage += sizeLatest;
}
}
return totalUsage;
@@ -136,7 +141,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
Long sizeCurrent = (Long)user.getProperties().get("sizeQuota");
if (sizeCurrent != null)
{
totalQuota = totalQuota + sizeCurrent;
totalQuota += sizeCurrent;
}
}
return totalQuota;
@@ -366,8 +371,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
public NodePropertyResolver resolverUserSizeLatest = new NodePropertyResolver() {
public Object get(Node personNode) {
Long sizeLatest = (Long)properties.getUserUsage((String)personNode.getProperties().get("userName"));
return sizeLatest;
return (Long)properties.getUserUsage((String)personNode.getProperties().get("userName"));
}
};
@@ -398,6 +402,14 @@ public class UsersDialog extends BaseDialogBean implements IContextListener
return null;
}
public String close()
{
contextUpdated();
return DIALOG_CLOSE;
}
// ------------------------------------------------------------------------------
// IContextListener implementation

View File

@@ -28,11 +28,8 @@
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<f:verbatim>
<table cellspacing=0 cellpadding=3 border=0 width=100%>
<tr>
<td width="100%" valign="top"><%-- wrapper comment used by the panel to add additional component facets --%>
</f:verbatim>
<h:panelGrid columns="1" cellpadding="0" cellspacing="3" width="100%">
<h:panelGroup>
<h:panelGroup id="mydetails-panel-facets">
<f:facet name="title" >
<a:actionLink value="#{msg.modify}" action="dialog:editUserDetails"
@@ -44,120 +41,84 @@
facetsId="dialog:dialog-body:mydetails-panel-facets" border="white" bgcolor="white"
titleBorder="lbgrey" expandedTitleBorder="dotted"
titleBgcolor="white">
<f:verbatim>
<table cellspacing=2 cellpadding=2 border=0>
<tr>
<td class="propertiesLabel"></f:verbatim> <h:outputText
value="#{msg.first_name}" /> <f:verbatim>:</td>
<td></f:verbatim><h:outputText
value="#{UsersBeanProperties.person.properties.firstName}" /><f:verbatim></td>
</tr>
<tr>
<td class="propertiesLabel"></f:verbatim><h:outputText
value="#{msg.last_name}" /><f:verbatim>:</td>
<td></f:verbatim><h:outputText
value="#{UsersBeanProperties.person.properties.lastName}" /><f:verbatim></td>
</tr>
<tr>
<td class="propertiesLabel"></f:verbatim><h:outputText
value="#{msg.email}" /><f:verbatim>:</td>
<td></f:verbatim><h:outputText
value="#{UsersBeanProperties.person.properties.email}" /><f:verbatim></td>
</tr>
</table>
<div style="padding:4px"></div>
<h:panelGrid columns="2" cellpadding="2" cellspacing="2">
<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:panelGrid>
<%-- context for current user is setup on entry to user console --%>
</f:verbatim>
<a:actionLink id="change-password" value="#{msg.change_password}"
action="dialog:changeMyPassword"
image="/images/icons/change_password.gif"
rendered="#{NavigationBean.isGuest == false}" />
</a:panel><f:verbatim>
</a:panel>
</h:panelGroup>
<div style="padding:4px"></div>
<f:verbatim/>
</f:verbatim><a:panel label="#{msg.general_pref}" id="pref-panel"
<a:panel label="#{msg.general_pref}" id="pref-panel"
rendered="#{NavigationBean.isGuest == false || UserPreferencesBean.allowGuestConfig == true}"
border="white" bgcolor="white" titleBorder="lbgrey"
expandedTitleBorder="dotted" titleBgcolor="white">
<f:verbatim>
<table cellspacing=2 cellpadding=2 border=0>
<tr>
<td></f:verbatim><h:outputText value="#{msg.start_location}" /><f:verbatim>:&nbsp;</td>
<td><%-- Start Location drop-down selector --%> </f:verbatim><h:selectOneMenu
<h:panelGrid columns="2" cellpadding="2" cellspacing="2">
<h:outputText value="#{msg.start_location}:" />
<%-- Start Location drop-down selector --%>
<h:selectOneMenu
id="start-location" value="#{UserPreferencesBean.startLocation}"
onchange="document.forms['dialog'].submit(); return true;">
<f:selectItems value="#{UserPreferencesBean.startLocations}" />
</h:selectOneMenu><f:verbatim></td>
</tr>
<tr>
<td></f:verbatim><h:outputText value="#{msg.interface_language}" /><f:verbatim>:&nbsp;
</td>
<td><%-- Interface Language drop-down selector --%> </f:verbatim><h:selectOneMenu
</h:selectOneMenu>
<h:outputText value="#{msg.interface_language}:" />
<h:selectOneMenu
id="language" value="#{UserPreferencesBean.language}"
onchange="document.forms['dialog'].submit(); return true;">
<f:selectItems value="#{UserPreferencesBean.languages}" />
</h:selectOneMenu><f:verbatim></td>
</tr>
<tr>
<td></f:verbatim><h:outputText value="#{msg.content_language_filter}" /><f:verbatim>:&nbsp;</td>
<td><%-- Content Language Filter drop-down selector --%> </f:verbatim><h:selectOneMenu
</h:selectOneMenu>
<h:outputText value="#{msg.content_language_filter}:" />
<%-- Content Language Filter drop-down selector --%>
<h:selectOneMenu
id="content-filter-language"
value="#{UserPreferencesBean.contentFilterLanguage}"
onchange="document.forms['dialog'].submit(); return true;">
<f:selectItems
value="#{UserPreferencesBean.contentFilterLanguages}" />
</h:selectOneMenu><f:verbatim></td>
</tr>
</table>
</f:verbatim>
</a:panel><f:verbatim>
<f:selectItems value="#{UserPreferencesBean.contentFilterLanguages}" />
</h:selectOneMenu>
</h:panelGrid>
</a:panel>
<div style="padding:4px"></div>
<f:verbatim/>
</f:verbatim><a:panel label="#{msg.user_management}" id="man-panel"
<a:panel label="#{msg.user_management}" id="man-panel"
rendered="#{NavigationBean.isGuest == false}" border="white"
bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted"
titleBgcolor="white">
<a:panel id="usage-quota" rendered="#{UsersBeanProperties.usagesEnabled == true}">
<f:verbatim>
<table cellspacing=2 cellpadding=2 border=0>
<tr>
<td class="propertiesLabel"></f:verbatim> <h:outputText
value="#{msg.sizeCurrent}" /> <f:verbatim>:
</td>
<td></f:verbatim><h:outputText value="#{UsersBeanProperties.userUsage}">
<h:panelGrid columns="2" cellpadding="2" cellspacing="2">
<h:outputText value="#{msg.sizeCurrent}:" styleClass="propertiesLabel" />
<h:outputText value="#{UsersBeanProperties.userUsage}">
<a:convertSize />
</h:outputText><f:verbatim>
</td>
</tr>
<tr>
<td class="propertiesLabel"></f:verbatim> <h:outputText
value="#{msg.sizeQuota}" /> <f:verbatim>:
</td>
<td></f:verbatim>
</h:outputText>
<h:outputText value="#{msg.sizeQuota}:" />
<h:outputText value="#{UsersBeanProperties.userQuota}">
<a:convertSize />
</h:outputText>
<f:verbatim>
</td>
</tr>
</table>
</f:verbatim>
</h:panelGrid>
</a:panel>
<f:verbatim>
<table cellspacing=2 cellpadding=2 border=0>
<tr>
<td></f:verbatim><a:actionLink id="manage-deleted-items"
<h:panelGrid columns="2" cellpadding="2" cellspacing="2">
<a:actionLink id="manage-deleted-items"
value="#{msg.manage_deleted_items}"
action="dialog:manageDeletedItems"
image="/images/icons/trashcan.gif" /><f:verbatim></td>
</tr>
</table>
</f:verbatim>
</a:panel><f:verbatim></td>
</tr>
</table>
</f:verbatim>
image="/images/icons/trashcan.gif" />
</h:panelGrid>
</a:panel>
</h:panelGrid>

View File

@@ -230,7 +230,7 @@
<a:dataPager styleClass="pager" />
</a:richList>
<a:panel id="quota-panel" rendered="#{UsersBeanProperties.usagesEnabled == true}">
<a:panel id="quota-panel" rendered="#{UsersDialog.usersSize != 0 && UsersBeanProperties.usagesEnabled == true}">
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<td><h:outputText value="#{msg.quota_totalusage}:" /></td>
@@ -252,7 +252,7 @@
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
<h:commandButton value="#{msg.close}" action="#{UsersDialog.close}" styleClass="wizardButton" />
</td>
</tr>
</table>