Update intensity table head

This commit is contained in:
Gregory Trullemans 2023-11-22 10:27:41 +01:00
parent cf0a513506
commit b4f6a94177
2 changed files with 60 additions and 12 deletions

View File

@ -5,8 +5,7 @@
<div class="card-header">
<div class="row">
<div class="col-8">
<h4 class=""> Intensity listing {% if gymnast %}for <i><a href="{% url 'gymnast_details_tab' gymnast.id 'routine' %}">{{ gymnast }}</a></i>{% endif %}
</h4>
<h4 class=""> Intensity listing {% if gymnast %}for <i><a href="{% url 'gymnast_details_tab' gymnast.id 'routine' %}">{{ gymnast }}</a></i>{% endif %}</h4>
</div>
<div class="col-1 ml-auto">
<div class="text-right">
@ -30,12 +29,12 @@
<th style="width: 18%" class="header text-left">Gymnast</th>
<th style="width: 6%" class="header text-center">Time</th>
<th style="width: 6%" class="header text-center">Diff</th>
<th style="width: 6%" class="header text-center"># skill</th>
<th style="width: 6%" class="header text-center"># Skill</th>
<th style="width: 7%" class="header text-center"># passes</th>
<th style="width: 7%" class="header text-center">T/p</th>
<th style="width: 7%" class="header text-center">D/p</th>
<th style="width: 7%" class="header text-center"># skill</th>
<th style="width: 7%" class="header text-center"># S/p</th>
<th style="width: 7%" class="header text-center">S/T</th>
<th style="width: 7%" class="header text-center">S/p</th>
<th style="width: 7%" class="header text-center">D/S</th>
</tr>
</thead>

View File

@ -64,6 +64,41 @@ import pendulum
User = get_user_model()
MAIL_HEADER = """
<html><head><style id="canary-invert">html {
filter: invert(100%) hue-rotate(180deg) !important;
}
img,
video,
:not(object):not(body)>embed,
object,
svg image,
[style*="background:url"],
[style*="background-image:url"],
[style*="background: url"],
[style*="background-image: url"],
[background],
twitterwidget,
.canary-emoji {
filter: invert(100%) hue-rotate(180deg) !important;
}
[style*="background:url"] *,
[style*="background-image:url"] *,
[style*="background: url"] *,
[style*="background-image: url"] *,
input,
[background] *,
img[src^="https://s0.wp.com/latex.php"],
twitterwidget .NaturalImage-image {
filter: none !important;
}
</style></head><body contenteditable="true" style="font-family:Helvetica;font-size:13px;">Gregory Trullemans<br>
</body></html>"""
@login_required
@require_http_methods(["GET"])
@ -522,9 +557,8 @@ def note_create_or_update(request, note_id=None, gymnast_id=None):
[new_note.gymnast.user.email, new_note.gymnast.email_trainer],
fail_silently=False,
html_message=f"""<p>Bonjour,</p>
<p>Une nouvelle note vous a été envoyée.</p>
<p>Vous pouvez la consulter en cliquant <a href='{url}'>ici</a>.</p>
<br /><p>Excellente journée</p>
<p>Une nouvelle note vous a été envoyée. Vous pouvez la consulter en cliquant <a href='{url}'>ici</a>.</p>
<p>Excellente journée</p>
<p>Jarvis</p>""",
)
return HttpResponseRedirect(
@ -1451,9 +1485,9 @@ def intensity_create_or_update(request, intensity_id=None, gymnast_id=None):
<li>{number_of_passes} passages</li>
<li>{time} minutes</li>
<li>{quantity_of_skill} figures</li>
<li>{difficulty / 10} diff.</li>
<li>{difficulty / 10} difficulty</li>
</ul>
<p><u>Statistics :</u></p>
<p><u>Statistics:</u></p>
<ul>
<li>Time/passe: {time_by_passe:.2f}</li>
<li>Skill/time: {skill_by_time:.2f}</li>
@ -1461,9 +1495,24 @@ def intensity_create_or_update(request, intensity_id=None, gymnast_id=None):
<li>Diff/passe: {diff_by_passe:.2f}</li>
<li>Diff/skill: {diff_by_skill:.2f}</li>
</ul>
<br />
<p>Excellente journée</p>
<p>Jarvis</p>""",
<br />
<p>Jarvis</p>
<p><b>Trampoline Trainer Help</b></p>
<table border="0">
<tbody>
<tr>
<td>
<img id="CB70323B-AC4A-4992-9DD8-3F25DC32658C" height="80px" src="https://www.flyingacrobaticstrampoline.be/img/logo_120px.png" style="max-width: 100vw;">
</td>
<td>
<b><span class="" style="color: rgb(253, 221, 12);">F</span><span class="" style="color: rgb(251, 214, 13);">l</span><span class="" style="color: rgb(249, 207, 14);">y</span><span class="" style="color: rgb(247, 200, 15);">i</span><span class="" style="color: rgb(245, 194, 16);">n</span><span class="" style="color: rgb(243, 187, 17);">g</span>&nbsp;<span class="" style="color: rgb(241, 180, 18);"></span><span class="" style="color: rgb(239, 173, 19);">A</span><span class="" style="color: rgb(237, 166, 20);">c</span><span class="" style="color: rgb(234, 159, 21);">r</span><span class="" style="color: rgb(232, 153, 22);">o</span><span class="" style="color: rgb(230, 146, 23);">b</span><span class="" style="color: rgb(228, 139, 24);">a</span><span class="" style="color: rgb(226, 132, 25);">t</span><span class="" style="color: rgb(224, 125, 26);">i</span><span class="" style="color: rgb(222, 118, 27);">c</span><span class="" style="color: rgb(220, 112, 28);">s</span>&nbsp;<span class="" style="color: rgb(218, 105, 29);"></span><span class="" style="color: rgb(216, 98, 30);">T</span><span class="" style="color: rgb(214, 91, 31);">r</span><span class="" style="color: rgb(212, 84, 32);">a</span><span class="" style="color: rgb(210, 77, 33);">m</span><span class="" style="color: rgb(208, 70, 34);">p</span><span class="" style="color: rgb(206, 64, 35);">o</span><span class="" style="color: rgb(204, 57, 36);">l</span><span class="" style="color: rgb(201, 50, 37);">i</span><span class="" style="color: rgb(199, 43, 38);">n</span><span class="" style="color: rgb(197, 36, 39);">e</span>&nbsp;<span class="" style="color: rgb(195, 29, 40);"></span><span class="" style="color: rgb(193, 23, 41);">C</span><span class="" style="color: rgb(191, 16, 42);">l</span><span class="" style="color: rgb(189, 9, 43);">u</span><span class="" style="color: rgb(187, 2, 44);">b</span></b><br>
<span style="font-size: 13px; letter-spacing: 0.01em; line-height: 1.2;">Rue René Francq, 7</span><br>
<span style="font-size: 13px; letter-spacing: 0.01em; line-height: 1.2;">1428 Lillois-Witterzée</span>
</td>
</tr>
</tbody>
</table>""",
)
return HttpResponseRedirect(