Search in sources :

Example 21 with BootstrapViewForm

use of com.helger.photon.bootstrap4.form.BootstrapViewForm in project peppol-practical by phax.

the class PagePublicToolsTestEndpoints method showSelectedObject.

@Override
protected void showSelectedObject(@Nonnull final WebPageExecutionContext aWPEC, @Nonnull final TestEndpoint aSelectedObject) {
    final HCNodeList aNodeList = aWPEC.getNodeList();
    final BootstrapViewForm aForm = aNodeList.addAndReturnChild(new BootstrapViewForm());
    aForm.addFormGroup(new BootstrapFormGroup().setLabel("Creation").setCtrl(AppCommonUI.getDTAndUser(aWPEC, aSelectedObject.getCreationDateTime(), aSelectedObject.getCreationUserID())));
    if (aSelectedObject.getLastModificationDateTime() != null) {
        aForm.addFormGroup(new BootstrapFormGroup().setLabel("Last modification").setCtrl(AppCommonUI.getDTAndUser(aWPEC, aSelectedObject.getLastModificationDateTime(), aSelectedObject.getLastModificationUserID())));
    }
    if (aSelectedObject.getDeletionDateTime() != null) {
        aForm.addFormGroup(new BootstrapFormGroup().setLabel("Deletion").setCtrl(AppCommonUI.getDTAndUser(aWPEC, aSelectedObject.getDeletionDateTime(), aSelectedObject.getDeletionUserID())));
    }
    aForm.addFormGroup(new BootstrapFormGroup().setLabel("Company name").setCtrl(aSelectedObject.getCompanyName()));
    if (StringHelper.hasText(aSelectedObject.getContactPerson())) {
        aForm.addFormGroup(new BootstrapFormGroup().setLabel("Contact person").setCtrl(aSelectedObject.getContactPerson()));
    }
    aForm.addFormGroup(new BootstrapFormGroup().setLabel("Participant information").setCtrl(aSelectedObject.getParticipantIDIssuer() + ":" + aSelectedObject.getParticipantIDValue()));
    aForm.addFormGroup(new BootstrapFormGroup().setLabel("Transport profile").setCtrl(AppHelper.getSMPTransportProfileShortName(aSelectedObject.getTransportProfile()) + " (" + aSelectedObject.getTransportProfile().getID() + ")"));
    aForm.addFormGroup(new BootstrapFormGroup().setLabel("SML").setCtrl(aSelectedObject.getSML().getDisplayName()));
}
Also used : HCNodeList(com.helger.html.hc.impl.HCNodeList) BootstrapViewForm(com.helger.photon.bootstrap4.form.BootstrapViewForm) BootstrapFormGroup(com.helger.photon.bootstrap4.form.BootstrapFormGroup)

Aggregations

HCNodeList (com.helger.html.hc.impl.HCNodeList)21 BootstrapFormGroup (com.helger.photon.bootstrap4.form.BootstrapFormGroup)21 BootstrapViewForm (com.helger.photon.bootstrap4.form.BootstrapViewForm)21 Locale (java.util.Locale)18 HCA (com.helger.html.hc.html.textlevel.HCA)7 PDTToString (com.helger.commons.datetime.PDTToString)5 Nonnull (javax.annotation.Nonnull)5 BootstrapCard (com.helger.photon.bootstrap4.card.BootstrapCard)4 IHCNode (com.helger.html.hc.IHCNode)3 HCDiv (com.helger.html.hc.html.grouping.HCDiv)3 IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)3 SMPBusinessCardEntity (com.helger.phoss.smp.domain.businesscard.SMPBusinessCardEntity)3 BootstrapTable (com.helger.photon.bootstrap4.table.BootstrapTable)3 Nonempty (com.helger.commons.annotation.Nonempty)2 CommonsArrayList (com.helger.commons.collection.impl.CommonsArrayList)2 ICommonsList (com.helger.commons.collection.impl.ICommonsList)2 ICommonsMap (com.helger.commons.collection.impl.ICommonsMap)2 PDTFromString (com.helger.commons.datetime.PDTFromString)2 StringHelper (com.helger.commons.string.StringHelper)2 HCOL (com.helger.html.hc.html.grouping.HCOL)2