diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index 4c03a9bb..1c64244c 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -2263,7 +2263,7 @@ def course_map(course): - var mymap = L.map('map_canvas', {{ + var mymap = L.map('map_canvas_{id}', {{ center: [{latmean}, {lonmean}], zoom: 13, layers: [outdoors] @@ -2306,6 +2306,7 @@ def course_map(course): """.format( + id=course.id, latmean=latmean, lonmean=lonmean, scoordinates=scoordinates, @@ -2314,8 +2315,10 @@ def course_map(course): ) div = """ -
- """ + + """.format( + id=course.id, + ) return script, div diff --git a/rowers/templates/courses_challenges.html b/rowers/templates/courses_challenges.html new file mode 100644 index 00000000..7c83ed87 --- /dev/null +++ b/rowers/templates/courses_challenges.html @@ -0,0 +1,105 @@ +{% extends "newbase.html" %} +{% load static %} +{% load rowerfilters %} +{% load leaflet_tags %} + +{% block meta %} +{% leaflet_js %} +{% leaflet_css %} +{% endblock %} + +{% block title %}Rowsandall Virtual Challenges{% endblock %} + +{% block scripts %} + + +{% endblock %} + +{% block main %} + ++ All Courses +
+ Courses I like + +{{ course.course.country }}
+{{ course.course.distance }}m
++ Challenges page +
+ Nearby Challenges + +{{ challenge.challenge.startdate|date:"Y-m-d" }} + {{ challenge.challenge.start_time|time:"H:i e" }} + to + {{ challenge.challenge.enddate|date:"Y-m-d" }} + {{ challenge.challenge.end_time|time:"H:i e" }} + ({{ challenge.challenge.timezone }})
+{% if challenge.challenge.sessiontype == 'fastest_time' %} + Time Challenge: To be rowed on the water + {% elif challenge.challenge.sessiontype == 'fastest_distance' %} + Distance Challenge: To be rowed on the water + {% elif challenge.challenge.sessiontype != 'race' %} + Indoor Race: To be rowed on a Concept2 ergometer + {% endif %} +
+ {% if challenge.challenge.sessiontype == 'fastest_time' %} +
+
+
+