Skip to content

Commit

Permalink
Using Spring Boot Dataflow UI graphic theme
Browse files Browse the repository at this point in the history
  • Loading branch information
arey committed Apr 8, 2016
1 parent e74b1bc commit 44b591f
Show file tree
Hide file tree
Showing 117 changed files with 18,566 additions and 7,666 deletions.
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,33 @@
</plugins>
</build>
</profile>
<profile>
<id>less-install</id>
<build>
<plugins>
<plugin>
<groupId>org.lesscss</groupId>
<artifactId>lesscss-maven-plugin</artifactId>
<version>1.7.0.1.1</version>
<configuration>
<sourceDirectory>${project.basedir}/src/main/webapp/resources/less</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/webapp/resources/css</outputDirectory>
<compress>true</compress>
<includes>
<include>petclinic.less</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<url>demopetclinic</url>
Expand Down
15 changes: 9 additions & 6 deletions src/main/webapp/WEB-INF/jsp/exception.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@

<body>
<petclinic:bodyHeader menuName="error"/>
<div class="container">
<div class="container-fluid">
<div class="container xd-container">

<spring:url value="/resources/images/pets.png" var="petsImage"/>
<img src="${petsImage}"/>
<spring:url value="/resources/images/pets.png" var="petsImage"/>
<img src="${petsImage}"/>

<h2>Something happened...</h2>
<h2>Something happened...</h2>

<p>${exception.message}</p>
<p>${exception.message}</p>

<!-- Exception: ${exception.message}.
<!-- Exception: ${exception.message}.
<c:forEach items="${exception.stackTrace}" var="stackTrace">
${stackTrace}
</c:forEach>
-->
<petclinic:pivotal/>
</div>
</div>
<jsp:include page="fragments/footer.jsp"/>
</body>
Expand Down
7 changes: 0 additions & 7 deletions src/main/webapp/WEB-INF/jsp/fragments/footer.jsp
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>

<div class="container">
<div class="row">
<div class="col-12 text-center"><img src="<spring:url value="/resources/images/spring-pivotal-logo.png" htmlEscape="true" />"
alt="Sponsored by Pivotal"/></div>
</div>
</div>

<%-- Placed at the end of the document so the pages load faster --%>
<spring:url value="/vendors/jquery/jquery.min.js" var="jQuery"/>
<script src="${jQuery}"></script>
Expand Down
9 changes: 1 addition & 8 deletions src/main/webapp/WEB-INF/jsp/fragments/htmlHeader.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ PetClinic :: a Spring Framework demonstration

<title>PetClinic :: a Spring Framework demonstration</title>

<%-- Bootstrap CSS --%>
<spring:url value="/vendors/bootstrap/dist/css/bootstrap.min.css" var="bootstrapCss"/>
<link href="${bootstrapCss}" rel="stylesheet">
<spring:url value="/vendors/bootstrap/dist/css/bootstrap-theme.min.css" var="bootstrapThemeCss"/>
<link href="${bootstrapThemeCss}" rel="stylesheet">


<%-- Custom styles for Petclinic --%>
<%-- CSS generated from LESS --%>
<spring:url value="/resources/css/petclinic.css" var="petclinicCss"/>
<link href="${petclinicCss}" rel="stylesheet"/>

Expand Down
51 changes: 27 additions & 24 deletions src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,34 @@

