training/views/index.ejs

44 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-05-23 20:49:34 +02:00
<%- include('partials/header') %>
<h1>Turnstunden Organisation</h1>
2024-07-19 18:31:54 +02:00
<% if (session && ( session.role =='admin' || session.role =='user' )) { %>
<ul>
<li >
<a href="/training">Trainings</a>
</li>
<li >
<a href="/riege">Riegen</a>
</li>
<% if (session && session.role === 'admin') { %>
<li >
<a href="/teilnehmer">Teilnehmende</a>
</li>
<li><a href="/admin">Admin</a></li>
<% } %>
2024-05-23 20:49:34 +02:00
2024-07-19 18:31:54 +02:00
<li >
<a href="/profile">Profil</a>
</li>
</ul>
<% } else {%>
<form action="/login" method="post">
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="text" class="form-control" id="username" name="username" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
</div>
<button type="submit" class="btn btn-primary">Login</button>
</form>
<a href="/register">Register</a>
<a href="/forgot-password">Forgot Password?</a>
<% } %>
2024-05-28 16:19:59 +02:00
2024-05-23 20:49:34 +02:00
</body>
</html>
<%- include('partials/footer') %>