This repository has been archived on 2020-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
e-commerce/prototype/src/main/resources/templates/shop/articles/id.html

90 lines
4.2 KiB
HTML

<!DOCTYPE html>
<html lang="de" dir="ltr" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=0.75, user-scalable=no">
<title>Sucherergebnisse</title>
<link rel="stylesheet" th:href="@{/css/ecom.css}"/>
</head>
<body>
<!-- Dirty hack to align the heading.-->
<nav th:replace="fragments/header :: header">Header</nav>
<main class=" content-width">
<div class="sidebar-layout" style="min-height: 75vh;">
<nav th:replace="fragments/shop :: sidebar(categories=${categories})"></nav>
<div class="content-width">
<div class="detailgrid">
<div class="s">
<h1 th:text="${article.title}"></h1>
<script th:src="@{/js/back.js}"></script>
<div class="back" data-group="shop" data-insert="true"></div>
<h2><span
th:text="${#numbers.formatDecimal(article.getPriceGross() * 0.01, 1, 'POINT', 2, 'COMMA')}"></span><span> EUR</span>
</h2>
<p th:text="${article.description}"></p>
</div>
<div class="s">
<img th:src="@{/shop/articles/{id}/image.jpg(id=${article.id})}"/>
</div>
<div class="s"></div>
<form class="s" method="POST">
<div class="detailgrid m">
<h2><span
th:text="${#numbers.formatDecimal(article.getPriceGross() * 0.01, 1, 'POINT', 2, 'COMMA')}"></span><span> EUR</span>
</h2>
<div>
<input type="hidden" name="set_amount" value="true"/>
<label class="nolinebreak">Menge:</label>
<select name="quantity" size="1">
<option th:if="${inCart > 0}" th:value="${inCart}" th:text="${inCart}"
selected></option>
<option th:if="${inCart > 0}" value="0">Entfernen</option>
<option th:if="${inStock > 0}" th:each="quantity : ${#numbers.sequence(1,inStock)}"
th:value="${quantity}"
th:text="${quantity}"></option>
</select>
</div>
<h3 class="no-margin secondarytext"
th:text="${inStock > 0} ? 'AUF LAGER' : 'NICHT AUF LAGER'"></h3>
<button th:if="${inCart == 0}" class="no-margin secondary" name="fastcheckout" value="false"
th:disabled="${inStock==0}">In den Einkaufswagen
</button>
<button th:if="${inCart > 0}" class="no-margin secondary" name="fastcheckout" value="false"
th:disabled="${inStock==0}">Anzahl im Einkaufswagen ändern
</button>
<button class="no-margin" name="fastcheckout" value="true" th:disabled="${inStock==0}">Schneller
Checkout
</button>
</div>
</form>
</div>
</div>
</div>
<div class="sidebar-layout">
<div></div>
<div>
<h1>Weitere Schnäppchen</h1>
<div class='grid m base shadow'>
<section th:each="article: ${commercialArticles}"><a
th:href="@{/shop/articles/{id}(id = ${article.id})}" class="section">
<img th:src="@{/shop/articles/{id}/image.jpg(id=${article.id})}"/>
<h2 th:text="${article.title}"></h2>
<p class='price'><span
th:text="${#numbers.formatDecimal(article.getPriceGross() * 0.01, 1, 'POINT', 2, 'COMMA')}"></span><span> EUR</span>
</p>
<p th:text="${article.description}"></p>
</a>
</section>
</div>
</div>
</main>
<footer th:replace="fragments/footer :: footer"></footer>
</body>
</html>