print view
This commit is contained in:
@@ -38,11 +38,16 @@
|
|||||||
<i class="fas fa-tasks fa-fw"></i> Link Workouts
|
<i class="fas fa-tasks fa-fw"></i> Link Workouts
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li id="sessions-coach/">
|
<li id="sessions-coach">
|
||||||
<a href="/rowers/sessions/coach">
|
<a href="/rowers/sessions/coach/">
|
||||||
<i class="fas fa-bullhorn fa-fw"></i> Coach View
|
<i class="fas fa-bullhorn fa-fw"></i> Coach View
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li id="sessions-print">
|
||||||
|
<a href="/rowers/sessions/print/">
|
||||||
|
<i class="fas fa-print fa-fw"></i> Print View
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="has-children" id="plan">
|
<li class="has-children" id="plan">
|
||||||
|
|||||||
@@ -1,100 +1,47 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "newbase.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
|
|
||||||
{% block title %}Planned Sessions{% endblock %}
|
{% block title %}Planned Sessions{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block main %}
|
||||||
<div class="grid_12 alpha">
|
|
||||||
{% include "planningbuttons.html" %}
|
|
||||||
</div>
|
|
||||||
<div class="grid_6 alpha">
|
|
||||||
<h1>Plan for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
|
<h1>Plan for {{ rower.user.first_name }} {{ rower.user.last_name }}</h1>
|
||||||
<p>
|
|
||||||
From {{ startdate }} to {{ enddate }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div id="timeperiod" class="grid_2 dropdown">
|
|
||||||
<button class="grid_2 alpha button gray small dropbtn">Select Time Period ({{ timeperiod|verbosetimeperiod }})</button>
|
|
||||||
<div class="dropdown-content">
|
|
||||||
<a class="button gray small alpha"
|
|
||||||
href="/rowers/sessions/print/today/rower/{{ rower.id }}">
|
|
||||||
Today
|
|
||||||
</a>
|
|
||||||
<a class="button gray small alpha"
|
|
||||||
href="/rowers/sessions/print/thisweek/rower/{{ rower.id }}">
|
|
||||||
This Week
|
|
||||||
</a>
|
|
||||||
<a class="button gray small alpha"
|
|
||||||
href="/rowers/sessions/print/thismonth/rower/{{ rower.id }}">
|
|
||||||
This Month
|
|
||||||
</a>
|
|
||||||
<a class="button gray small alpha"
|
|
||||||
href="/rowers/sessions/print/lastweek/rower/{{ rower.id }}">
|
|
||||||
Last Week
|
|
||||||
</a>
|
|
||||||
<a class="button gray small alpha"
|
|
||||||
href="/rowers/sessions/print/lastmonth/rower/{{ rower.id }}">
|
|
||||||
Last Month
|
|
||||||
</a>
|
|
||||||
<a class="button gray small alpha"
|
|
||||||
href="/rowers/sessions/print/nextweek/rower/{{ rower.id }}">
|
|
||||||
Next Week
|
|
||||||
</a>
|
|
||||||
<a class="button gray small alpha"
|
|
||||||
href="/rowers/sessions/print/nextmonth/rower/{{ rower.id }}">
|
|
||||||
Next Month
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% if user.is_authenticated and user|is_manager %}
|
|
||||||
<div class="grid_2 dropdown">
|
|
||||||
<button class="grid_2 alpha button green small dropbtn">
|
|
||||||
{{ rower.user.first_name }} {{ rower.user.last_name }}
|
|
||||||
</button>
|
|
||||||
<div class="dropdown-content">
|
|
||||||
{% for member in user|team_rowers %}
|
|
||||||
<a class="button green small" href="/rowers/sessions/print/{{ timeperiod }}/rower/{{ member.id }}">{{ member.user.first_name }} {{ member.user.last_name }}</a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="grid_2 omega">
|
|
||||||
<a class="button small gray" href="/rowers/list-courses">Courses</a>
|
|
||||||
</div>
|
|
||||||
{% for ps in plannedsessions %}
|
{% for ps in plannedsessions %}
|
||||||
<div class="grid_12 alpha" style="page-break-before: always, page-break-inside: avoid">
|
<h2><a href="/rowers/sessions/{{ ps.id }}">Session {{ ps.name }}</a></h2>
|
||||||
<h1><a href="/rowers/sessions/{{ ps.id }}">Session {{ ps.name }}</a></h1>
|
|
||||||
<table class="listtable shortpadded" width="80%">
|
<table class="listtable shortpadded" width="80%">
|
||||||
<tr>
|
<tr>
|
||||||
<th>On or after</th><td>{{ ps.startdate }}</td>
|
<th align="left">On or after</th><td>{{ ps.startdate }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>On or before</th><td>{{ ps.enddate }}</td>
|
<th align="left">On or before</th><td>{{ ps.enddate }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Session Type</th><td>{{ ps.sessiontype }}</td>
|
<th align="left">Session Type</th><td>{{ ps.sessiontype }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Session Mode</th><td>{{ ps.sessionmode }}</td>
|
<th align="left">Session Mode</th><td>{{ ps.sessionmode }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Criteria</th><td>{{ ps.criterium }}</td>
|
<th align="left">Criteria</th><td>{{ ps.criterium }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Value</th><td>{{ ps.sessionvalue }}</td>
|
<th align="left">Value</th><td>{{ ps.sessionvalue }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Unit</th><td>{{ ps.sessionunit }}</td>
|
<th align="left">Unit</th><td>{{ ps.sessionunit }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Comment</th><td>{{ ps.comment|linebreaks }}</td>
|
<th align="left">Comment</th><td>{{ ps.comment|linebreaks }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block sidebar %}
|
||||||
|
{% include 'menu_plan.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -477,7 +477,8 @@ urlpatterns = [
|
|||||||
views.plannedsessions_manage_view),
|
views.plannedsessions_manage_view),
|
||||||
url(r'^sessions/manage/user/(?P<userid>\d+)/$',
|
url(r'^sessions/manage/user/(?P<userid>\d+)/$',
|
||||||
views.plannedsessions_manage_view),
|
views.plannedsessions_manage_view),
|
||||||
url(r'^sessions/coach$',views.plannedsessions_coach_view),
|
url(r'^sessions/coach/$',views.plannedsessions_coach_view),
|
||||||
|
url(r'^sessions/coach/user/\d+/$',views.plannedsessions_coach_view),
|
||||||
url(r'^sessions/print/?$',views.plannedsessions_print_view),
|
url(r'^sessions/print/?$',views.plannedsessions_print_view),
|
||||||
url(r'^sessions/print/user/(?P<userid>\d+)$',views.plannedsessions_print_view),
|
url(r'^sessions/print/user/(?P<userid>\d+)$',views.plannedsessions_print_view),
|
||||||
url(r'^sessions/$',views.plannedsessions_view),
|
url(r'^sessions/$',views.plannedsessions_view),
|
||||||
|
|||||||
@@ -14279,10 +14279,16 @@ def plannedsessions_view(request,timeperiod='thisweek',userid=0):
|
|||||||
})
|
})
|
||||||
|
|
||||||
@login_required()
|
@login_required()
|
||||||
def plannedsessions_print_view(request,timeperiod='thisweek',userid=0):
|
def plannedsessions_print_view(request,userid=0):
|
||||||
|
|
||||||
r = getrequestrower(request,userid=userid)
|
r = getrequestrower(request,userid=userid)
|
||||||
|
|
||||||
|
when = request.GET.get('when')
|
||||||
|
if when:
|
||||||
|
timeperiod = when
|
||||||
|
else:
|
||||||
|
timeperiod = 'thisweek'
|
||||||
|
|
||||||
startdate,enddate = get_dates_timeperiod(timeperiod)
|
startdate,enddate = get_dates_timeperiod(timeperiod)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -14305,6 +14311,7 @@ def plannedsessions_print_view(request,timeperiod='thisweek',userid=0):
|
|||||||
'plan':trainingplan,
|
'plan':trainingplan,
|
||||||
'plannedsessions':sps,
|
'plannedsessions':sps,
|
||||||
'rower':r,
|
'rower':r,
|
||||||
|
'active':'nav-plan',
|
||||||
'startdate':startdate,
|
'startdate':startdate,
|
||||||
'enddate':enddate,
|
'enddate':enddate,
|
||||||
'timeperiod':timeperiod,
|
'timeperiod':timeperiod,
|
||||||
|
|||||||
@@ -86,11 +86,13 @@ cox {
|
|||||||
|
|
||||||
th {
|
th {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.listtable tbody tr:nth-of-type(even) { background-color: #DDD; }
|
.listtable tbody tr:nth-of-type(even) { background-color: #DDD; }
|
||||||
.listtable thead th {
|
.listtable thead th {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -499,6 +499,8 @@
|
|||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media (min-height: 600px) {
|
@media (min-height: 600px) {
|
||||||
.maxheight {
|
.maxheight {
|
||||||
max-height: 450px;
|
max-height: 450px;
|
||||||
@@ -624,6 +626,10 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
header, user, nav, aside, footer {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
aside .cd-accordion-menu.animated label::before {
|
aside .cd-accordion-menu.animated label::before {
|
||||||
/* this class is used if you're using jquery to animate the accordion */
|
/* this class is used if you're using jquery to animate the accordion */
|
||||||
|
|||||||
Reference in New Issue
Block a user