Private
Public Access
1
0
Files
rowsandall/rowers/templates/workflow.html
2024-04-07 12:11:08 +02:00

91 lines
2.5 KiB
HTML

{% extends "newbase.html" %}
{% load static %}
{% load rowerfilters %}
{% load tz %}
{% load leaflet_tags %}
{% 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 meta %}
{% for chart in charts %}
{{ chart.script |safe }}
{% endfor %}
{% endblock %}
{% block scripts %}
{% include "monitorjobs.html" %}
<script>
$(function($) {
console.log('loading script');
var workoutid = '{{ workout.id|encode }}';
console.log(workoutid);
var shownotes = true;
if("{{ rower.showfavoritechartnotes }}" == "False") {
shownotes = false;
}
$.getJSON(window.location.protocol + '//'+window.location.host + '/rowers/workout/{{ workout.id|encode }}/get-thumbnails/', function(json) {
var counter=0;
$("#id_sitready").remove();
$("#id_thumbs").append(
"<li class=\"grid_4\"><p>Click on the thumbnails to view the full chart.</p></li>");
$.each(json, function(index, element) {
console.log('adding thumbnail');
var counter2 = counter+1;
$("#id_thumbs").append(
"<li>"+
"<big>"+counter2+"</big>"+
"<a href=\"/rowers/workout/"+workoutid+"/flexchart?favoritechart="+counter+"\">"+element.div+"</a>"+
"</li>");
$("#id_thumbs").append(element.script);
counter += 1;
});
});
});
</script>
{% endblock %}
{% block main %}
<script src="https://d3js.org/d3.v6.js"></script>
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/workflow"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/workflow"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>{{ workout.name }}</h1>
{% if workout.user.user != user %}
<h2>{{ workout.user.user.first_name }} {{ workout.user.user.last_name }}</h2>
{% endif %}
{% block middle_panel %}
{% for templateName in middleTemplates %}
{% include templateName %}
{% endfor %}
{% endblock %}
{% block right_panel %}
{% endblock %}
{% endblock %}
{% block sidebar %}
{% include 'menu_workout.html' %}
{% endblock %}