This is an automated email from the ASF dual-hosted git repository. danhaywood pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/isis.git
commit 99c58a5d24c07a365c3b1dbe41fe82157df20be5 Author: danhaywood <d...@haywood-associates.co.uk> AuthorDate: Fri Oct 19 00:30:52 2018 +0200 ISIS-2022: reworks about page show the application.version on footer panel, read from config props --- .../ugvw/_ugvw_configuration-properties.adoc | 20 ----------- .../asciidoc/guides/ugvw/_ugvw_customisation.adoc | 1 + .../ugvw/_ugvw_customisation_auto-refresh.adoc | 2 +- .../_ugvw_customisation_top-level-index-page.adoc | 35 +++++++++++++++++++ .../ugvw/_ugvw_customisation_welcome-page.adoc | 9 ++++- .../viewer/wicket/viewer/IsisWicketModule.java | 23 ++++++------- .../wicket/ui/components/about/AboutPanel.html | 3 ++ .../wicket/ui/components/about/AboutPanel.java | 40 ++++++++++++++++++++-- .../ui/components/about/JarManifestModel.java | 31 +---------------- .../ui/components/about/JarManifestPanel.css | 14 +------- .../ui/components/about/JarManifestPanel.html | 3 +- .../ui/components/about/JarManifestPanel.java | 25 +++----------- .../wicket/ui/components/footer/FooterPanel.html | 10 +++--- .../wicket/ui/components/footer/FooterPanel.java | 12 ++++++- .../viewer/wicket/ui/pages/bootstrap-overrides.css | 36 ++++++++++++++++++- 15 files changed, 153 insertions(+), 111 deletions(-) diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc index 708c015..d1bcbfe 100644 --- a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_configuration-properties.adoc @@ -123,26 +123,6 @@ If not specified, the `application.name` is used instead. |=== -As well as the `welcome.html` file, applications can also define an about file, residing in `about/index.html` (relative to `/src/main/webapp`). - -This page is shown as the root; the archetypes provide a version of this file that hyperlink to the wicket and swagger UIs. - - -[TIP] -==== -To redirect straight to the Wicket sign-in page, replace this file with: - -.about/index.html -[source,html] ----- -<html> -<head> - <META HTTP-EQUIV="Refresh" CONTENT="0; URL=wicket/"/> -</head> -</html> ----- -==== - diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation.adoc index 0c517d4..d8e75f8 100644 --- a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation.adoc @@ -6,6 +6,7 @@ +include::_ugvw_customisation_top-level-index-page.adoc[leveloffset=+1] include::_ugvw_customisation_brand-logo.adoc[leveloffset=+1] include::_ugvw_customisation_default-theme.adoc[leveloffset=+1] include::_ugvw_customisation_welcome-page.adoc[leveloffset=+1] diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_auto-refresh.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_auto-refresh.adoc index a198654..0f27102 100644 --- a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_auto-refresh.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_auto-refresh.adoc @@ -24,7 +24,7 @@ public class MyDomainObject { } ---- -* Then, use javascript in `webapp/src/main/webapp/scripts/application.js` to reload: + +* Then, use javascript in `scripts/application.js` (under `src/main/webapp/`) to reload: + [source,javascript] ---- diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_top-level-index-page.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_top-level-index-page.adoc new file mode 100644 index 0000000..cbc6f38 --- /dev/null +++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_top-level-index-page.adoc @@ -0,0 +1,35 @@ +[[_ugvw_customisation_top-level-index-page]] += Top-level Index Page +:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...] +:_basedir: ../../ +:_imagesdir: images/ + + +If the user visits the root of the webapp (eg http://localhost:8080[]), then a top-level index page can specified. +This is a static file that typically has hyperlinks to the available resources available (eg the Wicket viewer at `/wicket/`, the Swagger UI is bound to `/swagger-ui`, the Restful at `/restful/`). + +The archetypes provide an example in the `about/index.html` file (relative to `src/main/webapp`). +This is configured using the `web.xml`: + + +.web.xml +[source,xml] +---- +<welcome-file-list> + <welcome-file>about/index.html</welcome-file> +</welcome-file-list> +---- + +If instead you want to redirect users directly to the Wicket viewer, then this file should contain simply: + +.about/index.html +[source,html] +---- +<html> +<head> + <META HTTP-EQUIV="Refresh" CONTENT="0; URL=wicket/"/> +</head> +</html> +---- +==== + diff --git a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_welcome-page.adoc b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_welcome-page.adoc index d1a3589..eaf3f9e 100644 --- a/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_welcome-page.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/ugvw/_ugvw_customisation_welcome-page.adoc @@ -17,6 +17,12 @@ isis.viewer.wicket.application.about=My Wonderful App v1.0 ---- <1> the `welcome.html` file is resolved relative to `src/main/webapp`. +[TIP] +==== +Do not confuse the welcome page file with the xref:ugvw.adoc#_ugvw_customisation_top-level-index-page[top-level index page]; they are different things! +==== + + The `application.name` is used both on the sign-in page and also top-left on the header. It's also possible to replace this text with images: @@ -27,4 +33,5 @@ isis.viewer.wicket.application.brandLogoSignin=/images/logo-512.png isis.viewer.wicket.application.brandLogoHeader=/images/logo-80x32.png ---- -These images are resolved relative to `src/main/webapp`. \ No newline at end of file +These images are resolved relative to `src/main/webapp`. + diff --git a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java index c29edb7..208d064 100644 --- a/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java +++ b/core/viewer-wicket-impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketModule.java @@ -62,19 +62,7 @@ import static org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.readLin * protected void configure() { * bind(ComponentFactoryRegistrar.class).to(ComponentFactoryRegistrarForMyApp.class); * bind(PageClassList.class).to(PageClassListForMyApp.class); -<<<<<<< HEAD - * ... - * bind(String.class).annotatedWith(Names.named("applicationName")).toInstance("My App"); - * bind(String.class).annotatedWith(Names.named("brandLogoHeader")).toInstance("/images/myapp-logo-header.png"); - * bind(String.class).annotatedWith(Names.named("brandLogoSignin")).toInstance("/images/myapp-logo-signin.png"); - * bind(String.class).annotatedWith(Names.named("applicationCss")).toInstance("css/application.css"); - * bind(String.class).annotatedWith(Names.named("applicationJs")).toInstance("scripts/application.js"); - * bind(String.class).annotatedWith(Names.named("welcomeMessage")).toInstance("Hello, welcome to my app"); - * bind(String.class).annotatedWith(Names.named("aboutMessage")).toInstance("MyApp v1.0.0"); - * bind(AppManifest.class).toInstance(new MyAppManifest()); -======= * ... ->>>>>>> 5742167210... ISIS-2003: adds new config props to mostly avoid need to subclass IsisWicketApplication. * } * }; * final Module overridden = Modules.override(isisDefaults).with(myAppOverrides); @@ -105,6 +93,7 @@ public class IsisWicketModule extends AbstractModule { // these services need to be bound because they injected directly into // Wicket panels outside of the Isis runtime. + bind(EmailService.class) .to(EmailServiceDefault.class); bind(EmailNotificationService.class) @@ -158,12 +147,20 @@ public class IsisWicketModule extends AbstractModule { }); final String welcomeFile = isisConfigIfAny.getString("isis.viewer.wicket.welcome.file", "welcome.html"); bind(String.class).annotatedWith(Names.named("welcomeMessage")) - .toProvider(new Provider<String>() { + .toProvider( + new Provider<String>() { @Override public String get() { return readLines(getClass(), welcomeFile, isisConfigIfAny.getString("isis.viewer.wicket.welcome.text")); } }); + bind(String.class).annotatedWith(Names.named("applicationVersion")) + .toProvider( + new Provider<String>() { + @Override public String get() { + return isisConfigIfAny.getString("isis.viewer.wicket.application.version"); + } + }); } bind(InputStream.class).annotatedWith(Names.named("metaInfManifest")) .toProvider(new Provider<InputStream>() { diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/AboutPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/AboutPanel.html index c85780d..ba8561e 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/AboutPanel.html +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/AboutPanel.html @@ -20,6 +20,9 @@ <html xmlns:wicket="http://wicket.apache.org"> <wicket:panel> <div class="aboutPanel aboutComponentType"> + <h2 wicket:id="applicationName" class="applicationName">[application name]</h2> + <h4 wicket:id="applicationVersion" class="applicationVersion">[application version]</h4> + <p wicket:id="aboutMessage" class="aboutMessage">[about message]</p> <div wicket:id="manifestAttributes"></div> </div> </wicket:panel> diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/AboutPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/AboutPanel.java index b806787..42684c9 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/AboutPanel.java +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/AboutPanel.java @@ -23,6 +23,8 @@ import java.io.InputStream; import com.google.inject.name.Named; +import org.apache.wicket.markup.html.basic.Label; + import org.apache.isis.viewer.wicket.model.models.AboutModel; import org.apache.isis.viewer.wicket.ui.pages.home.HomePage; import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract; @@ -38,9 +40,37 @@ public class AboutPanel extends PanelAbstract<AboutModel> { private static final String ID_MANIFEST_ATTRIBUTES = "manifestAttributes"; @com.google.inject.Inject + @Named("applicationName") + private String applicationName; + + @com.google.inject.Inject + @Named("applicationVersion") + private String applicationVersion; + + @com.google.inject.Inject @Named("aboutMessage") private String aboutMessage; - + + private static final String ID_APPLICATION_NAME = "applicationName"; + private static final String ID_APPLICATION_VERSION = "applicationVersion"; + private static final String ID_ABOUT_MESSAGE = "aboutMessage"; + + + public static class LabelVisibleOnlyIfNonEmpty extends Label { + + private final String label; + + public LabelVisibleOnlyIfNonEmpty(final String id, final String label) { + super(id, label); + this.label = label; + } + + @Override protected void onConfigure() { + super.onConfigure(); + setVisibilityAllowed(label != null && !label.isEmpty()); + } + } + /** * We take care to read this only once. * @@ -56,9 +86,13 @@ public class AboutPanel extends PanelAbstract<AboutModel> { public AboutPanel(final String id) { super(id); - + + add(new LabelVisibleOnlyIfNonEmpty(ID_APPLICATION_NAME, applicationName)); + add(new LabelVisibleOnlyIfNonEmpty(ID_APPLICATION_VERSION, applicationVersion)); + add(new LabelVisibleOnlyIfNonEmpty(ID_ABOUT_MESSAGE, aboutMessage)); + if(jarManifestModel == null) { - jarManifestModel = new JarManifestModel(aboutMessage, metaInfManifestIs); + jarManifestModel = new JarManifestModel(metaInfManifestIs); } add(new JarManifestPanel(ID_MANIFEST_ATTRIBUTES, jarManifestModel)); diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestModel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestModel.java index d78a290..f57b9ab 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestModel.java +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestModel.java @@ -43,30 +43,20 @@ public class JarManifestModel extends ModelAbstract<JarManifestModel> { private static final long serialVersionUID = 1L; private static final List<String> VERSION_KEY_CANDIDATES = Arrays.asList("Implementation-Version", "Build-Time"); - - private String aboutMessage; private final List<JarManifestAttributes> manifests = Lists.newArrayList(); /** - * @param aboutMessage * @param metaInfManifestIs provide using <tt>getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")</tt> */ - public JarManifestModel(String aboutMessage, InputStream metaInfManifestIs) { + public JarManifestModel(InputStream metaInfManifestIs) { - this.aboutMessage = aboutMessage; - Manifest manifest; try { manifest = new Manifest(metaInfManifestIs); manifests.add(JarManifestAttributes.jarName("Web archive (war file)")); manifests.add(JarManifestAttributes.jarUrl(null)); addAttributes(manifest, manifests); - - // append the version if able to guess - String versionIfAny = guessVersion(manifest); - this.aboutMessage = this.aboutMessage + (versionIfAny != null? "\n\n" + versionIfAny: ""); - } catch (Exception ex) { // ignore } finally { @@ -197,21 +187,6 @@ public class JarManifestModel extends ModelAbstract<JarManifestModel> { } } - - private static String guessVersion(Manifest manifest) { - final Attributes mainAttribs = manifest.getMainAttributes(); - Set<Entry<Object, Object>> entrySet = mainAttribs.entrySet(); - for (String candidate : VERSION_KEY_CANDIDATES) { - for (Entry<Object, Object> entry : entrySet) { - if(candidate.equals(entry.getKey().toString())) { - return entry.getValue().toString(); - } - } - } - return null; - } - - @Override protected JarManifestModel load() { return this; @@ -222,10 +197,6 @@ public class JarManifestModel extends ModelAbstract<JarManifestModel> { // no-op } - public String getAboutMessage() { - return aboutMessage; - } - public List<JarManifestAttributes> getDetail() { return manifests; } diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.css index 2f05abd..172af9c 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.css +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.css @@ -17,24 +17,12 @@ * under the License. */ - .jarManifestPanel .aboutInfo { +.jarManifestPanel .aboutInfo { margin-left: 50px; margin-right: 50px; - padding-top: 50px; } -.jarManifestPanel .aboutMessage { - background:#FFFFFF; - border-radius:4px; - -moz-border-radius:4px; - -webkit-border-radius:4px; - padding: 15px; - display: block; - text-align:center; - font-size:1.2em; -} - .jarManifestPanel .manifestAttributes { margin-top: 30px; } diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.html index 340922a..a3bc6b3 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.html +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.html @@ -26,9 +26,8 @@ <wicket:panel> <div class="jarManifestPanel"> <div class="aboutInfo clear"> - <h2 wicket:id="aboutMessage" class="aboutMessage">[about message text]</h2> <div class="manifestAttributes" wicket:id="manifestAttributes"> - <h4 class="heading well">Jar manifest attributes</h4> + <h4 class="heading well"></h4> <div class="content"> <div class="manifestAttributesList"> <ul> diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.java index 8a76487..e8d5d00 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.java +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/about/JarManifestPanel.java @@ -21,43 +21,26 @@ package org.apache.isis.viewer.wicket.ui.components.about; import org.apache.wicket.MarkupContainer; import org.apache.wicket.markup.head.IHeaderResponse; -import org.apache.wicket.markup.head.JavaScriptReferenceHeaderItem; import org.apache.wicket.markup.html.WebMarkupContainer; -import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.markup.html.panel.Panel; -import org.apache.wicket.request.resource.JavaScriptResourceReference; + import org.apache.isis.viewer.wicket.ui.panels.PanelUtil; public class JarManifestPanel extends Panel { private static final long serialVersionUID = 1L; - private static final String ID_ABOUT_MESSAGE = "aboutMessage"; - private static final String ID_MANIFEST_ATTRIBUTES = "manifestAttributes"; private static final String ID_MANIFEST_ATTRIBUTE = "manifestAttribute"; private static final String ID_LINE = "manifestAttributeLine"; - private static final JavaScriptResourceReference DIV_TOGGLE_JS = new JavaScriptResourceReference(JarManifestPanel.class, "div-toggle.js"); - public JarManifestPanel(String id, JarManifestModel manifestModel) { super(id, manifestModel); - final String aboutMessage = manifestModel.getAboutMessage(); - final Label label = new Label(ID_ABOUT_MESSAGE, aboutMessage); - // safe to not escape, about message is read from file (part of deployed WAR) - label.setEscapeModelStrings(false); - add(label); - - MarkupContainer container = new WebMarkupContainer(ID_MANIFEST_ATTRIBUTES) { - private static final long serialVersionUID = 1L; - @Override - public void renderHead(IHeaderResponse response) { - response.render(JavaScriptReferenceHeaderItem.forReference(DIV_TOGGLE_JS)); - } - }; - container.add(new JarManifestListView(ID_MANIFEST_ATTRIBUTE, JarManifestPanel.ID_LINE, manifestModel.getDetail())); + final MarkupContainer container = new WebMarkupContainer(ID_MANIFEST_ATTRIBUTES); + container.add( + new JarManifestListView(ID_MANIFEST_ATTRIBUTE, JarManifestPanel.ID_LINE, manifestModel.getDetail())); add(container); } diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/footer/FooterPanel.html b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/footer/FooterPanel.html index ac1e968..13102ee 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/footer/FooterPanel.html +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/footer/FooterPanel.html @@ -46,24 +46,24 @@ <li> <a tabindex="-1" wicket:id="credit1" > <img wicket:id="credit1Image" class="footer-image"/> - <span wicket:id="credit1Name"></span> + <span wicket:id="credit1Name" class="creditName"></span> </a> </li> <li> <a tabindex="-1" wicket:id="credit2" > <img wicket:id="credit2Image" class="footer-image"/> - <span wicket:id="credit2Name"></span> + <span wicket:id="credit2Name" class="creditName"></span> </a> </li> <li> <a tabindex="-1" wicket:id="credit3" > - <img wicket:id="credit3Image" class="footer-image"/> - <span wicket:id="credit3Name"></span> + <img wicket:id="credit3Image" class="footer-image"/> + <span wicket:id="credit3Name" class="creditName"></span> </a> </li> <li> <a wicket:id="aboutLink" tabindex="-1" id="aboutLink" class="navbar-right"> - <span wicket:id="aboutMessage">About</span> + <span class="aboutMessage" wicket:id="aboutMessage">About</span> <i wicket:id="devModeWarning" class="fa fa-lg fa-warning text-danger" title="Running in Prototype (Development) mode!"/> </a> diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/footer/FooterPanel.java b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/footer/FooterPanel.java index 015291a..bcdfd26 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/footer/FooterPanel.java +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/footer/FooterPanel.java @@ -18,6 +18,8 @@ */ package org.apache.isis.viewer.wicket.ui.components.footer; +import com.google.inject.name.Named; + import org.apache.wicket.Component; import org.apache.wicket.MarkupContainer; import org.apache.wicket.markup.ComponentTag; @@ -50,6 +52,10 @@ public class FooterPanel extends PanelAbstract<Model<String>> { private static final String ID_ABOUT_MESSAGE = "aboutMessage"; private static final String ID_THEME_PICKER = "themePicker"; + @com.google.inject.Inject + @Named("applicationVersion") + private String applicationVersion; + /** * Constructor. @@ -197,7 +203,11 @@ public class FooterPanel extends PanelAbstract<Model<String>> { final BookmarkablePageLink<Void> aboutLink = new BookmarkablePageLink<>(ID_ABOUT_LINK, AboutPage.class); add(aboutLink); - final Label aboutLabel = new Label(ID_ABOUT_MESSAGE, new ResourceModel("aboutLabel")); + final Label aboutLabel = + applicationVersion != null && !applicationVersion.isEmpty()? + new Label(ID_ABOUT_MESSAGE, applicationVersion) : + new Label(ID_ABOUT_MESSAGE, new ResourceModel("aboutLabel")) + ; aboutLink.add(aboutLabel); addDevModeWarning(aboutLink); } diff --git a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css index c60fb75..da16f15 100644 --- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css +++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/bootstrap-overrides.css @@ -446,11 +446,21 @@ span.containedButtonPanel { } + .navbar .powered-by { - margin-right: 0px; + margin-right: 10px; + font-size: small; + font-style: italic; + vertical-align: middle; } +.navbar .creditName { + vertical-align: middle; +} +.navbar .aboutMessage { + vertical-align: middle; +} @@ -998,3 +1008,27 @@ such as https://chrome.google.com/webstore/detail/focus-indicator/heeoeadndnhebm .popover .open > .dropdown-menu { overflow: visible; } + +.aboutPanel .aboutMessage { + font-size:1.2em; + margin-left:50px; + margin-right:50px; + padding: 10px; +} + +.aboutPanel .applicationName, +.aboutPanel .applicationVersion { + text-align:center; +} + +.aboutPanel .applicationName, +.aboutPanel .applicationVersion, +.aboutPanel .aboutMessage { + background:#FFFFFF; + border-radius:4px; + -moz-border-radius:4px; + -webkit-border-radius:4px; + padding: 5px; + display: block; +} +