Search in sources :

Example 1 with HCSmall

use of com.helger.html.hc.html.textlevel.HCSmall in project phoss-directory by phax.

the class PDLoginManager method createLoginScreen.

@Override
protected IHTMLProvider createLoginScreen(final boolean bLoginError, @Nonnull final ICredentialValidationResult aLoginResult) {
    return new BootstrapLoginHTMLProvider(bLoginError, aLoginResult, getPageTitle()) {

        @Override
        @Nullable
        protected IHCNode createFormFooter(@Nonnull final ISimpleWebExecutionContext aSWEC) {
            final HCDiv aDiv = new HCDiv().addClass(CBootstrapCSS.D_FLEX).addClass(CBootstrapCSS.MT_5);
            aDiv.addChild(new HCSmall().addChild(CPDPublisher.getApplicationTitleWithVersion() + " / " + CDirectoryVersion.BUILD_TIMESTAMP));
            return aDiv;
        }
    };
}
Also used : HCDiv(com.helger.html.hc.html.grouping.HCDiv) BootstrapLoginHTMLProvider(com.helger.photon.bootstrap4.uictrls.ext.BootstrapLoginHTMLProvider) Nonnull(javax.annotation.Nonnull) HCSmall(com.helger.html.hc.html.textlevel.HCSmall) ISimpleWebExecutionContext(com.helger.photon.core.execcontext.ISimpleWebExecutionContext)

Example 2 with HCSmall

use of com.helger.html.hc.html.textlevel.HCSmall in project phoss-directory by phax.

the class SecureHTMLProvider method getContent.

@Nonnull
public static IHCNode getContent(@Nonnull final LayoutExecutionContext aLEC) {
    final HCNodeList ret = new HCNodeList();
    // Header
    ret.addChild(_getNavbar(aLEC));
    final BootstrapContainer aOuterContainer = ret.addAndReturnChild(new BootstrapContainer().setFluid(true));
    // Breadcrumbs
    {
        final BootstrapBreadcrumb aBreadcrumbs = BootstrapBreadcrumbProvider.createBreadcrumb(aLEC);
        aBreadcrumbs.addClasses(CBootstrapCSS.D_NONE, CBootstrapCSS.D_SM_BLOCK);
        aOuterContainer.addChild(aBreadcrumbs);
    }
    // Content
    {
        final HCDiv aRow = aOuterContainer.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX));
        final HCDiv aCol1 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.D_MD_FLEX).addClass(CBootstrapCSS.MR_2));
        final HCDiv aCol2 = aRow.addAndReturnChild(new HCDiv().addClass(CBootstrapCSS.FLEX_FILL));
        // left
        // We need a wrapper span for easy AJAX content replacement
        aCol1.addClass(CBootstrapCSS.D_PRINT_NONE).addChild(new HCSpan().setID(CLayout.LAYOUT_AREAID_MENU).addChild(getMenuContent(aLEC)).addChild(new HCDiv().addChild(new HCSmall().addChild(CDirectoryVersion.BUILD_VERSION))).addChild(new HCDiv().addChild(new HCSmall().addChild(CDirectoryVersion.BUILD_TIMESTAMP))));
        aCol1.addChild(new HCDiv().setID(CLayout.LAYOUT_AREAID_SPECIAL));
        // content - determine is exactly same as for view
        aCol2.addChild(BootstrapPageRenderer.getPageContent(aLEC));
    }
    return ret;
}
Also used : HCDiv(com.helger.html.hc.html.grouping.HCDiv) HCSpan(com.helger.html.hc.html.textlevel.HCSpan) HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapContainer(com.helger.photon.bootstrap4.layout.BootstrapContainer) HCSmall(com.helger.html.hc.html.textlevel.HCSmall) BootstrapBreadcrumb(com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb) Nonnull(javax.annotation.Nonnull)

Example 3 with HCSmall

use of com.helger.html.hc.html.textlevel.HCSmall in project phoss-directory by phax.

the class NiceNameUI method _createFormattedID.

