Kalender mit pagination
This commit is contained in:
@@ -1,95 +0,0 @@
|
||||
{#include base.html}
|
||||
{#kalender_active}active{/}
|
||||
{#contents}
|
||||
|
||||
<div class="mt-2">
|
||||
Heute ist {today.formatCommon}
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="col-2">Ich will ins Büro</th>
|
||||
<th scope="col" class="col-3">Datum</th>
|
||||
<th scope="col">Im Büro</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#for day in week0}
|
||||
<tr>
|
||||
<td>
|
||||
<form action="/kalender/inoffice/{day.day}" method="POST" name="kalenderForm" enctype="multipart/form-data">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" name="inoffice" onchange="this.form.submit()"
|
||||
{#if day.isCurrentUserInOffice}checked{/if} >
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
{day.day.formatCommon}
|
||||
</td>
|
||||
<td>
|
||||
{#if day.inOffice}{day.inOffice.username}{/if}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{/for}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mt-2">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tbody>
|
||||
{#for day in week1}
|
||||
<tr>
|
||||
<td class="col-2">
|
||||
<form action="/kalender/inoffice/{day.day}" method="POST" name="kalenderForm" enctype="multipart/form-data">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" name="inoffice" onchange="this.form.submit()"
|
||||
{#if day.isCurrentUserInOffice}checked{/if} >
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
<td class="col-3">
|
||||
{day.day.formatCommon}
|
||||
</td>
|
||||
<td>
|
||||
{#if day.inOffice}{day.inOffice.username}{/if}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
{/for}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="mt-2">
|
||||
<table class="table table-striped table-bordered">
|
||||
<tbody>
|
||||
{#for day in week2}
|
||||
<tr>
|
||||
<td class="col-2">
|
||||
<form action="/kalender/inoffice/{day.day}" method="POST" name="kalenderForm" enctype="multipart/form-data">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" name="inoffice" onchange="this.form.submit()"
|
||||
{#if day.isCurrentUserInOffice}checked{/if} >
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
<td class="col-3">
|
||||
{day.day.formatCommon}
|
||||
</td>
|
||||
<td>
|
||||
{#if day.inOffice}{day.inOffice.username}{/if}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
{/for}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{/contents}
|
||||
{/include}
|
||||
61
src/main/resources/templates/kalenderpage.html
Normal file
61
src/main/resources/templates/kalenderpage.html
Normal file
@@ -0,0 +1,61 @@
|
||||
{#include base.html}
|
||||
{#kalender_active}active{/}
|
||||
{#contents}
|
||||
|
||||
<div class="mt-2">
|
||||
Heute ist {today.formatCommon}
|
||||
</div>
|
||||
|
||||
<div class="mt-2">
|
||||
<nav aria-label="Page navigation example">
|
||||
<ul class="pagination">
|
||||
<li class="page-item"><a class="page-link" href="/kalender">aktuelle Woche</a></li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/kalender/offset/{offset.minus(1)}" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="/kalender/offset/{offset.plus(1)}" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="mt-2">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="col-2">Ich will ins Büro</th>
|
||||
<th scope="col" class="col-3">Datum</th>
|
||||
<th scope="col">Im Büro</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#for day in week}
|
||||
<tr {#if day.isToday}class="table-primary"{/if}>
|
||||
<td>
|
||||
<form action="/kalender/inoffice/{day.day}?offset={offset}" method="POST" name="kalenderForm" enctype="multipart/form-data">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" name="inoffice" onchange="this.form.submit()"
|
||||
{#if day.isCurrentUserInOffice}checked{/if} >
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
{day.day.formatCommon}
|
||||
</td>
|
||||
<td>
|
||||
{#if day.inOffice}{day.inOffice.username}{/if}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{/for}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{/contents}
|
||||
{/include}
|
||||
Reference in New Issue
Block a user