102 lines
2.4 KiB
HTML
102 lines
2.4 KiB
HTML
{% extends "newbase.html" %}
|
|
{% load staticfiles %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}Rowsandall - Analysis {% endblock %}
|
|
|
|
{% block main %}
|
|
|
|
<h1>Alerts for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
|
|
<p>Set up automatic alerting for your workouts</p>
|
|
|
|
|
|
<ul class="main-content">
|
|
{% if alerts %}
|
|
{% for alert in alerts %}
|
|
<li class="rounder">
|
|
<h2>{{ alert.name }}</h2>
|
|
<a class="small" href="/rowers/alerts/{{ alert.id }}/edit/" title="Edit">
|
|
<i class="fas fa-pencil-alt fa-fw"></i>
|
|
</a>
|
|
<a class="small" href="/rowers/alerts/{{ alert.id }}/delete/"
|
|
title="Delete">
|
|
<i class="fas fa-trash-alt fa-fw"></i>
|
|
</a>
|
|
<hr>
|
|
<a href="/rowers/alerts/{{ alert.id }}/report/">
|
|
<div id="id_alert_{{ forloop.counter }}">
|
|
<h1>{{ stats|alertstatspercentage:forloop.counter }}%</h1>
|
|
</div>
|
|
</a>
|
|
<p>
|
|
{{ alert.description }}
|
|
</p>
|
|
<p>
|
|
Workout type: {{ alert.workouttype }}
|
|
</p>
|
|
<p>
|
|
Next Run: {{ alert.next_run }}
|
|
</p>
|
|
</li>
|
|
{% endfor %}
|
|
<li class="grid_4">
|
|
<table width="100%" class="listtable shortpadded">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>metric</th>
|
|
<th>Workout type</th>
|
|
<th>Next Run</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for alert in alerts %}
|
|
<tr>
|
|
<td>{{ alert.name }}</td>
|
|
<td>{{ alert.measured.metric }}</td>
|
|
<td>{{ alert.workouttype }}</td>
|
|
<td>{{ alert.next_run }}</td>
|
|
<td>
|
|
<a class="small" href="/rowers/alerts/{{ alert.id }}/edit/" title="Edit">
|
|
<i class="fas fa-pencil-alt fa-fw"></i>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a class="small"
|
|
href="/rowers/alerts/{{ alert.id }}/report/"
|
|
title="Report">
|
|
<i class="fal fa-table fa-fw"></i>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a class="small" href="/rowers/alerts/{{ alert.id }}/delete/"
|
|
title="Delete">
|
|
<i class="fas fa-trash-alt fa-fw"></i>
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</li>
|
|
{% else %}
|
|
<li class="grid_4">
|
|
<p>You have not set any alerts for {{ rower.user.first_name }}</p>
|
|
</li>
|
|
{% endif %}
|
|
<li class="grid_4">
|
|
<p>
|
|
<a href="/rowers/alerts/new/user/{{ rower.user.id }}/">Create new alert</a>
|
|
</p>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block sidebar %}
|
|
{% include 'menu_analytics.html' %}
|
|
{% endblock %}
|