<body>
<petclinic:bodyHeader menuName="owners"/>
<div class="container">
<h2>
<c:if test="${owner['new']}">New </c:if> Owner
</h2>
<form:form modelAttribute="owner" class="form-horizontal" id="add-owner-form">
<div class="form-group has-feedback">
<petclinic:inputField label="First Name" name="firstName"/>
<petclinic:inputField label="Last Name" name="lastName"/>
<petclinic:inputField label="Address" name="address"/>
<petclinic:inputField label="City" name="city"/>
<petclinic:inputField label="Telephone" name="telephone"/>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<c:choose>
<c:when test="${owner['new']}">
<button class="btn btn-primary" type="submit">Add Owner</button>
</c:when>
<c:otherwise>
<button class="btn btn-primary" type="submit">Update Owner</button>
</c:otherwise>
</c:choose>
<div class="container-fluid">
<div class="container xd-container">
<h2>
<c:if test="${owner['new']}">New </c:if> Owner
</h2>
<form:form modelAttribute="owner" class="form-horizontal" id="add-owner-form">
<div class="form-group has-feedback">
<petclinic:inputField label="First Name" name="firstName"/>
<petclinic:inputField label="Last Name" name="lastName"/>
<petclinic:inputField label="Address" name="address"/>
<petclinic:inputField label="City" name="city"/>
<petclinic:inputField label="Telephone" name="telephone"/>
</div>
</div>
</form:form>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<c:choose>
<c:when test="${owner['new']}">
<button class="btn btn-default" type="submit">Add Owner</button>
</c:when>
<c:otherwise>
<button class="btn btn-default" type="submit">Update Owner</button>
</c:otherwise>
</c:choose>
</div>
</div>
</form:form>
<petclinic:pivotal/>
</div>
</div>
<jsp:include page="../fragments/footer.jsp"/>
</body>
Expand Down
46 changes: 25 additions & 21 deletions src/main/webapp/WEB-INF/jsp/owners/findOwners.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,36 @@

<body>
<petclinic:bodyHeader menuName="owners"/>
<div class="container">

<h2>Find Owners</h2>

<spring:url value="/owners.html" var="formUrl"/>
<form:form modelAttribute="owner" action="${fn:escapeXml(formUrl)}" method="get" class="form-horizontal"
id="search-owner-form">
<div class="form-group">
<div class="control-group" id="lastName">
<label class="col-sm-2 control-label">Last name </label>
<div class="col-sm-10">
<form:input class="form-control" path="lastName" size="30" maxlength="80"/>
<span class="help-inline"><form:errors path="*"/></span>
<div class="container-fluid">
<div class="container xd-container">

<h2>Find Owners</h2>

<spring:url value="/owners.html" var="formUrl"/>
<form:form modelAttribute="owner" action="${fn:escapeXml(formUrl)}" method="get" class="form-horizontal"
id="search-owner-form">
<div class="form-group">
<div class="control-group" id="lastName">
<label class="col-sm-2 control-label">Last name </label>
<div class="col-sm-10">
<form:input class="form-control" path="lastName" size="30" maxlength="80"/>
<span class="help-inline"><form:errors path="*"/></span>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary">Find Owner</button>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Find Owner</button>
</div>
</div>
</div>

</form:form>
</form:form>

<br/>
<a class="btn btn-default" href='<spring:url value="/owners/new" htmlEscape="true"/>'>Add Owner</a>

<br/>
<a class="btn btn-default" href='<spring:url value="/owners/new" htmlEscape="true"/>'>Add Owner</a>
<petclinic:pivotal/>
</div>
</div>

<jsp:include page="../fragments/footer.jsp"/>
Expand Down
169 changes: 87 additions & 82 deletions src/main/webapp/WEB-INF/jsp/owners/ownerDetails.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -14,94 +14,99 @@

<body>
<petclinic:bodyHeader menuName="owners"/>
<div class="container">

<h2>Owner Information</h2>


<table class="table table-striped">
<tr>
<th>Name</th>
<td><b><c:out value="${owner.firstName} ${owner.lastName}"/></b></td>
</tr>
<tr>
<th>Address</th>
<td><c:out value="${owner.address}"/></td>
</tr>
<tr>
<th>City</th>
<td><c:out value="${owner.city}"/></td>
</tr>
<tr>
<th>Telephone</th>
<td><c:out value="${owner.telephone}"/></td>
</tr>
</table>

<spring:url value="{ownerId}/edit.html" var="editUrl">
<spring:param name="ownerId" value="${owner.id}"/>
</spring:url>
<a href="${fn:escapeXml(editUrl)}" class="btn btn-default">Edit Owner</a>

<spring:url value="{ownerId}/pets/new.html" var="addUrl">
<spring:param name="ownerId" value="${owner.id}"/>
</spring:url>
<a href="${fn:escapeXml(addUrl)}" class="btn btn-primary">Add New Pet</a>


<h2>Pets and Visits</h2>

<table class="table table-striped">
<c:forEach var="pet" items="${owner.pets}">
<div class="container-fluid">
<div class="container xd-container">

<h2>Owner Information</h2>


