diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py
index 1c64244c..5568caea 100644
--- a/rowers/interactiveplots.py
+++ b/rowers/interactiveplots.py
@@ -4996,6 +4996,7 @@ def interactive_cum_flex_chart2(theworkouts, promember=0,
# datadf = dataprep.smalldataprep(theworkouts,xparam,yparam1,yparam2)
ids = [int(w.id) for w in theworkouts]
columns = [xparam, yparam1, yparam2, 'spm', 'driveenergy', 'distance']
+
datadf = dataprep.getsmallrowdata_db(columns, ids=ids, doclean=True,
workstrokesonly=workstrokesonly)
diff --git a/rowers/templates/courses_challenges.html b/rowers/templates/courses_challenges.html
index dec869a1..2cf5b890 100644
--- a/rowers/templates/courses_challenges.html
+++ b/rowers/templates/courses_challenges.html
@@ -23,6 +23,24 @@
Courses you might like
+
+
+ Whether you routinely row between two landmarks on your river and want to compare
+ times from one day to the other, or like a little competition between
+ rowers in your neighborhood, Rowsandall courses are for you! They are useful for GPS-based timing
+ of your time on the course, and enable easy, informal, timed event on any body of water you like.
+
+
+ On Rowsandall, rowers share courses and organize challenges. We're showing you a few on this page,
+ but there are many more to explore. You can also add your own.
+
+
+ These courses are designed to be compatible with
+ CrewNerd Custom Courses. You
+ can synchronize the list of liked courses to the CrewNerd app on your phone, so you can get
+ on-the-water indications of your time on the course.
+
+
All Courses
@@ -35,6 +53,13 @@
{{ course.course.name }}
+
+ {% if course.course in rower.followed_courses.all %}
+
+ {% else %}
+
+ {% endif %}
+
{{ course.course.country }}
{{ course.course.distance }}m
@@ -47,6 +72,8 @@
Interesting Challenges
+
+ Challenges I participate in
All Active Challenges
@@ -98,6 +125,68 @@
+
+
+
+
{% endblock %}
{% block sidebar %}
diff --git a/rowers/templates/list_courses.html b/rowers/templates/list_courses.html
index 8fd12901..f218c15f 100644
--- a/rowers/templates/list_courses.html
+++ b/rowers/templates/list_courses.html
@@ -92,9 +92,9 @@
{% if not user.is_anonymous %}
{% if course in rower.followed_courses.all %}
-
+
{% else %}
-
+
{% endif %}
{% endif %}
@@ -178,10 +178,10 @@
console.log(response);
$ajaxLink.removeClass('follow').addClass('unfollow');
$ajaxLink.attr('href', '/rowers/courses/' + id + '/unfollow')
- $ajaxLink.find('i').removeClass('far').removeClass('fa-star').addClass('fas').addClass('fa-star'); // Change star icon to filled
- $ajaxLink.find('.icon i').attr('class', 'fas fa-star');
+ $ajaxLink.find('i').removeClass('far').removeClass('fa-heart').addClass('fas').addClass('fa-heart'); // Change star icon to filled
+ $ajaxLink.find('.icon i').attr('class', 'fas fa-heart');
$ajaxLink.find('.icon i').html('');
- $ajaxLink.html('');
+ $ajaxLink.html('');
},
error: function(xhr, status, error) {
@@ -204,10 +204,10 @@
console.log(response);
$ajaxLink.removeClass('unfollow').addClass('follow');
$ajaxLink.attr('href', '/rowers/courses/' + id + '/follow')
- $ajaxLink.find('i').removeClass('fas').removeClass('fa-star').addClass('far').addClass('fa-star'); // Change star icon to outline
- $ajaxLink.find('.icon i').attr('class', 'far fa-star');
+ $ajaxLink.find('i').removeClass('fas').removeClass('fa-heart').addClass('far').addClass('fa-heart'); // Change star icon to outline
+ $ajaxLink.find('.icon i').attr('class', 'far fa-heart');
$ajaxLink.find('.icon i').html('');
- $ajaxLink.html('');
+ $ajaxLink.html('');
},
error: function(xhr, status, error) {
console.error(error);
diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz
index b4427762..18dba113 100644
Binary files a/rowers/tests/testdata/testdata.tcx.gz and b/rowers/tests/testdata/testdata.tcx.gz differ
diff --git a/rowers/views/racesviews.py b/rowers/views/racesviews.py
index 62e0497a..fd1c4259 100644
--- a/rowers/views/racesviews.py
+++ b/rowers/views/racesviews.py
@@ -139,6 +139,7 @@ def courses_view(request):
courses = GeoCourse.objects.all().order_by("country", "name", "distance")
nearby = request.GET.get('nearby')
liked = request.GET.get('liked')
+
if nearby and lat_lon is not None: # pragma: no cover
courses = getnearestcourses(lat_lon, courses)
@@ -1058,10 +1059,15 @@ def virtualevents_view(request):
form = VirtualRaceSelectForm()
nearby = request.GET.get('nearby')
+ participate = request.GET.get('participate')
if nearby and lat_lon is not None: # pragma: no cover
races = getnearestraces(lat_lon, races)
+ if participate:
+ ress = VirtualRaceResult.objects.filter(userid=r.id).order_by("-race__evaluation_closure")
+ races = [res.race for res in ress if res.race is not None]
+
if is_ajax: # pragma: no cover
return render(request, 'racelist.html',
{'races': races,
diff --git a/static/img/crewnerd.png b/static/img/crewnerd.png
new file mode 100644
index 00000000..0210cb05
Binary files /dev/null and b/static/img/crewnerd.png differ
|