added return to workout link
This commit is contained in:
@@ -9,6 +9,13 @@
|
|||||||
{{ formmiddle.media }}
|
{{ formmiddle.media }}
|
||||||
|
|
||||||
<div class="grid_12 alpha">
|
<div class="grid_12 alpha">
|
||||||
|
{% if workoutid %}
|
||||||
|
<div class="grid_2 suffix_10 alpha">
|
||||||
|
<p>
|
||||||
|
<a class="button gray small" href="/rowers/workout/{{ workoutid }}/workflow">Return to Workout</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
<h1>Workflow Page Configuration</h1>
|
<h1>Workflow Page Configuration</h1>
|
||||||
<p>On this page, you can add and remove elements from the left and middle
|
<p>On this page, you can add and remove elements from the left and middle
|
||||||
panels of your Workflow page.
|
panels of your Workflow page.
|
||||||
|
|||||||
@@ -5857,6 +5857,12 @@ def workout_comparison_view2(request,id1=0,id2=0,xparam='distance',
|
|||||||
def workout_workflow_config_view(request):
|
def workout_workflow_config_view(request):
|
||||||
request.session['referer'] = absolute(request)['PATH']
|
request.session['referer'] = absolute(request)['PATH']
|
||||||
request.session[translation.LANGUAGE_SESSION_KEY] = USER_LANGUAGE
|
request.session[translation.LANGUAGE_SESSION_KEY] = USER_LANGUAGE
|
||||||
|
try:
|
||||||
|
workoutid = request.session['lastworkout']
|
||||||
|
except KeyError:
|
||||||
|
workoutid = 0
|
||||||
|
|
||||||
|
|
||||||
r = getrower(request.user)
|
r = getrower(request.user)
|
||||||
if request.method == 'POST' and 'leftpanel' in request.POST:
|
if request.method == 'POST' and 'leftpanel' in request.POST:
|
||||||
formleft = WorkFlowLeftPanelForm(request.POST)
|
formleft = WorkFlowLeftPanelForm(request.POST)
|
||||||
@@ -5882,12 +5888,14 @@ def workout_workflow_config_view(request):
|
|||||||
'rower':r,
|
'rower':r,
|
||||||
'formleft':formleft,
|
'formleft':formleft,
|
||||||
'formmiddle':formmiddle,
|
'formmiddle':formmiddle,
|
||||||
|
'workoutid': workoutid,
|
||||||
})
|
})
|
||||||
|
|
||||||
# Workflow View
|
# Workflow View
|
||||||
@login_required()
|
@login_required()
|
||||||
def workout_workflow_view(request,id):
|
def workout_workflow_view(request,id):
|
||||||
request.session['referer'] = absolute(request)['PATH']
|
request.session['referer'] = absolute(request)['PATH']
|
||||||
|
request.session['lastworkout'] = id
|
||||||
request.session[translation.LANGUAGE_SESSION_KEY] = USER_LANGUAGE
|
request.session[translation.LANGUAGE_SESSION_KEY] = USER_LANGUAGE
|
||||||
try:
|
try:
|
||||||
row = Workout.objects.get(id=id)
|
row = Workout.objects.get(id=id)
|
||||||
|
|||||||
Reference in New Issue
Block a user