<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring3-3.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">
<head>
<title>Product detail page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href=""
	th:href="@{/resources/css/bootstrap.min.css}" />
<link rel="stylesheet" href=""
	th:href="@{/resources/css/bootstrap-responsive.min.css}" />
<style type="text/css">
body {
	padding-top: 20px;
	padding-bottom: 40px;
}

/* Custom container */
.container-narrow {
	margin: 0 auto;
	max-width: 700px;
}

.container-narrow>hr {
	margin: 30px 0;
}

/* Main marketing message and sign up button */
.jumbotron {
	margin: 60px 0;
	text-align: center;
}

.jumbotron h1 {
	font-size: 72px;
	line-height: 1;
}

.jumbotron .btn {
	font-size: 21px;
	padding: 14px 24px;
}

/* Supporting marketing content */
.marketing {
	margin: 60px 0;
}

.marketing p+h4 {
	margin-top: 28px;
}
</style>
</head>
<body>
	<div class="container-narrow">

		<div class="masthead">
			<ul class="nav nav-pills pull-right">
				<li><a th:href="@{${searchUrl}}">Search</a></li>
				<li><a th:href="@{${shoppingCartUrl}}">Shopping cart</a></li>
				<li><a th:href="@{${orderInquiryUrl}}">Order list</a></li>
			</ul>
			<h3 class="muted"><a href="/" th:href="@{/}"><img th:src="@{/resources/img/logo-CloudScale.png}" /></a></h3>
		</div>

		<hr />

		<div>
			<h2>Product detail page</h2>
		</div>

		<hr />

		<div class="row-fluid marketing">
			<dl class="dl-horizontal">
				<dt>Title</dt>
				<dd th:text="${item.ITitle}">Title</dd>

				<dt>Author</dt>
				<dd th:text="${item.author.AFname + ' ' + item.author.ALname}">FirstName LastName</dd>

				<dt>Subject</dt>
				<dd th:text="${item.ISubject}">Subject</dd>
				
				<dt>Description</dt>
				<dd th:text="${item.IDesc}">Description</dd>
			    
			    <dt>Suggested Retail Price</dt>
			    <dd th:text="${item.ISrp}">Suggested Retail Price</dd>
			    
			    <dt>Our Price</dt>
			    <dd th:text="${item.ICost}">Our Price</dd>
			    
			    <dt>You save</dt>
			    <dd th:with="savings=(${item.ISrp} - ${item.ICost})" 
			         th:text="${#strings.indexOf(savings, '.') == -1} ? ${savings} : ${#strings.substring(savings, 0, #strings.indexOf(savings, '.')+3)}">You save</dd>
			    
			    <dt>Backing</dt>
			    <dd><span th:text="${item.IBacking}">Item Backing</span><span th:text="${item.IPage}">Item page</span></dd>
			    
			    <dt>Published by</dt>
			    <dd th:text="${item.IPublisher}">Publisher</dd>
			    
			    <dt>Publication date</dt>
			    <dd th:text="${item.IPubDate}">Pub date</dd>
			    
			    <dt>Avail date</dt>
			    <dd th:text="${item.IAvail}">Avail date</dd>
			    
			    <dt>Dimensions</dt>
			    <dd th:text="${item.IDimension}">Dimensions</dd>
			    
			    <dt>ISBN</dt>
			    <dd th:text="${item.IIsbn}">ISBN</dd>
			</dl>
		</div>
		<div>
			<a class="btn" th:href="@{${addToShoppingCartUrl}}">Add to cart</a>
			&nbsp;<a class="btn" href="#">Update</a>
			
		</div>
	</div>
</body>
</html>
