mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-20 15:02:31 +00:00
Add ability to view other users progress on a level
That's kind of important huh :p
This commit is contained in:
@@ -75,6 +75,7 @@ class LevelDetail(generic.DetailView):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["page_title"] = "Training Level {} {}".format(self.object, self.object.get_icon)
|
||||
context["users_with"] = map(lambda qual: qual.trainee, models.TrainingLevelQualification.objects.filter(level=self.object))
|
||||
context["u"] = models.Trainee.objects.get(pk=self.kwargs['u']) if 'u' in self.kwargs else self.request.user
|
||||
return context
|
||||
|
||||
|
||||
@@ -114,17 +115,6 @@ class TraineeList(generic.ListView):
|
||||
return context
|
||||
|
||||
|
||||
class SessionLog(generic.FormView):
|
||||
template_name = "session_log_form.html"
|
||||
form_class = forms.SessionLogForm
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(SessionLog, self).get_context_data(**kwargs)
|
||||
context["page_title"] = "Log New Training Session"
|
||||
context["depths"] = models.TrainingItemQualification.CHOICES
|
||||
return context
|
||||
|
||||
|
||||
class AddQualification(generic.CreateView, ModalURLMixin):
|
||||
template_name = "edit_training_record.html"
|
||||
model = models.TrainingItemQualification
|
||||
|
||||
Reference in New Issue
Block a user