Commit cfac9fcd authored by Anton Sudak's avatar Anton Sudak

Improve car inventory page layout

parent 542191c2
......@@ -10,42 +10,38 @@
@(data: CarInventoryPage, cars: List[Car])
@main(data) {
<h1>@data.getPageTitle</h1>
<div class="box">
<h2 class="text-center">@data.getDealerTitle</h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>@Messages("example.crud.car.model")</th>
<th>@Messages("example.crud.car.brand")</th>
<th>@Messages("example.crud.car.registrationId")</th>
<th>@Messages("example.crud.car.price")</th>
<th>@Messages("example.crud.car.buyDate")</th>
</tr>
</thead>
<tbody>
@if(cars.nonEmpty) {
@cars.map { item =>
<tr>
<td>@item.getModel</td>
<td>@item.getBrand.asScala.map(_.getTitle).getOrElse(Messages("example.crud.car.no.brand"))</td>
<td>@item.getRegistrationId</td>
<td>@item.getPrice</td>
<td>@item.getBuyDate.asScala.map(dateTimeSwiss(_)).getOrElse("-")</td>
<div class="container">
<h1>@data.getPageTitle</h1>
<div class="box">
<h2 class="text-center">@data.getDealerTitle</h2>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
}
} else {
<tr><td colspan="5">@Messages("example.crud.car.no.result")</td></tr>
}
</tbody>
</table>
<th>@Messages("example.crud.car.model")</th>
<th>@Messages("example.crud.car.brand")</th>
<th>@Messages("example.crud.car.registrationId")</th>
<th>@Messages("example.crud.car.price")</th>
<th>@Messages("example.crud.car.buyDate")</th>
</tr>
</thead>
<tbody>
@if(cars.nonEmpty) {
@cars.map { item =>
<tr>
<td>@item.getModel</td>
<td>@item.getBrand.asScala.map(_.getTitle).getOrElse(Messages("example.crud.car.no.brand"))</td>
<td>@item.getRegistrationId</td>
<td>@item.getPrice</td>
<td>@item.getBuyDate.asScala.map(dateTimeSwiss(_)).getOrElse("-")</td>
<tr>
}
} else {
<tr><td colspan="5">@Messages("example.crud.car.no.result")</td></tr>
}
</tbody>
</table>
</div>
</div>
</div>
<hr>
<footer class="container footer">
@Template.addBlockByKey(classOf[ContentBlock], "GlobalFooter").render()
</footer>
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment