Some minor enhancements for the user and group administration tabs at /ccm/admin
git-svn-id: https://svn.libreccm.org/ccm/trunk@2311 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
d817a52920
commit
cef50ef24e
|
|
@ -35,15 +35,15 @@ import com.arsdigita.persistence.metadata.Property;
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class DecisionTreeTraversalAdapter extends
|
public class DecisionTreeTraversalAdapter extends ContentItemTraversalAdapter {
|
||||||
ContentItemTraversalAdapter {
|
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(DecisionTreeTraversalAdapter.class);
|
private static final Logger s_log = Logger.getLogger(DecisionTreeTraversalAdapter.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public DecisionTreeTraversalAdapter() {}
|
public DecisionTreeTraversalAdapter() {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
@ -67,9 +67,8 @@ public class DecisionTreeTraversalAdapter extends
|
||||||
|
|
||||||
HttpServletRequest request = DispatcherHelper.getRequest();
|
HttpServletRequest request = DispatcherHelper.getRequest();
|
||||||
|
|
||||||
if ("/object/sections/title".equals(path) ||
|
if ("/object/sections/title".equals(path) || "/object/sections/instructions".equals(path)
|
||||||
"/object/sections/instructions".equals(path) ||
|
|| "/object/sections/sectionOptions".equals(path)) {
|
||||||
"/object/sections/sectionOptions".equals(path)) {
|
|
||||||
// Only include one TreeSection in the output.
|
// Only include one TreeSection in the output.
|
||||||
// Which one depends on the section_id parameter.
|
// Which one depends on the section_id parameter.
|
||||||
DecisionTreeSection section = (DecisionTreeSection) obj;
|
DecisionTreeSection section = (DecisionTreeSection) obj;
|
||||||
|
|
@ -81,20 +80,20 @@ public class DecisionTreeTraversalAdapter extends
|
||||||
|
|
||||||
if (selectedSection == null) {
|
if (selectedSection == null) {
|
||||||
throw new RuntimeException("The first section has not been set for tree " + tree);
|
throw new RuntimeException("The first section has not been set for tree " + tree);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
selectedSection = new
|
|
||||||
DecisionTreeSection(new BigDecimal(sectionID));
|
|
||||||
}
|
|
||||||
catch (DataObjectNotFoundException e) {
|
|
||||||
throw new RuntimeException("Cannot find section for section_id parameter " + sectionID);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
selectedSection = new DecisionTreeSection(new BigDecimal(sectionID));
|
||||||
|
} catch (DataObjectNotFoundException e) {
|
||||||
|
throw new RuntimeException("Cannot find section for section_id parameter "
|
||||||
|
+ sectionID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return section.equals(selectedSection);
|
return section.equals(selectedSection);
|
||||||
} else {
|
} else {
|
||||||
return super.processProperty(obj, path, prop, context);
|
return super.processProperty(obj, path, prop, context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,3 +131,7 @@ ui.admin.applications.no_settings=This application has no settings (yet).
|
||||||
ui.admin.applications.form_not_compatible_now=This application administration form is not yet compatible with this application pane. Please use the applications own administration form.
|
ui.admin.applications.form_not_compatible_now=This application administration form is not yet compatible with this application pane. Please use the applications own administration form.
|
||||||
ui.admin.applications.ApplicationInstancePane.manage.heading=Instance specific settings
|
ui.admin.applications.ApplicationInstancePane.manage.heading=Instance specific settings
|
||||||
ui.admin.applications.parent.label=Select parent application
|
ui.admin.applications.parent.label=Select parent application
|
||||||
|
ui.admin.user.userinfo.name=Name:
|
||||||
|
ui.admin.user.userinfo.screenname=Username:
|
||||||
|
ui.admin.user.userinfo.primaryemail=Email:
|
||||||
|
ui.admin.groups.name=Name:
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ ui.admin.groups.deletefailed=Fehlermeldung
|
||||||
ui.admin.groups.edit=Edit
|
ui.admin.groups.edit=Edit
|
||||||
ui.admin.groups.groupedit=Edit Group
|
ui.admin.groups.groupedit=Edit Group
|
||||||
ui.admin.groups.extremeaction=Extreme Action
|
ui.admin.groups.extremeaction=Extreme Action
|
||||||
ui.admin.groups.groupinformation=Basic Information
|
ui.admin.groups.groupinformation=Basisinformationen
|
||||||
ui.admin.groups.removesubmemberlabel=Entfernen
|
ui.admin.groups.removesubmemberlabel=Entfernen
|
||||||
ui.admin.groups.subgroupcountlabel=Untergruppen\:
|
ui.admin.groups.subgroupcountlabel=Untergruppen\:
|
||||||
ui.admin.groups.subgroups=Untergruppen Information
|
ui.admin.groups.subgroups=Untergruppen Information
|
||||||
|
|
@ -131,3 +131,7 @@ ui.admin.applications.no_settings=Diese Applikation hat (noch) keine Einstellung
|
||||||
ui.admin.applications.form_not_compatible_now=Das Formular zur Verwaltung dieser Application ist derzeit noch nicht kompatibel mit dieser Administrationsoberfl\u00e4che. Bitte nutzen Sie den Administrationsoberfl\u00e4che der Application.
|
ui.admin.applications.form_not_compatible_now=Das Formular zur Verwaltung dieser Application ist derzeit noch nicht kompatibel mit dieser Administrationsoberfl\u00e4che. Bitte nutzen Sie den Administrationsoberfl\u00e4che der Application.
|
||||||
ui.admin.applications.ApplicationInstancePane.manage.heading=Einstellungen der Instanz
|
ui.admin.applications.ApplicationInstancePane.manage.heading=Einstellungen der Instanz
|
||||||
ui.admin.applications.parent.label=W\u00e4hlen Sie die \u00fcbergeordnete Applikation
|
ui.admin.applications.parent.label=W\u00e4hlen Sie die \u00fcbergeordnete Applikation
|
||||||
|
ui.admin.user.userinfo.name=Name:
|
||||||
|
ui.admin.user.userinfo.screenname=Benutzername:
|
||||||
|
ui.admin.user.userinfo.primaryemail=E-Mail:
|
||||||
|
ui.admin.groups.name=Name:
|
||||||
|
|
|
||||||
|
|
@ -131,3 +131,7 @@ ui.admin.applications.no_settings=
|
||||||
ui.admin.applications.form_not_compatible_now=
|
ui.admin.applications.form_not_compatible_now=
|
||||||
ui.admin.applications.ApplicationInstancePane.manage.heading=
|
ui.admin.applications.ApplicationInstancePane.manage.heading=
|
||||||
ui.admin.applications.parent.label=
|
ui.admin.applications.parent.label=
|
||||||
|
ui.admin.user.userinfo.name=
|
||||||
|
ui.admin.user.userinfo.screenname=
|
||||||
|
ui.admin.user.userinfo.primaryemail=
|
||||||
|
ui.admin.groups.name=
|
||||||
|
|
|
||||||
|
|
@ -117,3 +117,7 @@ ui.admin.applications.no_settings=
|
||||||
ui.admin.applications.form_not_compatible_now=
|
ui.admin.applications.form_not_compatible_now=
|
||||||
ui.admin.applications.ApplicationInstancePane.manage.heading=
|
ui.admin.applications.ApplicationInstancePane.manage.heading=
|
||||||
ui.admin.applications.parent.label=
|
ui.admin.applications.parent.label=
|
||||||
|
ui.admin.user.userinfo.name=
|
||||||
|
ui.admin.user.userinfo.screenname=
|
||||||
|
ui.admin.user.userinfo.primaryemail=
|
||||||
|
ui.admin.groups.name=
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ package com.arsdigita.ui.admin;
|
||||||
|
|
||||||
import com.arsdigita.bebop.ActionLink;
|
import com.arsdigita.bebop.ActionLink;
|
||||||
import com.arsdigita.bebop.BoxPanel;
|
import com.arsdigita.bebop.BoxPanel;
|
||||||
|
import com.arsdigita.bebop.ColumnPanel;
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.ControlLink;
|
import com.arsdigita.bebop.ControlLink;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
|
|
@ -39,6 +40,7 @@ import com.arsdigita.bebop.list.ListCellRenderer;
|
||||||
import com.arsdigita.bebop.list.ListModel;
|
import com.arsdigita.bebop.list.ListModel;
|
||||||
import com.arsdigita.bebop.list.ListModelBuilder;
|
import com.arsdigita.bebop.list.ListModelBuilder;
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
import com.arsdigita.kernel.Group;
|
import com.arsdigita.kernel.Group;
|
||||||
import com.arsdigita.kernel.GroupCollection;
|
import com.arsdigita.kernel.GroupCollection;
|
||||||
import com.arsdigita.kernel.User;
|
import com.arsdigita.kernel.User;
|
||||||
|
|
@ -241,7 +243,25 @@ class GroupAdministrationTab extends LayoutPanel implements AdminConstants, Chan
|
||||||
private Component buildGroupInfoPanel(final SegmentedPanel main) {
|
private Component buildGroupInfoPanel(final SegmentedPanel main) {
|
||||||
final BoxPanel body = new BoxPanel();
|
final BoxPanel body = new BoxPanel();
|
||||||
|
|
||||||
body.add(new GroupInfo(this));
|
//body.add(new GroupInfo(this));
|
||||||
|
final ColumnPanel infoPanel = new ColumnPanel(2);
|
||||||
|
|
||||||
|
infoPanel.add(new Label(new GlobalizedMessage("ui.admin.groups.name", BUNDLE_NAME)));
|
||||||
|
final Label nameLabel = new Label();
|
||||||
|
nameLabel.addPrintListener(new PrintListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void prepare(final PrintEvent event) {
|
||||||
|
final Label target = (Label) event.getTarget();
|
||||||
|
final PageState state = event.getPageState();
|
||||||
|
final Group group = getGroup(state);
|
||||||
|
|
||||||
|
target.setLabel(group.getName());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
infoPanel.add(nameLabel);
|
||||||
|
body.add(infoPanel);
|
||||||
|
|
||||||
ActionLink link = new ActionLink(EDIT_GROUP_LABEL);
|
ActionLink link = new ActionLink(EDIT_GROUP_LABEL);
|
||||||
link.setClassAttr("actionLink");
|
link.setClassAttr("actionLink");
|
||||||
link.addActionListener(new ActionListener() {
|
link.addActionListener(new ActionListener() {
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import com.arsdigita.bebop.list.ListModelBuilder;
|
||||||
import com.arsdigita.globalization.GlobalizedMessage;
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
import com.arsdigita.toolbox.ui.LayoutPanel;
|
import com.arsdigita.toolbox.ui.LayoutPanel;
|
||||||
import static com.arsdigita.ui.admin.AdminConstants.USER_NAVBAR_TITLE;
|
import static com.arsdigita.ui.admin.AdminConstants.USER_NAVBAR_TITLE;
|
||||||
|
import static com.arsdigita.ui.admin.AdminConstants.USER_TAB_BROWSE;
|
||||||
import static com.arsdigita.ui.admin.AdminConstants.USER_TAB_SUMMARY;
|
import static com.arsdigita.ui.admin.AdminConstants.USER_TAB_SUMMARY;
|
||||||
import com.arsdigita.util.Assert;
|
import com.arsdigita.util.Assert;
|
||||||
import com.arsdigita.util.LockableImpl;
|
import com.arsdigita.util.LockableImpl;
|
||||||
|
|
@ -71,6 +72,7 @@ class UserAdministrationTab extends LayoutPanel implements AdminConstants {
|
||||||
|
|
||||||
final BoxPanel body = new BoxPanel();
|
final BoxPanel body = new BoxPanel();
|
||||||
addSection(USER_TAB_SUMMARY, summarySection, body);
|
addSection(USER_TAB_SUMMARY, summarySection, body);
|
||||||
|
addSection(USER_TAB_BROWSE, browsePane, body);
|
||||||
addSection(USER_TAB_SEARCH, searchSection, body);
|
addSection(USER_TAB_SEARCH, searchSection, body);
|
||||||
addSection(USER_TAB_CREATE_USER, createSection, body);
|
addSection(USER_TAB_CREATE_USER, createSection, body);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ package com.arsdigita.ui.admin;
|
||||||
import com.arsdigita.ui.admin.ApplicationsAdministrationTab;
|
import com.arsdigita.ui.admin.ApplicationsAdministrationTab;
|
||||||
import com.arsdigita.bebop.ActionLink;
|
import com.arsdigita.bebop.ActionLink;
|
||||||
import com.arsdigita.bebop.BoxPanel;
|
import com.arsdigita.bebop.BoxPanel;
|
||||||
|
import com.arsdigita.bebop.ColumnPanel;
|
||||||
import com.arsdigita.bebop.Component;
|
import com.arsdigita.bebop.Component;
|
||||||
import com.arsdigita.bebop.ControlLink;
|
import com.arsdigita.bebop.ControlLink;
|
||||||
import com.arsdigita.bebop.Label;
|
import com.arsdigita.bebop.Label;
|
||||||
|
|
@ -41,6 +42,8 @@ import com.arsdigita.bebop.event.ActionEvent;
|
||||||
import com.arsdigita.bebop.event.ActionListener;
|
import com.arsdigita.bebop.event.ActionListener;
|
||||||
import com.arsdigita.bebop.event.ChangeEvent;
|
import com.arsdigita.bebop.event.ChangeEvent;
|
||||||
import com.arsdigita.bebop.event.ChangeListener;
|
import com.arsdigita.bebop.event.ChangeListener;
|
||||||
|
import com.arsdigita.bebop.event.PrintEvent;
|
||||||
|
import com.arsdigita.bebop.event.PrintListener;
|
||||||
import com.arsdigita.bebop.event.TableActionEvent;
|
import com.arsdigita.bebop.event.TableActionEvent;
|
||||||
import com.arsdigita.bebop.event.TableActionListener;
|
import com.arsdigita.bebop.event.TableActionListener;
|
||||||
import com.arsdigita.bebop.list.ListModel;
|
import com.arsdigita.bebop.list.ListModel;
|
||||||
|
|
@ -65,6 +68,7 @@ import com.arsdigita.kernel.security.UserContext;
|
||||||
import com.arsdigita.persistence.DataQuery;
|
import com.arsdigita.persistence.DataQuery;
|
||||||
import com.arsdigita.persistence.PersistenceException;
|
import com.arsdigita.persistence.PersistenceException;
|
||||||
import com.arsdigita.persistence.SessionManager;
|
import com.arsdigita.persistence.SessionManager;
|
||||||
|
import static com.arsdigita.ui.admin.AdminConstants.BUNDLE_NAME;
|
||||||
import com.arsdigita.util.LockableImpl;
|
import com.arsdigita.util.LockableImpl;
|
||||||
import com.arsdigita.util.UncheckedWrapperException;
|
import com.arsdigita.util.UncheckedWrapperException;
|
||||||
|
|
||||||
|
|
@ -208,11 +212,65 @@ class UserBrowsePane extends SegmentedPanel
|
||||||
|
|
||||||
link.setClassAttr("actionLink");
|
link.setClassAttr("actionLink");
|
||||||
|
|
||||||
BoxPanel p = new BoxPanel();
|
BoxPanel panel = new BoxPanel();
|
||||||
p.add(new UserInfo(this));
|
|
||||||
p.add(link);
|
|
||||||
|
|
||||||
return addSegment(USER_INFO_LABEL, p);
|
// panel.add(new UserInfo(this));
|
||||||
|
final ColumnPanel colPanel = new ColumnPanel(2);
|
||||||
|
|
||||||
|
colPanel.add(new Label(new GlobalizedMessage("ui.admin.user.userinfo.name", BUNDLE_NAME)));
|
||||||
|
final Label userName = new Label();
|
||||||
|
userName.addPrintListener(new PrintListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void prepare(final PrintEvent event) {
|
||||||
|
final Label target = (Label) event.getTarget();
|
||||||
|
final PageState state = event.getPageState();
|
||||||
|
final User user = getUser(state);
|
||||||
|
|
||||||
|
target.setLabel(user.getName());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
colPanel.add(userName);
|
||||||
|
|
||||||
|
colPanel.add(new Label(new GlobalizedMessage("ui.admin.user.userinfo.screenname", BUNDLE_NAME)));
|
||||||
|
final Label userScreenname = new Label();
|
||||||
|
userScreenname.addPrintListener(new PrintListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void prepare(final PrintEvent event) {
|
||||||
|
final Label target = (Label) event.getTarget();
|
||||||
|
final PageState state = event.getPageState();
|
||||||
|
final User user = getUser(state);
|
||||||
|
|
||||||
|
target.setLabel(user.getScreenName());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
colPanel.add(userScreenname);
|
||||||
|
|
||||||
|
colPanel.add(new Label(new GlobalizedMessage("ui.admin.user.userinfo.primaryemail", BUNDLE_NAME)));
|
||||||
|
final Label userEmail = new Label();
|
||||||
|
userEmail.addPrintListener(new PrintListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void prepare(final PrintEvent event) {
|
||||||
|
final Label target = (Label) event.getTarget();
|
||||||
|
final PageState state = event.getPageState();
|
||||||
|
final User user = getUser(state);
|
||||||
|
|
||||||
|
target.setLabel(user.getPrimaryEmail().getEmailAddress());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
colPanel.add(userEmail);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
panel.add(colPanel);
|
||||||
|
panel.add(link);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return addSegment(USER_INFO_LABEL, panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue