demo of drag/drop and JS to capture the new order
This commit is contained in:
@@ -2959,6 +2959,40 @@ def rower_create_trainingplan(request, id=0):
|
||||
'old_targets': old_targets,
|
||||
})
|
||||
|
||||
@user_passes_test(can_plan, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Coach or Self-Coach plan",
|
||||
redirect_field_name=None)
|
||||
def stepeditor(request, id=0):
|
||||
step1 = PlannedSessionStep(
|
||||
manager = request.user,
|
||||
name = "Warming Up",
|
||||
intensity = "Warmup",
|
||||
durationtype = "Time",
|
||||
durationvalue = 60000,
|
||||
)
|
||||
|
||||
step2 = PlannedSessionStep(
|
||||
manager = request.user,
|
||||
name = "Steady",
|
||||
intensity = "Active",
|
||||
durationtype = "Time",
|
||||
durationvalue = 180000,
|
||||
)
|
||||
|
||||
step3 = PlannedSessionStep(
|
||||
manager = request.user,
|
||||
name = "Cooling Down",
|
||||
intensity = "Cooldown",
|
||||
durationtype = "Time",
|
||||
durationvalue = 60000,
|
||||
)
|
||||
|
||||
steps = [step1,step2,step3]
|
||||
|
||||
return render(request, 'stepeditor.html',
|
||||
{
|
||||
'steps':steps,
|
||||
})
|
||||
|
||||
@user_passes_test(can_plan, login_url="/rowers/paidplans",
|
||||
message="This functionality requires a Coach or Self-Coach plan",
|
||||
|
||||
@@ -151,7 +151,8 @@ from rowers.models import (
|
||||
PlannedSessionComment, CoachRequest, CoachOffer,
|
||||
VideoAnalysis, ShareKey,
|
||||
StandardCollection, CourseStandard,
|
||||
VirtualRaceFollower, TombStone, InstantPlan
|
||||
VirtualRaceFollower, TombStone, InstantPlan,
|
||||
PlannedSessionStep,
|
||||
)
|
||||
from rowers.models import (
|
||||
RowerPowerForm, RowerHRZonesForm, RowerForm, RowerCPForm, GraphImage, AdvancedWorkoutForm,
|
||||
|
||||
Reference in New Issue
Block a user