Tweak versioning templates to allow ID overrides

Asset specific templates begone. Still need to bring back the ID formatting for the Rigboard.
This commit is contained in:
2020-04-06 14:59:10 +01:00
parent d216dd4c74
commit 176324ed79
11 changed files with 35 additions and 53 deletions

View File

@@ -209,6 +209,7 @@ class VersionHistory(generic.ListView):
def get_context_data(self, **kwargs):
context = super(VersionHistory, self).get_context_data(**kwargs)
context['object'] = self.get_object()
context['id'] = self.get_object().pk
return context
@@ -222,6 +223,12 @@ class ActivityTable(generic.ListView):
versions = RIGSVersion.objects.get_for_multiple_models([models.Event, models.Venue, models.Person, models.Organisation, models.EventAuthorisation])
return versions.order_by("-revision__date_created")
def get_context_data(self, **kwargs):
context = super(ActivityTable, self).get_context_data(**kwargs)
context['title'] = 'Rigboard'
return context
class ActivityFeed(generic.ListView):
model = RIGSVersion