Browse Source

Web forms: Add dev profile checks

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.3-alpha
Pekka Helenius 4 years ago
parent
commit
12ba93f42d
2 changed files with 5 additions and 3 deletions
  1. +3
    -1
      bookstore/src/main/resources/templates/fragments/footerpart.html
  2. +2
    -2
      bookstore/src/main/resources/templates/fragments/loginout.html

+ 3
- 1
bookstore/src/main/resources/templates/fragments/footerpart.html View File

@ -11,7 +11,9 @@ target domain environment. Once fully implemented, footer relative URLs should w
<div style="margin-top: 400px;"> <div style="margin-top: 400px;">
<p>Dev note: This footer is fetched from an external URL and presented only for demonstration purposes.</p>
<p th:if="${@environment.getActiveProfiles()[0] == 'dev'}">
Dev note: This footer is fetched from an external URL and presented only for demonstration purposes.
</p>
<footer th:replace="${@ExternalUrl.getUrl('https://fjordtek.com/')} ? ~{https://fjordtek.com/ :: footer} : _"></footer> <footer th:replace="${@ExternalUrl.getUrl('https://fjordtek.com/')} ? ~{https://fjordtek.com/ :: footer} : _"></footer>
<!--/* [//div[@id='footer']]" */--> <!--/* [//div[@id='footer']]" */-->


+ 2
- 2
bookstore/src/main/resources/templates/fragments/loginout.html View File

@ -93,12 +93,12 @@ h2consolepage = ${@environment.getProperty('spring.h2.console.path')}
</button> </button>
</div> </div>
</form> </form>
<th:block th:replace="fragments/devusers :: devusers"/>
<th:block th:replace="${@environment.getActiveProfiles()[0] == 'dev'} ? ~{fragments/devusers :: devusers} : _"/>
</div> </div>
<!--/* <!--/*
** END: login elements ** ** END: login elements **
*/--> */-->
<div style="margin: 10px 0;">
<div th:if="${@environment.getActiveProfiles()[0] == 'dev'}" style="margin: 10px 0;">
<a th:href="@{__${h2consolepage}__}">H2 database console (dev phase only)</a> <a th:href="@{__${h2consolepage}__}">H2 database console (dev phase only)</a>
</div> </div>
</div> </div>


Loading…
Cancel
Save