Private
Public Access
1
0

adding some breadcrumbs here & there

This commit is contained in:
Sander Roosendaal
2018-10-29 14:22:00 +01:00
parent d201fc90de
commit 8aab3fa65d
2 changed files with 18 additions and 26 deletions

View File

@@ -51,18 +51,18 @@
<td>
{% if thedict|lookup:'results'|lookup:r.id == 'completed' %}
<a class="green dot"
href="{% url 'plannedsession_view' id=thedict|lookup:"id" rowerid=r.id %}">&nbsp;</a>
href="{% url 'plannedsession_view' id=thedict|lookup:"id" userid=r.user.id %}">&nbsp;</a>
{% elif thedict|lookup:'results'|lookup:r.id == 'partial' %}
<a class="orange dot"
href="{% url 'plannedsession_view' id=thedict|lookup:"id" rowerid=r.id %}">&nbsp;</a>
href="{% url 'plannedsession_view' id=thedict|lookup:"id" userid=r.user.id %}">&nbsp;</a>
{% elif thedict|lookup:'results'|lookup:r.id == 'not done' %}
<a class="white dot"
href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ r.id }}/session/{{ thedict|lookup:"id" }}">&nbsp;</a>
href="/rowers/sessions/manage/session/{{ thedict|lookup:"id" }}/user/{{ r.user.id }}/?when={{ timeperiod }}">&nbsp;</a>
{% elif thedict|lookup:'results'|lookup:r.id == 'not assigned' %}
&nbsp;
{% else %}
<a class="red dot"
href="/rowers/sessions/manage/{{ timeperiod }}/rower/{{ r.id }}/session/{{ thedict|lookup:"id" }}">&nbsp;</a>
href="/rowers/sessions/manage/session/{{ thedict|lookup:"id" }}/user/{{ r.user.id }}/?when={{ timeperiod }}">&nbsp;</a>
{% endif %}
</td>
{% endfor %}

View File

@@ -14044,7 +14044,7 @@ def plannedsession_multiclone_view(
'name': 'Planned Sessions'
},
{
'url': reverse(plannedsessions_multiclone_view),
'url': reverse(plannedsession_multiclone_view),
'name': 'Clone Multiple Sessions'
}
]
@@ -14300,7 +14300,7 @@ def plannedsession_multicreate_view(request,
'name': 'Planned Sessions'
},
{
'url': reverse(plannedsessions_multicreate_view),
'url': reverse(plannedsession_multicreate_view),
'name': 'Plan MicroCycle'
}
]
@@ -14337,7 +14337,7 @@ def plannedsession_teamcreate_view(request,
url = reverse(rower_teams_view)
return HttpResponseRedirect(url)
startdate,enddate = get_dates_timeperiod(timeperiod)
startdate,enddate = get_dates_timeperiod(when)
trainingplan = None
@@ -14423,7 +14423,7 @@ def plannedsession_teamcreate_view(request,
'name': 'Planned Sessions'
},
{
'url': reverse(plannedsessions_teamcreate_view),
'url': reverse(plannedsession_teamcreate_view),
'name': 'Add Team Session'
}
]
@@ -14463,7 +14463,7 @@ def plannedsession_teamedit_view(request,
teaminitial = ps.team.all()
startdate,enddate = get_dates_timeperiod(timeperiod)
startdate,enddate = get_dates_timeperiod(when)
try:
trainingplan = TrainingPlan.objects.filter(
@@ -14566,7 +14566,7 @@ def plannedsession_teamedit_view(request,
'name': 'Planned Sessions'
},
{
'url': reverse(plannedsessions_teamcreate_view),
'url': reverse(plannedsession_teamcreate_view),
'name': 'Add Team Session'
}
]
@@ -14597,7 +14597,7 @@ def plannedsessions_coach_view(request,
when = request.GET.get('when')
startdate,enddate = get_dates_timeperiod(timeperiod)
startdate,enddate = get_dates_timeperiod(when)
trainingplan = None
@@ -14760,7 +14760,7 @@ def plannedsessions_print_view(request,userid=0):
when = request.GET.get('when')
startdate,enddate = get_dates_timeperiod(timeperiod)
startdate,enddate = get_dates_timeperiod(when)
try:
trainingplan = TrainingPlan.objects.filter(
@@ -14776,6 +14776,7 @@ def plannedsessions_print_view(request,userid=0):
actualvalue = {}
completiondate = {}
timeperiod = startdate.strftime('%Y-%m-%d')+'/'+enddate.strftime('%Y-%m-%d')
return render(request,'plannedsessions_print.html',
{
'teams':get_my_teams(request.user),
@@ -14798,14 +14799,10 @@ def plannedsessions_manage_view(request,userid=0,
is_ajax = True
when = request.GET.get('when')
if when:
timeperiod = when
else:
timeperiod = 'thisweek'
r = getrequestrower(request,userid=userid)
startdate,enddate = get_dates_timeperiod(timeperiod)
startdate,enddate = get_dates_timeperiod(when)
try:
trainingplan = TrainingPlan.objects.filter(
@@ -14928,7 +14925,7 @@ def plannedsessions_manage_view(request,userid=0,
'name': 'Link Sessions to Workouts'
},
]
timeperiod = startdate.strftime('%Y-%m-%d')+'/'+enddate.strftime('%Y-%m-%d')
return render(request,'plannedsessionsmanage.html',
{
'teams':get_my_teams(request.user),
@@ -14959,7 +14956,7 @@ def plannedsession_clone_view(request,id=0,userid=0):
else:
timeperiod = 'thisweek'
startdate,enddate = get_dates_timeperiod(timeperiod)
startdate,enddate = get_dates_timeperiod(when)
try:
trainingplan = TrainingPlan.objects.filter(
@@ -15023,7 +15020,7 @@ def plannedsession_edit_view(request,id=0,userid=0):
else:
timeperiod = 'thisweek'
startdate,enddate = get_dates_timeperiod(timeperiod)
startdate,enddate = get_dates_timeperiod(when)
try:
@@ -15135,11 +15132,6 @@ def plannedsession_view(request,id=0,userid=0):
r = getrequestrower(request,userid=userid)
when = request.GET.get('when')
if when:
timeperiod = when
else:
timeperiod = 'thisweek'
try:
ps = PlannedSession.objects.get(id=id)
@@ -15247,7 +15239,7 @@ def plannedsession_view(request,id=0,userid=0):
# if coursetest, need to reorder the ranking
startdate,enddate = get_dates_timeperiod(timeperiod)
startdate,enddate = get_dates_timeperiod(when)
try:
trainingplan = TrainingPlan.objects.filter(
startdate__lte = startdate,