diff --git a/stories/writingtogether/templates/writingtogether/story_part.html b/stories/writingtogether/templates/writingtogether/story_part.html index 494d145..2d72b8b 100644 --- a/stories/writingtogether/templates/writingtogether/story_part.html +++ b/stories/writingtogether/templates/writingtogether/story_part.html @@ -5,7 +5,7 @@ Title - +

Runde {{ current_round }} / {{ total_rounds }}

{% csrf_token %} {{ form.as_p }} diff --git a/stories/writingtogether/views.py b/stories/writingtogether/views.py index cc43727..e16c535 100644 --- a/stories/writingtogether/views.py +++ b/stories/writingtogether/views.py @@ -67,6 +67,10 @@ class StoryPartUpdate(LoginRequiredMixin, UpdateView): def get_context_data(self, **kwargs): context = super(StoryPartUpdate, self).get_context_data(**kwargs) + context.update({ + 'current_round': self.object.turn_number + 1, + 'total_rounds': self.object.part_of.part_of_round.number_of_rounds + }) context.update(self.kwargs) return context