small improvements
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
{% block title %}Rowsandall {% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<h1>History</h1>
|
||||
<h1>History for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
|
||||
<ul class="main-content">
|
||||
<script async="true" src="https://cdn.pydata.org/bokeh/release/bokeh-1.0.4.min.js"></script>
|
||||
<li class="grid_2">
|
||||
|
||||
@@ -752,6 +752,7 @@ urlpatterns = [
|
||||
re_path(r'^workout/api/upload/',views.workout_upload_api,name='workout_upload_api'),
|
||||
re_path(r'^access/share/$',views.createShareURL, name="sharedURL"),
|
||||
re_path(r'^access/(?P<key>\w+)/$', views.sharedPage, name="sharedPage"),
|
||||
re_path(r'^history/user/(?P<userid>\d+)/$',views.history_view,name="history_view"),
|
||||
re_path(r'^history/$',views.history_view,name="history_view"),
|
||||
]
|
||||
|
||||
|
||||
@@ -4651,7 +4651,10 @@ class AlertDelete(DeleteView):
|
||||
|
||||
return obj
|
||||
|
||||
@login_required()
|
||||
@user_passes_test(ispromember, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Pro plan or higher. If you are already a Pro user, please log in to access this functionality",
|
||||
redirect_field_name=None)
|
||||
@permission_required('rower.is_coach',fn=get_user_by_userid,raise_exception=True)
|
||||
def history_view(request,userid=0):
|
||||
r = getrequestrower(request,userid=userid)
|
||||
|
||||
|
||||
@@ -2010,6 +2010,7 @@ def workouts_view(request,message='',successmessage='',
|
||||
stack=stack)
|
||||
|
||||
totalmeters,totalhours, totalminutes = get_totals(g_workouts)
|
||||
totalminutes = '{totalminutes:02d}'.format(totalminutes=totalminutes)
|
||||
|
||||
|
||||
messages.info(request,successmessage)
|
||||
|
||||
Reference in New Issue
Block a user