use of com.helger.html.hc.impl.HCNodeList in project phoss-directory by phax.
the class PageSecureAdminSMLConfiguration method showSelectedObject.
@Override
protected void showSelectedObject(@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final ISMLInfo aSelectedObject) {
final Locale aDisplayLocale = aWPEC.getDisplayLocale();
final HCNodeList aNodeList = aWPEC.getNodeList();
aNodeList.addChild(getUIHandler().createActionHeader("Show details of SML configuration '" + aSelectedObject.getDisplayName() + "'"));
final BootstrapViewForm aForm = new BootstrapViewForm();
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Name").setCtrl(aSelectedObject.getDisplayName()));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("DNS Zone").setCtrl(aSelectedObject.getDNSZone()));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Publisher DNS Zone").setCtrl(aSelectedObject.getPublisherDNSZone()));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Management Service URL").setCtrl(HCA.createLinkedWebsite(aSelectedObject.getManagementServiceURL())));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Manage Service Metadata Endpoint").setCtrl(HCA.createLinkedWebsite(aSelectedObject.getManageServiceMetaDataEndpointAddress().toExternalForm())));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Manage Participant Identifier Endpoint").setCtrl(HCA.createLinkedWebsite(aSelectedObject.getManageParticipantIdentifierEndpointAddress().toExternalForm())));
aForm.addFormGroup(new BootstrapFormGroup().setLabel("Client certificate required?").setCtrl(EPhotonCoreText.getYesOrNo(aSelectedObject.isClientCertificateRequired(), aDisplayLocale)));
aNodeList.addChild(aForm);
}
use of com.helger.html.hc.impl.HCNodeList in project phoss-directory by phax.
the class PageSecureAdminSMLConfiguration method showListOfExistingObjects.
@Override
protected void showListOfExistingObjects(@Nonnull final WebPageExecutionContext aWPEC) {
final Locale aDisplayLocale = aWPEC.getDisplayLocale();
final HCNodeList aNodeList = aWPEC.getNodeList();
final ISMLInfoManager aSMLInfoMgr = PDPMetaManager.getSMLInfoMgr();
aNodeList.addChild(info("This page lets you create custom SML configurations that can be used for registration."));
final BootstrapButtonToolbar aToolbar = new BootstrapButtonToolbar(aWPEC);
aToolbar.addButton("Create new SML configuration", createCreateURL(aWPEC), EDefaultIcon.NEW);
aNodeList.addChild(aToolbar);
final HCTable aTable = new HCTable(new DTCol("Name").setInitialSorting(ESortOrder.ASCENDING), new DTCol("DNS Zone"), new DTCol("Management Service URL"), new DTCol("Client Cert?"), new BootstrapDTColAction(aDisplayLocale)).setID(getID());
for (final ISMLInfo aCurObject : aSMLInfoMgr.getAll()) {
final ISimpleURL aViewLink = createViewURL(aWPEC, aCurObject);
final HCRow aRow = aTable.addBodyRow();
aRow.addCell(new HCA(aViewLink).addChild(aCurObject.getDisplayName()));
aRow.addCell(aCurObject.getDNSZone());
aRow.addCell(aCurObject.getManagementServiceURL());
aRow.addCell(EPhotonCoreText.getYesOrNo(aCurObject.isClientCertificateRequired(), aDisplayLocale));
aRow.addCell(createEditLink(aWPEC, aCurObject, "Edit " + aCurObject.getID()), new HCTextNode(" "), createCopyLink(aWPEC, aCurObject, "Copy " + aCurObject.getID()), new HCTextNode(" "), isActionAllowed(aWPEC, EWebPageFormAction.DELETE, aCurObject) ? createDeleteLink(aWPEC, aCurObject, "Delete " + aCurObject.getDisplayName()) : createEmptyAction());
}
final DataTables aDataTables = BootstrapDataTables.createDefaultDataTables(aWPEC, aTable);
aNodeList.addChild(aTable).addChild(aDataTables);
}
use of com.helger.html.hc.impl.HCNodeList in project phoss-directory by phax.
the class PageSecureListDeadIndex method showListOfExistingObjects.
@Override
protected void showListOfExistingObjects(@Nonnull final WebPageExecutionContext aWPEC) {
final HCNodeList aNodeList = aWPEC.getNodeList();
aNodeList.addChild(info("This page contains all entries where indexing failed totally."));
super.showListOfExistingObjects(aWPEC);
}
use of com.helger.html.hc.impl.HCNodeList in project phoss-directory by phax.
the class PageSecureListReIndex method showListOfExistingObjects.
@Override
protected void showListOfExistingObjects(@Nonnull final WebPageExecutionContext aWPEC) {
final HCNodeList aNodeList = aWPEC.getNodeList();
aNodeList.addChild(info().addChild(div("This page contains all entries where indexing failed initially but is re-tried.")).addChild(div("Re-index happens every " + PDServerConfiguration.getReIndexRetryMinutes() + " minute(s)")).addChild(div("Re-indexing stops after " + PDServerConfiguration.getReIndexMaxRetryHours() + " hour(s)")));
super.showListOfExistingObjects(aWPEC);
}
use of com.helger.html.hc.impl.HCNodeList in project phoss-directory by phax.
the class SecureHTMLProvider method _getNavbar.
@Nonnull
private static IHCNode _getNavbar(@Nonnull final SimpleWebExecutionContext aSWEC) {
final Locale aDisplayLocale = aSWEC.getDisplayLocale();
final IRequestWebScopeWithoutResponse aRequestScope = aSWEC.getRequestScope();
final ISimpleURL aLinkToStartPage = aSWEC.getLinkToMenuItem(aSWEC.getMenuTree().getDefaultMenuItemID());
final BootstrapNavbar aNavbar = new BootstrapNavbar();
aNavbar.addBrand(new HCNodeList().addChild(new HCSpan().addClass(AppCommonUI.CSS_CLASS_LOGO1).addChild(CPDPublisher.getApplicationTitle())).addChild(new HCSpan().addClass(AppCommonUI.CSS_CLASS_LOGO2).addChild(" Administration")), aLinkToStartPage);
final BootstrapNavbarToggleable aToggleable = aNavbar.addAndReturnToggleable();
{
final IUser aUser = LoggedInUserManager.getInstance().getCurrentUser();
aToggleable.addAndReturnText().addClass(CBootstrapCSS.ML_AUTO).addClass(CBootstrapCSS.MX_2).addChild("Welcome ").addChild(new HCStrong().addChild(SecurityHelper.getUserDisplayName(aUser, aDisplayLocale)));
aToggleable.addChild(new BootstrapButton().addClass(CBootstrapCSS.MX_2).addChild("Goto public area").setOnClick(LinkHelper.getURLWithContext(AbstractPublicApplicationServlet.SERVLET_DEFAULT_PATH + "/")));
aToggleable.addChild(new BootstrapButton().addClass(CBootstrapCSS.MX_2).setOnClick(LinkHelper.getURLWithContext(aRequestScope, LogoutServlet.SERVLET_DEFAULT_PATH)).addChild(EPhotonCoreText.LOGIN_LOGOUT.getDisplayText(aDisplayLocale)));
}
return aNavbar;
}
Aggregations