35 lines
1.3 KiB
HTML
35 lines
1.3 KiB
HTML
{% extends 'base.html' %}
|
|
|
|
{% block content %}
|
|
{% if current_session %}
|
|
<div class="row">
|
|
<div class="col-md-4 col-md-offset-4 well">
|
|
<table class="table">
|
|
<tr>
|
|
<th>Current session:</th>
|
|
<td>{{ current_session.interval }} (started at: {{ current_session.start }})</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Current user:</th>
|
|
<td>{{ current_session.user }}</td>
|
|
</tr>
|
|
</table>
|
|
<a href="/session/end" class="btn btn-lg btn-block btn-danger">End session</a>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<div class="row">
|
|
<div class="col-md-4 col-md-offset-4 well">
|
|
<form action="/session/begin" class="loginform" method="POST">
|
|
{% if not logged_in %}
|
|
<input type="text" name="username" placeholder="username" class="form-control input-lg" autofocus />
|
|
<input type="password" name="password" placeholder="password" class="form-control input-lg" />
|
|
{% endif %}
|
|
|
|
<button class="btn btn-success btn-lg btn-block">Begin session</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|