143 lines
4.0 KiB
HTML
143 lines
4.0 KiB
HTML
{% extends "newbase.html" %}
|
|
{% load staticfiles %}
|
|
{% load rowerfilters %}
|
|
{% load tz %}
|
|
|
|
|
|
{% get_current_timezone as TIME_ZONE %}
|
|
|
|
{% block title %}{{ workout.name }}{% endblock %}
|
|
{% block og_title %}{{ workout.name }}{% endblock %}
|
|
{% block description %}{{ workout.name }}
|
|
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
|
|
{% block og_description %}{{ workout.name }}
|
|
{{ workout.date }} - {{ workout.distance }}m - {{ workout.duration |durationprint:"%H:%M:%S.%f" }}{% endblock %}
|
|
|
|
{% block scripts %}
|
|
{% include "monitorjobs.html" %}
|
|
<script type='text/javascript'
|
|
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
|
</script>
|
|
|
|
<script>
|
|
$( document ).ready(function() {
|
|
$('#id_workouttype').on('change', function(){
|
|
if (
|
|
$(this).val() == 'water'
|
|
|| $(this).val() == 'coastal'
|
|
|| $(this).val() == 'c-boat'
|
|
|| $(this).val() == 'churchboat'
|
|
) {
|
|
$('#id_boattype').toggle(true);
|
|
} else {
|
|
$('#id_boattype').toggle(false);
|
|
$('#id_boattype').val('1x');
|
|
}
|
|
});
|
|
$('#id_workouttype').change();
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block main %}
|
|
|
|
<h1>Edit Workout {{ workout.name }}</h1>
|
|
<ul class="main-content">
|
|
<li class="grid_4">
|
|
<p>
|
|
<div class="fb-share-button"
|
|
data-href="https://rowsandall.com/rowers/workout/{{ workout.id }}"
|
|
data-layout="button" data-size="small" data-mobile-iframe="false">
|
|
<a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://rowsandall.com/rowers/workout/{{ workout.id }}">Share</a>
|
|
</div>
|
|
</p>
|
|
<p>
|
|
<a class="twitter-share-button"
|
|
href="https://twitter.com/intent/tweet"
|
|
data-url="https://rowsandall.com/rowers/workout/{{ workout.id }}"
|
|
data-text="@rowsandall #rowingdata">Tweet</a>
|
|
</p>
|
|
<table width=100%>
|
|
<tr>
|
|
{% localtime on %}
|
|
{% if workout.user.user != user %}
|
|
<th>Rower:</th><td>{{ rower.user.first_name }} {{ rower.user.last_name }}</td>
|
|
</tr><tr>
|
|
{% endif %}
|
|
<th>Date/Time:</th><td>{{ workout.startdatetime|localtime}}</td>
|
|
{% endlocaltime %}
|
|
</tr><tr>
|
|
<th>Distance:</th><td>{{ workout.distance }}m</td>
|
|
</tr><tr>
|
|
<th>Duration:</th><td>{{ workout.duration |durationprint:"%H:%M:%S.%f" }}</td>
|
|
</tr><tr>
|
|
<th>Source:</th><td>{{ workout.workoutsource }}</td>
|
|
</tr><tr>
|
|
<th>Public link to this workout:</th>
|
|
<td>
|
|
<a href="/rowers/workout/{{ workout.id }}">https://rowsandall.com/rowers/workout/{{ workout.id }}</a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
<li class="grid_2">
|
|
{% if form.errors %}
|
|
<p style="color: red;">
|
|
Please correct the error{{ form.errors|pluralize }} below.
|
|
</p>
|
|
{% endif %}
|
|
|
|
|
|
<form id="importantform"
|
|
enctype="multipart/form-data" action="" method="post">
|
|
<table width=100%>
|
|
{{ form.as_table }}
|
|
</table>
|
|
{% csrf_token %}
|
|
<input class="button green" type="submit" value="Save">
|
|
</form>
|
|
</li>
|
|
<li class="grid_2">
|
|
|
|
<h1>Workout Summary</h1>
|
|
|
|
<p>
|
|
<pre>
|
|
{{ workout.summary }}
|
|
</pre>
|
|
</p>
|
|
</li>
|
|
{% if mapdiv %}
|
|
<li class="grid_2">
|
|
<script type="text/javascript" src="/static/js/bokeh-0.12.3.min.js"></script>
|
|
<script async="true" type="text/javascript">
|
|
Bokeh.set_log_level("info");
|
|
</script>
|
|
|
|
|
|
|
|
<div class="mapdiv">
|
|
{{ mapdiv|safe }}
|
|
</div>
|
|
|
|
{{ mapscript|safe }}
|
|
|
|
</li>
|
|
{% endif %}
|
|
{% for graph in graphs %}
|
|
<li>
|
|
<a href="/rowers/graph/{{ graph.id }}/">
|
|
<img src="/{{ graph.filename }}"
|
|
onerror="this.src='/static/img/rowingtimer.gif'"
|
|
alt="{{ graph.filename }}" width="120" height="100">
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
{% endblock %}
|
|
|
|
{% block sidebar %}
|
|
{% include 'menu_workout.html' %}
|
|
{% endblock %}
|