@Nonnull
private static IHCNode _createFormattedID(@Nonnull final String sID, @Nullable final String sName, @Nullable final EBootstrapBadgeType eType, final boolean bIsDeprecated, final boolean bInDetails) {
    if (sName == null) {
        // No nice name present
        if (bInDetails)
            return new HCCode().addChild(sID);
        return new HCTextNode(sID);
    }
    final HCNodeList ret = new HCNodeList();
    ret.addChild(new BootstrapBadge(eType).addChild(sName));
    if (bIsDeprecated) {
        ret.addChild(" ").addChild(new BootstrapBadge(EBootstrapBadgeType.WARNING).addChild("Identifier is deprecated"));
    }
    if (bInDetails) {
        ret.addChild(new HCSmall().addChild(" (").addChild(new HCCode().addChild(sID)).addChild(")"));
    }
    return ret;
}
Also used : HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapBadge(com.helger.photon.bootstrap4.badge.BootstrapBadge) HCCode(com.helger.html.hc.html.textlevel.HCCode) HCSmall(com.helger.html.hc.html.textlevel.HCSmall) HCTextNode(com.helger.html.hc.impl.HCTextNode) Nonnull(javax.annotation.Nonnull)

Example 4 with HCSmall

use of com.helger.html.hc.html.textlevel.HCSmall in project phoss-smp by phax.

the class NiceNameUI method createFormattedID.

@Nonnull
private static IHCNode createFormattedID(@Nonnull final String sID, @Nullable final String sName, @Nullable final EBootstrapBadgeType eType, final boolean bIsDeprecated, final boolean bInDetails) {
    if (sName == null) {
        // No nice name present
        if (bInDetails)
            return new HCCode().addChild(sID);
        return new HCTextNode(sID);
    }
    final HCNodeList ret = new HCNodeList();
    ret.addChild(new BootstrapBadge(eType).addChild(sName));
    if (bIsDeprecated) {
        ret.addChild(" ").addChild(new BootstrapBadge(EBootstrapBadgeType.WARNING).addChild("Identifier is deprecated"));
    }
    if (bInDetails) {
        ret.addChild(new HCSmall().addChild(" (").addChild(new HCCode().addChild(sID)).addChild(")"));
    }
    return ret;
}
Also used : HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapBadge(com.helger.photon.bootstrap4.badge.BootstrapBadge) HCCode(com.helger.html.hc.html.textlevel.HCCode) HCSmall(com.helger.html.hc.html.textlevel.HCSmall) HCTextNode(com.helger.html.hc.impl.HCTextNode) Nonnull(javax.annotation.Nonnull)

Example 5 with HCSmall

use of com.helger.html.hc.html.textlevel.HCSmall in project phoss-smp by phax.

the class SMPLoginHTMLProvider method createFormFooter.

@Override
@Nullable
protected IHCNode createFormFooter(@Nonnull final ISimpleWebExecutionContext aSWEC) {
    final HCDiv aDiv = new HCDiv().addClass(CBootstrapCSS.D_FLEX).addClass(CBootstrapCSS.MT_3);
    aDiv.addChild(new HCSmall().addChild(CSMP.getApplicationTitleAndVersion()));
    return aDiv;
}
Also used : HCDiv(com.helger.html.hc.html.grouping.HCDiv) HCSmall(com.helger.html.hc.html.textlevel.HCSmall) Nullable(javax.annotation.Nullable)

Aggregations

HCSmall (com.helger.html.hc.html.textlevel.HCSmall)5 Nonnull (javax.annotation.Nonnull)4 HCDiv (com.helger.html.hc.html.grouping.HCDiv)3 HCNodeList (com.helger.html.hc.impl.HCNodeList)3 HCCode (com.helger.html.hc.html.textlevel.HCCode)2 HCTextNode (com.helger.html.hc.impl.HCTextNode)2 BootstrapBadge (com.helger.photon.bootstrap4.badge.BootstrapBadge)2 HCSpan (com.helger.html.hc.html.textlevel.HCSpan)1 BootstrapBreadcrumb (com.helger.photon.bootstrap4.breadcrumb.BootstrapBreadcrumb)1 BootstrapContainer (com.helger.photon.bootstrap4.layout.BootstrapContainer)1 BootstrapLoginHTMLProvider (com.helger.photon.bootstrap4.uictrls.ext.BootstrapLoginHTMLProvider)1 ISimpleWebExecutionContext (com.helger.photon.core.execcontext.ISimpleWebExecutionContext)1 Nullable (javax.annotation.Nullable)1