use of org.olat.core.gui.components.tabbedpane.TabbedPane in project OpenOLAT by OpenOLAT.
the class ItemNode method createEditTabbedPane.
/**
* @see org.olat.ims.qti.editor.tree.GenericQtiNode#createEditTabbedPane(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.core.gui.translator.Translator, QTIEditorMainController)
*/
public TabbedPane createEditTabbedPane(UserRequest ureq, WindowControl wControl, Translator trnsltr, QTIEditorMainController editorMainController) {
if (myTabbedPane == null) {
try {
myTabbedPane = new TabbedPane("tabbedPane", ureq.getLocale());
TabbableController tabbCntrllr = new ItemNodeTabbedFormController(item, qtiPackage, ureq, wControl, editorMainController.isRestrictedEdit());
tabbCntrllr.addTabs(myTabbedPane);
tabbCntrllr.addControllerListener(editorMainController);
} catch (Exception e) {
myTabbedPane = null;
log.warn("Cannot create editor for the current item - item.getIdent(): " + item.getIdent());
}
}
return myTabbedPane;
}
use of org.olat.core.gui.components.tabbedpane.TabbedPane in project openolat by klemens.
the class UserAdminController method initTabbedPane.
/**
* Initialize the tabbed pane according to the users rights and the system
* configuration
* @param identity
* @param ureq
*/
private void initTabbedPane(Identity identity, UserRequest ureq) {
// first Initialize the user details tabbed pane
userTabP = new TabbedPane("userTabP", ureq.getLocale());
userTabP.addListener(this);
/**
* Determine, whether the user admin is or is not able to edit all fields in user
* profile form. The system admin is always able to do so.
*/
Boolean canEditAllFields = BaseSecurityModule.USERMANAGER_CAN_EDIT_ALL_PROFILE_FIELDS;
if (securityManager.isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_ADMIN)) {
canEditAllFields = Boolean.TRUE;
}
userProfileCtr = new ProfileAndHomePageEditController(ureq, getWindowControl(), identity, canEditAllFields.booleanValue());
listenTo(userProfileCtr);
userTabP.addTab(translate(NLS_EDIT_UPROFILE), userProfileCtr.getInitialComponent());
userTabP.addTab(translate(NLS_EDIT_UPREFS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
prefsCtr = new ChangePrefsController(uureq, getWindowControl(), identity);
listenTo(prefsCtr);
return prefsCtr.getInitialComponent();
}
});
if (isPasswordChangesAllowed(identity)) {
userTabP.addTab(translate(NLS_EDIT_UPWD), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
pwdCtr = new UserChangePasswordController(uureq, getWindowControl(), identity);
listenTo(pwdCtr);
return pwdCtr.getInitialComponent();
}
});
}
Boolean canAuth = BaseSecurityModule.USERMANAGER_ACCESS_TO_AUTH;
if (canAuth.booleanValue() || isOlatAdmin) {
userTabP.addTab(translate(NLS_EDIT_UAUTH), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
authenticationsCtr = new UserAuthenticationsEditorController(uureq, getWindowControl(), identity);
listenTo(authenticationsCtr);
return authenticationsCtr.getInitialComponent();
}
});
}
Boolean canProp = BaseSecurityModule.USERMANAGER_ACCESS_TO_PROP;
if (canProp.booleanValue() || isOlatAdmin) {
userTabP.addTab(translate(NLS_EDIT_UPROP), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
propertiesCtr = new UserPropertiesController(uureq, getWindowControl(), identity);
listenTo(propertiesCtr);
return propertiesCtr.getInitialComponent();
}
});
}
Boolean canStartGroups = BaseSecurityModule.USERMANAGER_CAN_START_GROUPS;
userTabP.addTab(translate(NLS_VIEW_GROUPS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
grpCtr = new GroupOverviewController(uureq, getWindowControl(), identity, canStartGroups);
listenTo(grpCtr);
return grpCtr.getInitialComponent();
}
});
userTabP.addTab(translate(NLS_VIEW_COURSES), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
courseCtr = new CourseOverviewController(uureq, getWindowControl(), identity);
listenTo(courseCtr);
return courseCtr.getInitialComponent();
}
});
if (isOlatAdmin) {
userTabP.addTab(translate(NLS_VIEW_ACCESS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
Controller accessCtr = new UserOrderController(uureq, getWindowControl(), identity);
listenTo(accessCtr);
return accessCtr.getInitialComponent();
}
});
}
if (isOlatAdmin) {
userTabP.addTab(translate(NLS_VIEW_EFF_STATEMENTS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
efficicencyCtrl = new CertificateAndEfficiencyStatementListController(uureq, getWindowControl(), identity, true);
listenTo(efficicencyCtrl);
BreadcrumbedStackedPanel stackPanel = new BreadcrumbedStackedPanel("statements", getTranslator(), efficicencyCtrl);
stackPanel.pushController(translate(NLS_VIEW_EFF_STATEMENTS), efficicencyCtrl);
efficicencyCtrl.setBreadcrumbPanel(stackPanel);
stackPanel.setInvisibleCrumb(1);
return stackPanel;
}
});
}
Boolean canSubscriptions = BaseSecurityModule.USERMANAGER_CAN_MODIFY_SUBSCRIPTIONS;
if (canSubscriptions.booleanValue() || isOlatAdmin) {
userTabP.addTab(translate(NLS_VIEW_SUBSCRIPTIONS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
Controller subscriptionsCtr = new NotificationSubscriptionController(uureq, getWindowControl(), identity, true);
listenTo(subscriptionsCtr);
return subscriptionsCtr.getInitialComponent();
}
});
}
userTabP.addTab(translate(NLS_EDIT_UROLES), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
rolesCtr = new SystemRolesAndRightsController(getWindowControl(), uureq, identity);
listenTo(rolesCtr);
return rolesCtr.getInitialComponent();
}
});
Boolean canQuota = BaseSecurityModule.USERMANAGER_ACCESS_TO_QUOTA;
if (canQuota.booleanValue() || isOlatAdmin) {
userTabP.addTab(translate(NLS_EDIT_UQUOTA), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
String relPath = FolderConfig.getUserHomes() + "/" + identity.getName();
quotaCtr = QuotaManager.getInstance().getQuotaEditorInstance(uureq, getWindowControl(), relPath);
return quotaCtr.getInitialComponent();
}
});
}
if (lectureModule.isEnabled()) {
userTabP.addTab(translate(NLS_VIEW_LECTURES), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
lecturesCtrl = new ParticipantLecturesOverviewController(uureq, getWindowControl(), identity, true, true, true, true);
listenTo(lecturesCtrl);
BreadcrumbedStackedPanel stackPanel = new BreadcrumbedStackedPanel("lectures", getTranslator(), lecturesCtrl);
stackPanel.pushController(translate(NLS_VIEW_LECTURES), lecturesCtrl);
lecturesCtrl.setBreadcrumbPanel(stackPanel);
stackPanel.setInvisibleCrumb(1);
return stackPanel;
}
});
}
if (taxonomyModule.isEnabled()) {
userTabP.addTab(translate(NLS_VIEW_COMPETENCES), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
competencesCtrl = new IdentityCompetencesController(uureq, getWindowControl(), identity);
listenTo(competencesCtrl);
BreadcrumbedStackedPanel stackPanel = new BreadcrumbedStackedPanel("competences", getTranslator(), competencesCtrl);
stackPanel.pushController(translate(NLS_VIEW_COMPETENCES), competencesCtrl);
competencesCtrl.setBreadcrumbPanel(stackPanel);
stackPanel.setInvisibleCrumb(1);
return stackPanel;
}
});
}
// now push to velocity
myContent.put("userTabP", userTabP);
}
use of org.olat.core.gui.components.tabbedpane.TabbedPane in project openolat by klemens.
the class TabbedPaneController method initTabbedPane.
/**
* Initialize the tabbed pane according to the users rights and the system
* configuration
* @param identity
* @param ureq
*/
private void initTabbedPane(UserRequest ureq) {
userDeleteTabP = new TabbedPane("userDeleteTabP", ureq.getLocale());
userDeleteTabP.addListener(this);
userSelectionCtr = new SelectionController(ureq, getWindowControl());
userSelectionCtr.addControllerListener(this);
userDeleteTabP.addTab(translator.translate("delete.workflow.tab.start.process"), userSelectionCtr.getInitialComponent());
userDeleteStatusCtr = new StatusController(ureq, getWindowControl());
userDeleteStatusCtr.addControllerListener(this);
userDeleteTabP.addTab(translator.translate("delete.workflow.tab.status.email"), userDeleteStatusCtr.getInitialComponent());
readyToDeleteCtr = new ReadyToDeleteController(ureq, getWindowControl());
readyToDeleteCtr.addControllerListener(this);
userDeleteTabP.addTab(translator.translate("delete.workflow.tab.select.delete"), readyToDeleteCtr.getInitialComponent());
myContent.put("userDeleteTabP", userDeleteTabP);
}
use of org.olat.core.gui.components.tabbedpane.TabbedPane in project OpenOLAT by OpenOLAT.
the class TabbedPaneController method initTabbedPane.
/**
* Initialize the tabbed pane according to the users rights and the system
* configuration
* @param identity
* @param ureq
*/
private void initTabbedPane(UserRequest ureq) {
userDeleteTabP = new TabbedPane("userDeleteTabP", ureq.getLocale());
userDeleteTabP.addListener(this);
userSelectionCtr = new SelectionController(ureq, getWindowControl());
userSelectionCtr.addControllerListener(this);
userDeleteTabP.addTab(translator.translate("delete.workflow.tab.start.process"), userSelectionCtr.getInitialComponent());
userDeleteStatusCtr = new StatusController(ureq, getWindowControl());
userDeleteStatusCtr.addControllerListener(this);
userDeleteTabP.addTab(translator.translate("delete.workflow.tab.status.email"), userDeleteStatusCtr.getInitialComponent());
readyToDeleteCtr = new ReadyToDeleteController(ureq, getWindowControl());
readyToDeleteCtr.addControllerListener(this);
userDeleteTabP.addTab(translator.translate("delete.workflow.tab.select.delete"), readyToDeleteCtr.getInitialComponent());
myContent.put("userDeleteTabP", userDeleteTabP);
}
use of org.olat.core.gui.components.tabbedpane.TabbedPane in project OpenOLAT by OpenOLAT.
the class UserAdminController method initTabbedPane.
/**
* Initialize the tabbed pane according to the users rights and the system
* configuration
* @param identity
* @param ureq
*/
private void initTabbedPane(Identity identity, UserRequest ureq) {
// first Initialize the user details tabbed pane
userTabP = new TabbedPane("userTabP", ureq.getLocale());
userTabP.addListener(this);
/**
* Determine, whether the user admin is or is not able to edit all fields in user
* profile form. The system admin is always able to do so.
*/
Boolean canEditAllFields = BaseSecurityModule.USERMANAGER_CAN_EDIT_ALL_PROFILE_FIELDS;
if (securityManager.isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_ADMIN)) {
canEditAllFields = Boolean.TRUE;
}
userProfileCtr = new ProfileAndHomePageEditController(ureq, getWindowControl(), identity, canEditAllFields.booleanValue());
listenTo(userProfileCtr);
userTabP.addTab(translate(NLS_EDIT_UPROFILE), userProfileCtr.getInitialComponent());
userTabP.addTab(translate(NLS_EDIT_UPREFS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
prefsCtr = new ChangePrefsController(uureq, getWindowControl(), identity);
listenTo(prefsCtr);
return prefsCtr.getInitialComponent();
}
});
if (isPasswordChangesAllowed(identity)) {
userTabP.addTab(translate(NLS_EDIT_UPWD), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
pwdCtr = new UserChangePasswordController(uureq, getWindowControl(), identity);
listenTo(pwdCtr);
return pwdCtr.getInitialComponent();
}
});
}
Boolean canAuth = BaseSecurityModule.USERMANAGER_ACCESS_TO_AUTH;
if (canAuth.booleanValue() || isOlatAdmin) {
userTabP.addTab(translate(NLS_EDIT_UAUTH), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
authenticationsCtr = new UserAuthenticationsEditorController(uureq, getWindowControl(), identity);
listenTo(authenticationsCtr);
return authenticationsCtr.getInitialComponent();
}
});
}
Boolean canProp = BaseSecurityModule.USERMANAGER_ACCESS_TO_PROP;
if (canProp.booleanValue() || isOlatAdmin) {
userTabP.addTab(translate(NLS_EDIT_UPROP), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
propertiesCtr = new UserPropertiesController(uureq, getWindowControl(), identity);
listenTo(propertiesCtr);
return propertiesCtr.getInitialComponent();
}
});
}
Boolean canStartGroups = BaseSecurityModule.USERMANAGER_CAN_START_GROUPS;
userTabP.addTab(translate(NLS_VIEW_GROUPS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
grpCtr = new GroupOverviewController(uureq, getWindowControl(), identity, canStartGroups);
listenTo(grpCtr);
return grpCtr.getInitialComponent();
}
});
userTabP.addTab(translate(NLS_VIEW_COURSES), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
courseCtr = new CourseOverviewController(uureq, getWindowControl(), identity);
listenTo(courseCtr);
return courseCtr.getInitialComponent();
}
});
if (isOlatAdmin) {
userTabP.addTab(translate(NLS_VIEW_ACCESS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
Controller accessCtr = new UserOrderController(uureq, getWindowControl(), identity);
listenTo(accessCtr);
return accessCtr.getInitialComponent();
}
});
}
if (isOlatAdmin) {
userTabP.addTab(translate(NLS_VIEW_EFF_STATEMENTS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
efficicencyCtrl = new CertificateAndEfficiencyStatementListController(uureq, getWindowControl(), identity, true);
listenTo(efficicencyCtrl);
BreadcrumbedStackedPanel stackPanel = new BreadcrumbedStackedPanel("statements", getTranslator(), efficicencyCtrl);
stackPanel.pushController(translate(NLS_VIEW_EFF_STATEMENTS), efficicencyCtrl);
efficicencyCtrl.setBreadcrumbPanel(stackPanel);
stackPanel.setInvisibleCrumb(1);
return stackPanel;
}
});
}
Boolean canSubscriptions = BaseSecurityModule.USERMANAGER_CAN_MODIFY_SUBSCRIPTIONS;
if (canSubscriptions.booleanValue() || isOlatAdmin) {
userTabP.addTab(translate(NLS_VIEW_SUBSCRIPTIONS), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
Controller subscriptionsCtr = new NotificationSubscriptionController(uureq, getWindowControl(), identity, true);
listenTo(subscriptionsCtr);
return subscriptionsCtr.getInitialComponent();
}
});
}
userTabP.addTab(translate(NLS_EDIT_UROLES), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
rolesCtr = new SystemRolesAndRightsController(getWindowControl(), uureq, identity);
listenTo(rolesCtr);
return rolesCtr.getInitialComponent();
}
});
Boolean canQuota = BaseSecurityModule.USERMANAGER_ACCESS_TO_QUOTA;
if (canQuota.booleanValue() || isOlatAdmin) {
userTabP.addTab(translate(NLS_EDIT_UQUOTA), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
String relPath = FolderConfig.getUserHomes() + "/" + identity.getName();
quotaCtr = QuotaManager.getInstance().getQuotaEditorInstance(uureq, getWindowControl(), relPath);
return quotaCtr.getInitialComponent();
}
});
}
if (lectureModule.isEnabled()) {
userTabP.addTab(translate(NLS_VIEW_LECTURES), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
lecturesCtrl = new ParticipantLecturesOverviewController(uureq, getWindowControl(), identity, true, true, true, true);
listenTo(lecturesCtrl);
BreadcrumbedStackedPanel stackPanel = new BreadcrumbedStackedPanel("lectures", getTranslator(), lecturesCtrl);
stackPanel.pushController(translate(NLS_VIEW_LECTURES), lecturesCtrl);
lecturesCtrl.setBreadcrumbPanel(stackPanel);
stackPanel.setInvisibleCrumb(1);
return stackPanel;
}
});
}
if (taxonomyModule.isEnabled()) {
userTabP.addTab(translate(NLS_VIEW_COMPETENCES), new TabCreator() {
@Override
public Component create(UserRequest uureq) {
competencesCtrl = new IdentityCompetencesController(uureq, getWindowControl(), identity);
listenTo(competencesCtrl);
BreadcrumbedStackedPanel stackPanel = new BreadcrumbedStackedPanel("competences", getTranslator(), competencesCtrl);
stackPanel.pushController(translate(NLS_VIEW_COMPETENCES), competencesCtrl);
competencesCtrl.setBreadcrumbPanel(stackPanel);
stackPanel.setInvisibleCrumb(1);
return stackPanel;
}
});
}
// now push to velocity
myContent.put("userTabP", userTabP);
}
Aggregations