Minor optimisations for training program

This commit is contained in:
Gregory Trullemans 2024-03-02 18:41:15 +01:00
parent 571cf9da4a
commit 10c73276d4
2 changed files with 4 additions and 7 deletions

View File

@ -523,10 +523,7 @@ class Passe(Markdownizable):
def __str__(self):
if self.label:
if self.regexp:
return f"{self.label} {self.regexp} ({self.number_of_skill} | {self.difficulty})"
else:
return f"{self.label} ({self.number_of_skill} | {self.difficulty})"
return f"{self.label} ({self.number_of_skill} | {self.difficulty})"
else:
return f"- ({self.number_of_skill} | {self.difficulty})"

View File

@ -19,9 +19,9 @@
{% for trainingprogram in trainingprogram_list %}
<tr role="row" class="{% cycle 'odd' 'even' %}">
<td>{{ trainingprogram.rank }}</td>
<td>{{ trainingprogram.passe.label }} {{ trainingprogram.passe.repetition }}</td>
<td class="text-center">{{ trainingprogram.passe.number_of_skill}}</td>
<td class="text-center">{{ trainingprogram.passe.difficulty }}</td>
<td>{{ trainingprogram.passe.label }}</td>
<td class="text-center">{{ trainingprogram.number_of_skill}}</td>
<td class="text-center">{{ trainingprogram.difficulty }}</td>
{% if request.user|has_group:"trainer" %}
<td class="text-right p-2">
<a href="#" class="up">