<table class="table table-striped">
<tr>
<th>Name</th>
<td><b><c:out value="${owner.firstName} ${owner.lastName}"/></b></td>
</tr>
<tr>
<th>Address</th>
<td><c:out value="${owner.address}"/></td>
</tr>
<tr>
<td valign="top">
<dl class="dl-horizontal">
<dt>Name</dt>
<dd><c:out value="${pet.name}"/></dd>
<dt>Birth Date</dt>
<dd><joda:format value="${pet.birthDate}" pattern="yyyy-MM-dd"/></dd>
<dt>Type</dt>
<dd><c:out value="${pet.type.name}"/></dd>
</dl>
</td>
<td valign="top">
<table class="table-condensed">
<thead>
<tr>
<th>Visit Date</th>
<th>Description</th>
</tr>
</thead>
<c:forEach var="visit" items="${pet.visits}">
<th>City</th>
<td><c:out value="${owner.city}"/></td>
</tr>
<tr>
<th>Telephone</th>
<td><c:out value="${owner.telephone}"/></td>
</tr>
</table>

<spring:url value="{ownerId}/edit.html" var="editUrl">
<spring:param name="ownerId" value="${owner.id}"/>
</spring:url>
<a href="${fn:escapeXml(editUrl)}" class="btn btn-default">Edit Owner</a>

<spring:url value="{ownerId}/pets/new.html" var="addUrl">
<spring:param name="ownerId" value="${owner.id}"/>
</spring:url>
<a href="${fn:escapeXml(addUrl)}" class="btn btn-default">Add New Pet</a>

<br/>
<br/>
<br/>
<h2>Pets and Visits</h2>

<table class="table table-striped">
<c:forEach var="pet" items="${owner.pets}">

<tr>
<td valign="top">
<dl class="dl-horizontal">
<dt>Name</dt>
<dd><c:out value="${pet.name}"/></dd>
<dt>Birth Date</dt>
<dd><joda:format value="${pet.birthDate}" pattern="yyyy-MM-dd"/></dd>
<dt>Type</dt>
<dd><c:out value="${pet.type.name}"/></dd>
</dl>
</td>
<td valign="top">
<table class="table-condensed">
<thead>
<tr>
<td><joda:format value="${visit.date}" pattern="yyyy-MM-dd"/></td>
<td><c:out value="${visit.description}"/></td>
<th>Visit Date</th>
<th>Description</th>
</tr>
</c:forEach>
<tr>
<td>
<spring:url value="/owners/{ownerId}/pets/{petId}/edit" var="petUrl">
<spring:param name="ownerId" value="${owner.id}"/>
<spring:param name="petId" value="${pet.id}"/>
</spring:url>
<a href="${fn:escapeXml(petUrl)}">Edit Pet</a>
</td>
<td>
<spring:url value="/owners/{ownerId}/pets/{petId}/visits/new" var="visitUrl">
<spring:param name="ownerId" value="${owner.id}"/>
<spring:param name="petId" value="${pet.id}"/>
</spring:url>
<a href="${fn:escapeXml(visitUrl)}">Add Visit</a>
</td>
</tr>
</table>
</td>
</tr>
</thead>
<c:forEach var="visit" items="${pet.visits}">
<tr>
<td><joda:format value="${visit.date}" pattern="yyyy-MM-dd"/></td>
<td><c:out value="${visit.description}"/></td>
</tr>
</c:forEach>
<tr>
<td>
<spring:url value="/owners/{ownerId}/pets/{petId}/edit" var="petUrl">
<spring:param name="ownerId" value="${owner.id}"/>
<spring:param name="petId" value="${pet.id}"/>
</spring:url>
<a href="${fn:escapeXml(petUrl)}">Edit Pet</a>
</td>
<td>
<spring:url value="/owners/{ownerId}/pets/{petId}/visits/new" var="visitUrl">
<spring:param name="ownerId" value="${owner.id}"/>
<spring:param name="petId" value="${pet.id}"/>
</spring:url>
<a href="${fn:escapeXml(visitUrl)}">Add Visit</a>
</td>
</tr>
</table>
</td>
</tr>

</c:forEach>
</table>
</c:forEach>
</table>

<petclinic:pivotal/>
</div>
</div>

<jsp:include page="../fragments/footer.jsp"/>
Expand Down
Loading

0 comments on commit 44b591f

Please sign in to comment.