forked from spring-projects/spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
abstract the page layout into “layout.tag”
- Loading branch information
1 parent
50f46fd
commit a2849f7
Showing
14 changed files
with
287 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,14 @@ | ||
<!DOCTYPE html> | ||
|
||
<%@ page session="false" %> | ||
<%@ page session="false" trimDirectiveWhitespaces="true" %> | ||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> | ||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | ||
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> | ||
|
||
<html lang="en"> | ||
<jsp:include page="fragments/htmlHeader.jsp"/> | ||
|
||
<body> | ||
<petclinic:bodyHeader menuName="error"/> | ||
<div class="container-fluid"> | ||
<div class="container xd-container"> | ||
|
||
<spring:url value="/resources/images/pets.png" var="petsImage"/> | ||
<img src="${petsImage}"/> | ||
<petclinic:layout pageName="error"> | ||
|
||
<h2>Something happened...</h2> | ||
<spring:url value="/resources/images/pets.png" var="petsImage"/> | ||
<img src="${petsImage}"/> | ||
|
||
<p>${exception.message}</p> | ||
<h2>Something happened...</h2> | ||
|
||
<!-- Exception: ${exception.message}. | ||
<c:forEach items="${exception.stackTrace}" var="stackTrace"> | ||
${stackTrace} | ||
</c:forEach> | ||
--> | ||
<petclinic:pivotal/> | ||
</div> | ||
</div> | ||
<jsp:include page="fragments/footer.jsp"/> | ||
</body> | ||
<p>${exception.message}</p> | ||
|
||
</html> | ||
</petclinic:layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,34 @@ | ||
<!DOCTYPE html> | ||
|
||
<%@ page session="false" %> | ||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> | ||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | ||
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> | ||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> | ||
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %> | ||
|
||
<html lang="en"> | ||
|
||
<jsp:include page="../fragments/htmlHeader.jsp"/> | ||
<petclinic:layout pageName="owners"> | ||
|
||
<body> | ||
<petclinic:bodyHeader menuName="owners"/> | ||
<div class="container-fluid"> | ||
<div class="container xd-container"> | ||
<h2>Find Owners</h2> | ||
|
||
<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> | ||
<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 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 class="form-group"> | ||
<div class="col-sm-offset-2 col-sm-10"> | ||
<button type="submit" class="btn btn-default">Find Owner</button> | ||
</div> | ||
</div> | ||
|
||
</form:form> | ||
|
||
<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"/> | ||
</body> | ||
</form:form> | ||
|
||
</html> | ||
<br/> | ||
<a class="btn btn-default" href='<spring:url value="/owners/new" htmlEscape="true"/>'>Add Owner</a> | ||
</petclinic:layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.