From 29ca22925d3fbdfdc2c7a09b1d99cc36b0874369 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 14 Feb 2018 15:46:19 +0100 Subject: Archaeological site: simple sheet (refs #3913) --- archaeological_operations/views.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'archaeological_operations/views.py') diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index d20c14dfa..2cf4b8fb1 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -29,7 +29,7 @@ from ishtar_common.views import get_item, show_item, revert_item, new_item from ishtar_common.wizards import SearchWizard, check_rights_condition from ishtar_common.forms import ClosingDateFormSelection from ishtar_common.forms_common import AuthorFormset, SourceDeletionForm -from ishtar_common.models import get_current_profile +from ishtar_common.models import get_current_profile, IshtarSiteProfile from wizards import * from forms import * import models @@ -310,7 +310,14 @@ operation_deletion_wizard = OperationDeletionWizard.as_view( # archaeological sites +def site_extra_context(request, item): + return {'SITE_LABEL': IshtarSiteProfile.get_default_site_label()} + get_site = get_item(models.ArchaeologicalSite, 'get_site', 'site') +show_site = show_item( + models.ArchaeologicalSite, 'site', + extra_dct=site_extra_context +) site_search_wizard = SiteSearch.as_view( [('general-site_search', SiteFormSelection)], -- cgit v1.2.3