Private
Public Access
1
0

Merge branch 'develop' into feature/idoklad

This commit is contained in:
2024-12-22 16:51:14 +01:00
18 changed files with 520 additions and 60 deletions

View File

@@ -0,0 +1,45 @@
{% extends "newbase.html" %}
{% load static %}
{% load rowerfilters %}
{% block title %}Sessions on intervals.icu{% endblock %}
{% block main %}
<h1>Sessions on Intervals.icu</h1>
{% if sessions %}
<ul class="main-content">
<li class="grid_4">
<form enctype="multipart/form-data" method="post">
{% csrf_token %}
<input type="submit" name="action" value="Import selected sessions">
<table width="70%" class="listtable">
<thead>
<tr>
<th>Import</th>
<th>Date</th>
<th>Name</th>
<th>Description</th>
<th>Type</th>
<th>Training Load</th>
</tr>
</thead>
<tbody>
{% for session in sessions %}
<tr>
<td>
<input type="checkbox" name="session" value="{{ session.id }}">
</td>
<td>{{ session.start_date_local }}</td>
<td>{{ session.name }}</td>
<td>{{ session.description }}</td>
<td>{{ session.type }}</td>
<td>{{ session.icu_training_load }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</form>
</li>
</ul>
{% endif %}
{% endblock %}

View File

@@ -71,6 +71,11 @@
<i class="fas fa-cloud-download fa-fw"></i>&nbsp;Import from Rojabo
</a>
</li>
<li id="import-intervals">
<a href="/rowers/session/intervalsimport/">
<i class="fa-solid fa-wave-pulse fa-fw"></i>&nbsp;Import from Intervals
</a>
</li>
<li id="plan-microcycle">
<a href="/rowers/sessions/multicreate/?when={{ timeperiod }}">
<i class="fas fa-expand fa-fw"></i>Plan Microcycle

View File

@@ -23,6 +23,11 @@
{% else %}
<a href="/rowers/sessions/{{ psdict.id.1 }}/togarmin/?next={{ request.path|urlencode }}"><i class="fas fa-watch-fitness fa-fw"></i> Export to Garmin</a>
{% endif %}
{% if plannedsession.intervals_icu_id %}
<a href="https://intervals.icu/?w={{ plannedsession.preferreddate }}"><i class="fa-solid fa-wave-pulse"></i> Exported to intervals.icu</a>
{% else %}
<a href="/rowers/sessions/{{ psdict.id.1 }}/tointervals/?next={{ request.path|urlencode }}"><i class="fa-solid fa-wave-pulse fa-fw"></i> Export to intervals.icu</a>
{% endif %}
</p>
{% endif %}
<h1>Session {{ psdict.name.1 }}</h1>
@@ -46,10 +51,10 @@
{% endfor %}
{% endfor %}
</table>
{% if steps %}
<h2>Steps</h2>
<p>{{ steps|safe }}</p>
{% endif %}
{% if steps %}
<h2>Steps</h2>
<p>{{ steps|safe }}</p>
{% endif %}
</li>
<li class="grid_2">
{% if plannedsession.sessiontype == 'test' or plannedsession.sessiontype == 'coursetest' or plannedsession.sessiontype == 'fastest_distance' or plannedsession.sessiontype == 'fastest_time' %}

View File

@@ -13,7 +13,15 @@
<form action="" method="post">
{% csrf_token %}
<p>Are you sure you want to delete <em>{{ object }}</em>?</p>
<input class="button red" type="submit" value="Confirm">
<p>
<input type="checkbox" name="delete_sessions" value="1"> Delete all planned sessions linked to the plan
</p>
<p>
<input type="checkbox" name="delete_all_sessions" value="1">Delete all planned sessions in the plan time frame
</p>
<p>
<input class="button red" type="submit" value="Confirm">
</p>
</form>