Merge tag 'v8.46' into develop
releasing some plan improvements
This commit is contained in:
+3
-24
@@ -103,6 +103,7 @@ import rowers.uploads as uploads
|
|||||||
from django.forms.formsets import formset_factory
|
from django.forms.formsets import formset_factory
|
||||||
from django.forms import modelformset_factory
|
from django.forms import modelformset_factory
|
||||||
import StringIO
|
import StringIO
|
||||||
|
import cStringIO
|
||||||
from django.contrib.auth.decorators import login_required #,user_passes_test
|
from django.contrib.auth.decorators import login_required #,user_passes_test
|
||||||
from rowers.decorators import user_passes_test
|
from rowers.decorators import user_passes_test
|
||||||
from time import strftime,strptime,mktime,time,daylight
|
from time import strftime,strptime,mktime,time,daylight
|
||||||
@@ -1457,31 +1458,9 @@ def plannedsessions_icsemail_view(request,userid=0):
|
|||||||
event.add('comment',comment)
|
event.add('comment',comment)
|
||||||
cal.add_component(event)
|
cal.add_component(event)
|
||||||
|
|
||||||
icsfilename = 'calendar_{id}.ics'.format(id=request.user.id)
|
|
||||||
|
|
||||||
with open(icsfilename,'wb') as f:
|
|
||||||
f.write(cal.to_ical())
|
|
||||||
|
|
||||||
res = myqueue(queuehigh,handle_sendemailics,
|
response = HttpResponse(cal.to_ical(),content_type = 'text/plain')
|
||||||
request.user.first_name,
|
response['Content-Disposition'] = 'attachment; filename="training_plan_%s.ics"' % request.user.id
|
||||||
request.user.last_name,
|
|
||||||
request.user.email,icsfilename,
|
|
||||||
emailbounced = r.emailbounced
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
successmessage = "The calendar file was sent to you per email"
|
|
||||||
messages.info(request,successmessage)
|
|
||||||
url = reverse(plannedsessions_view,
|
|
||||||
kwargs = {
|
|
||||||
'userid':r.user.id,
|
|
||||||
})
|
|
||||||
startdatestring = startdate.strftime('%Y-%m-%d')
|
|
||||||
enddatestring = enddate.strftime('%Y-%m-%d')
|
|
||||||
url+='?when='+startdatestring+'/'+enddatestring
|
|
||||||
|
|
||||||
|
|
||||||
response = HttpResponseRedirect(url)
|
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|||||||
+42
-1
@@ -660,10 +660,51 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
header, user, nav, aside, footer {
|
.wrapper {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4,1fr);
|
||||||
|
grid-template-areas:
|
||||||
|
"content content content content"
|
||||||
|
}
|
||||||
|
|
||||||
|
header, ad, user, nav, aside, footer {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
-webkit-transition: none !important;
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
body {
|
||||||
|
color:#000;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
body, content {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@page {
|
||||||
|
margin: 2cm;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3 {
|
||||||
|
page-break-after: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul, img {
|
||||||
|
page-break-inside: avoid;
|
||||||
|
}
|
||||||
|
|
||||||
|
table tr td {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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 */
|
||||||
-webkit-transition: -webkit-transform 0.3s;
|
-webkit-transition: -webkit-transform 0.3s;
|
||||||
|
|||||||
@@ -289,14 +289,14 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<div class="ad">
|
<ad class="ad">
|
||||||
{% block ad %}
|
{% block ad %}
|
||||||
<a href="https://pryglrowing.com">
|
<a href="https://pryglrowing.com">
|
||||||
<img src="/static/img/prygl.jpg">
|
<img src="/static/img/prygl.jpg">
|
||||||
<p style="text-align: center">Prygl Rowing Camps</p>
|
<p style="text-align: center">Prygl Rowing Camps</p>
|
||||||
</a>
|
</a>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</ad>
|
||||||
|
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
<p>Follow us on
|
<p>Follow us on
|
||||||
|
|||||||
Reference in New Issue
Block a user