CCM NG: Moved UserDetails to separate class
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4016 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
34bcae0a8b
commit
8dd5e30c87
|
|
@ -92,13 +92,10 @@ public class UserAdmin extends BoxPanel {
|
|||
private final TextField usersTableFilter;
|
||||
private final BoxPanel usersTablePanel;
|
||||
private final UsersTable usersTable;
|
||||
private final ActionLink backToUsersTable;
|
||||
private final PropertySheet userProperties;
|
||||
private final Form userEditForm;
|
||||
private final Form passwordSetForm;
|
||||
private final BoxPanel actionLinks;
|
||||
// private final UserDetails userDetails;
|
||||
private final BoxPanel userDetails;
|
||||
private final UserDetails userDetails;
|
||||
private final Form emailForm;
|
||||
private final Form editGroupMembershipsForm;
|
||||
private final Form editRoleMembershipsForm;
|
||||
|
|
@ -148,20 +145,7 @@ public class UserAdmin extends BoxPanel {
|
|||
|
||||
add(usersTablePanel);
|
||||
|
||||
userDetails = new BoxPanel();
|
||||
userDetails.setIdAttr("userDetails");
|
||||
|
||||
backToUsersTable = new ActionLink(new GlobalizedMessage(
|
||||
"ui.admin.user_details.back", ADMIN_BUNDLE));
|
||||
backToUsersTable.setIdAttr("userDetailsBackLink");
|
||||
backToUsersTable.addActionListener(
|
||||
e -> closeUserDetails(e.getPageState()));
|
||||
userDetails.add(backToUsersTable);
|
||||
|
||||
userProperties = new PropertySheet(new UserPropertySheetModelBuilder(
|
||||
selectedUserId));
|
||||
userProperties.setIdAttr("userProperties");
|
||||
userDetails.add(userProperties);
|
||||
userDetails = new UserDetails(this, selectedUserId);
|
||||
|
||||
userEditForm = new Form("userEditForm");
|
||||
final TextField username = new TextField("username");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Copyright (C) 2016 LibreCCM Foundation.
|
||||
*
|
||||
* This library 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 library 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 library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
package com.arsdigita.ui.admin.usersgroupsroles.users;
|
||||
|
||||
import com.arsdigita.bebop.ActionLink;
|
||||
import com.arsdigita.bebop.BoxPanel;
|
||||
import com.arsdigita.bebop.ParameterSingleSelectionModel;
|
||||
import com.arsdigita.bebop.PropertySheet;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
|
||||
import static com.arsdigita.ui.admin.AdminUiConstants.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
public class UserDetails extends BoxPanel {
|
||||
|
||||
public UserDetails(
|
||||
final UserAdmin userAdmin,
|
||||
final ParameterSingleSelectionModel<String> selectedUserId) {
|
||||
|
||||
super(BoxPanel.VERTICAL);
|
||||
|
||||
setIdAttr("userDetails");
|
||||
|
||||
final ActionLink backToUsersTable = new ActionLink(
|
||||
new GlobalizedMessage("ui.admin.user_details.back", ADMIN_BUNDLE));
|
||||
backToUsersTable.setIdAttr("userDetailsBackLink");
|
||||
backToUsersTable.addActionListener(e -> {
|
||||
userAdmin.closeUserDetails(e.getPageState());
|
||||
});
|
||||
add(backToUsersTable);
|
||||
|
||||
final PropertySheet userProperties = new PropertySheet(
|
||||
new UserPropertySheetModelBuilder(selectedUserId));
|
||||
userProperties.setIdAttr("userProperties");
|
||||
add(userProperties);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue