@Nonnull public IHCNode renderMenuItemExternal (@Nonnull final ISimpleWebExecutionContext aSWEC, @Nonnull final IMenuItemExternal aMenuItem, final boolean bHasChildren, final boolean bIsSelected, final boolean bIsExpanded) { final HCA aLink = new HCA (aMenuItem.getURL ()); aLink.setTargetBlank (); aLink.addChild (getMenuItemExternalLabel (aMenuItem, bHasChildren, bIsSelected, bIsExpanded)); if (bHasChildren && !bIsExpanded) aLink.addChildren (new HCTextNode (" "), EBootstrapIcon.CHEVRON_RIGHT.getAsNode ()); return aLink; }
@Nullable public IHCNode createWebLink (@Nullable final String sWebSite, @Nullable final HC_Target aTarget) { if (StringHelper.hasNoText (sWebSite)) return null; if (!URLValidator.isValid (sWebSite)) return new HCTextNode (sWebSite); return new HCA (sWebSite).setTarget (aTarget).addChild (sWebSite); }
@Nonnull public IHCNode renderMenuItemPage (@Nonnull final ISimpleWebExecutionContext aSWEC, @Nonnull final IMenuItemPage aMenuItem, final boolean bHasChildren, final boolean bIsSelected, final boolean bIsExpanded) { final HCA aLink = new HCA (aSWEC.getLinkToMenuItem (aMenuItem.getID ())); aLink.addChild (getMenuItemPageLabel (aMenuItem, bHasChildren, bIsSelected, bIsExpanded)); if (bHasChildren && !bIsExpanded) aLink.addChildren (new HCTextNode (" "), EBootstrapIcon.CHEVRON_RIGHT.getAsNode ()); return aLink; }
aToggleLI.addChild (new HCA (aTab.getLinkURL ()).addChild (aTab.getLabel ())); aToggleLI.addChild (new HCA (aTab.getLinkURL ()).setDataAttr ("toggle", "tab").addChild (aTab.getLabel ()));
@Nonnull public AbstractHCA <?> createLink () { if (m_aURL == null && m_aJSCode == null) throw new IllegalStateException ("No LinkAction specified!"); AbstractHCA <?> ret; if (m_aURL != null) ret = new HCA (m_aURL); else ret = new HCA_JS (m_aJSCode); ret.setTarget (m_aTarget); return ret.addChild (m_aLabel); } }
aRow.addCell (aItem.getKey ()); aRow.addCell (EWebBasicsText.getYesOrNo (aItem.isInternal (), aDisplayLocale)); aRow.addCell (HCA.createLinkedWebsite (aItem.getTargetURLAsString ())); aRow.addCell (EWebBasicsText.getYesOrNo (aItem.isEditable (), aDisplayLocale));
@Nonnull private static IHCNode _getModuleHCNode (@Nonnull final IThirdPartyModule aModule, @Nonnull final Locale aDisplayLocale) { final HCNodeList aNL = new HCNodeList (); // Module name String sModuleText = aModule.getDisplayName (); if (aModule.getVersion () != null) sModuleText += ' ' + aModule.getVersion ().getAsString (); // Link (if available) if (aModule.getWebSiteURL () == null) aNL.addChild (sModuleText); else aNL.addChild (new HCA (aModule.getWebSiteURL ()).setTarget (HC_Target.BLANK).addChild (sModuleText)); aNL.addChild (EText.MSG_LICENSED_UNDER.getDisplayText (aDisplayLocale)); // License text String sLicenseText = aModule.getLicense ().getDisplayName (); if (aModule.getLicense ().getVersion () != null) sLicenseText += ' ' + aModule.getLicense ().getVersion ().getAsString (); // Link (if available) if (aModule.getLicense ().getURL () == null) aNL.addChild (sLicenseText); else aNL.addChild (new HCA (aModule.getLicense ().getURL ()).setTarget (HC_Target.BLANK).addChild (sLicenseText)); return aNL; }
@Nonnull public BootstrapDropdownMenu addDropdownMenu (@Nullable final IHCNode aText) { final HCLI aLI = addItem ().addClass (CBootstrapCSS.DROPDOWN); aLI.addChild (BootstrapDropdownMenu.makeDropdownToggle (new HCA (new SimpleURL ()).addChild (aText))); final BootstrapDropdownMenu aMenu = aLI.addAndReturnChild (new BootstrapDropdownMenu ()); return aMenu; } }
@Nonnull public static HCA createEditLink (@Nonnull final ILayoutExecutionContext aLEC, @Nonnull final IHasID <String> aCurObject, @Nullable final String sTitle, @Nullable final Map <String, String> aParams) { final ISimpleURL aEditURL = createEditURL (aLEC, aCurObject).addAll (aParams); return new HCA (aEditURL).setTitle (sTitle).addChild (getEditImg ()); }
@Nonnull public static HCA createNestedCreateLink (@Nonnull final ILayoutExecutionContext aLEC, @Nonnull final IHasID <String> aCurObject, @Nullable final String sTitle) { final ISimpleURL aURL = createCreateURL (aLEC).add (CHCParam.PARAM_OBJECT, aCurObject.getID ()); return new HCA (aURL).setTitle (sTitle).addChild (getCreateImg ()); } }
aRow.addCell (new HCA (aViewLink).addChild (SecurityUtils.getUserDisplayName (aCurUser, aDisplayLocale))); if (bSeparateLoginName) aRow.addCell (new HCA (aViewLink).addChild (aCurUser.getLoginName ())); aRow.addCell (new HCA (aViewLink).addChild (aCurUser.getEmailAddress ())); aUserGroupsStr.append (aUserGroup.getName ()); aRow.addCell (new HCA (aViewLink).addChild (aUserGroupsStr.toString ())); if (canResetPassword (aCurUser)) aActionCell.addChild (new HCA (aWPEC.getSelfHref () .add (CHCParam.PARAM_ACTION, ACTION_RESET_PASSWORD) .add (CHCParam.PARAM_OBJECT, aCurUser.getID ())).setTitle (EText.TITLE_RESET_PASSWORD.getDisplayTextWithArgs (aDisplayLocale, SecurityUtils.getUserDisplayName (aCurUser, aDisplayLocale)))
aRow.addCell (new HCA (aViewLink).addChild (aCurObject.getName ())); aRow.addCell (aSettings.getHostName () + (aSettings.getPort () > 0 ? ":" + aSettings.getPort () : "")); aRow.addCell (aSettings.getUserName ()); aActionCell.addChild (createEmptyAction ()); aActionCell.addChild (new HCA (aWPEC.getSelfHref () .add (CHCParam.PARAM_ACTION, ACTION_TEST_MAIL) .add (CHCParam.PARAM_OBJECT, aCurObject.getID ())).setTitle (EText.MSG_SEND_TEST_MAIL.getDisplayText (aDisplayLocale)) .addChild (getTestMailIcon ()));