138 lines
4.0 KiB
HTML
138 lines
4.0 KiB
HTML
{% extends "newbase.html" %}
|
|
{% load static %}
|
|
{% load rowerfilters %}
|
|
|
|
{% block title %}Planned Sessions{% endblock %}
|
|
|
|
{% block main %}
|
|
|
|
<h1>Planned Session Library</h1>
|
|
|
|
{% if alltags %}
|
|
<p>
|
|
Click on a tag to filter:
|
|
{% for tag in alltags %}
|
|
<a href="/rowers/sessions/library/?tag={{ tag }}">{{ tag }}</a>
|
|
{% endfor %}
|
|
</p>
|
|
<p>
|
|
<a href="/rowers/sessions/library/">Clear tags</a>
|
|
</p>
|
|
{% endif %}
|
|
|
|
|
|
<ul class="main-content">
|
|
<li class="grid_4">
|
|
{% if templates %}
|
|
<p>
|
|
Sharing a session makes it available to all Rowsandall users on Self-Coach and Coach plans, so they can
|
|
use it in their own training plans. You can make the session private again at any time, but users
|
|
can save your session in their own private libraries. Click on the lock icon to toggle sharing/private.
|
|
</p>
|
|
<table width="90%" class="listtable shortpadded">
|
|
<thead>
|
|
<tr>
|
|
<th align="left">Name</th>
|
|
<th align="left">Type</th>
|
|
<th align="left">Mode</th>
|
|
<th align="left">Value</th>
|
|
<th align="left">Private/Shared</th>
|
|
<th align="left">Edit</th>
|
|
<th align="left">Copy to Calendar</th>
|
|
<th align="left">Share</th>
|
|
<th align="left">Lock</th>
|
|
<th align="left">Delete</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for ps in templates %}
|
|
<tr>
|
|
<td>
|
|
{% if ps.name != '' %}
|
|
{{ ps.name }}
|
|
{% else %}
|
|
Unnamed Session
|
|
{% endif %}
|
|
</td>
|
|
<td> {{ ps.get_sessiontype_display }} </td>
|
|
<td> {{ ps.get_sessionmode_display }} </td>
|
|
<td> {{ ps.sessionvalue }} {{ ps.sessionunit }}</td>
|
|
<td>
|
|
{% if ps.is_public %}
|
|
{% if ps.manager == request.user %}
|
|
<a class="small"
|
|
href="/rowers/sessions/{{ ps.id }}/makeprivate/">
|
|
<i class="fas fa-lock-open fa-fw"></i>
|
|
</a>
|
|
{% else %}
|
|
<i class="fas fa-lock-open fa-fw"></i>
|
|
{% endif %}
|
|
{% else %}
|
|
{% if ps.manager == request.user %}
|
|
<a class="small"
|
|
href="/rowers/sessions/{{ ps.id }}/share/">
|
|
<i class="fas fa-lock fa-fw"></i>
|
|
</a>
|
|
{% else %}
|
|
<i class="fas fa-lock fa-fw"></i>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if ps.manager == request.user %}
|
|
<a class="small"
|
|
href="/rowers/sessions/{{ ps.id }}/templateedit/user/{{ rower.user.id }}">
|
|
<i class="fas fa-pencil-alt fa-fw"></i>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<a class="small"
|
|
href="/rowers/sessions/{{ ps.id }}/clone/user/{{ rower.user.id }}">
|
|
<i class="fas fa-clone fa-fw"></i>
|
|
</a>
|
|
</td>
|
|
<td>
|
|
{% if ps.manager == request.user %}
|
|
<a class="small"
|
|
href="/rowers/sessions/{{ ps.id }}/share/">
|
|
<i class="fas fa-share-alt-square fa-fw"></i>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if ps.manager == request.user %}
|
|
<a class="small"
|
|
href="/rowers/sessions/{{ ps.id }}/makeprivate/">
|
|
<i class="fas fa-lock fa-fw"></i>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if ps.manager == request.user %}
|
|
<a class="small" href="/rowers/sessions/{{ ps.id }}/deleteconfirm/?next={{ request.path|urlencode }}"><i class="fas fa-trash-alt fa-fw"></i></a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
You have no sessions in your Library yet.
|
|
{% endif %}
|
|
|
|
</li>
|
|
<li class="grid_4">
|
|
<a href="/rowers/sessions/createtemplate/">Add a session to the library</a>
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
{% block sidebar %}
|
|
{% include 'menu_plan.html' %}
|
|
{% endblock %}
|