summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-08-22 16:59:00 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-08-22 16:59:00 +0200
commit7870e9eb392a0ced9fa722e8a4c1e048075c04ff (patch)
tree608a87900972a8d227dabd864a669bd8bc1c633b /archaeological_finds
parentee52553baad7d5b28a44e55a79104bbcf71e5ed1 (diff)
downloadIshtar-7870e9eb392a0ced9fa722e8a4c1e048075c04ff.tar.bz2
Ishtar-7870e9eb392a0ced9fa722e8a4c1e048075c04ff.zip
Bookmark: manage missing bookmark configuration
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/views.py7
-rw-r--r--archaeological_finds/wizards.py14
2 files changed, 16 insertions, 5 deletions
diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py
index 76f1977e6..6c6d9fff9 100644
--- a/archaeological_finds/views.py
+++ b/archaeological_finds/views.py
@@ -38,7 +38,6 @@ from ishtar_common.views import get_autocomplete_generic, IshtarMixin, \
LoginRequiredMixin
from ishtar_common.views_item import display_item, get_item, show_item, \
revert_item, get_autocomplete_item
-from ishtar_common.wizards import SearchWizard
from wizards import *
get_find = get_item(models.Find, 'get_find', 'find')
@@ -150,7 +149,7 @@ find_search_condition_dict = {
'generalwarehouse-find_search': check_warehouse_module,
}
-find_search_wizard = SearchWizard.as_view([
+find_search_wizard = FindSearch.as_view([
('general-find_search', FindFormSelection),
('generalwarehouse-find_search', FindFormSelectionWarehouseModule)],
label=_(u"Find search"),
@@ -378,7 +377,7 @@ treatment_wizard_steps = [
]
-treatment_search_wizard = SearchWizard.as_view([
+treatment_search_wizard = TreatmentSearch.as_view([
('general-treatment_search', TreatmentFormSelection)],
label=_(u"Treatment search"),
url_name='treatment_search',)
@@ -482,7 +481,7 @@ def treatment_administrativeacttreatment_modify(request, pk):
# treatment request
-treatmentfile_search_wizard = SearchWizard.as_view([
+treatmentfile_search_wizard = TreatmentFileSearch.as_view([
('general-treatmentfile_search', TreatmentFileFormSelection)],
label=_(u"Treatment request search"),
url_name='treatmentfile_search',)
diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py
index b15948dce..6486e5da1 100644
--- a/archaeological_finds/wizards.py
+++ b/archaeological_finds/wizards.py
@@ -21,7 +21,7 @@ from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.utils.translation import ugettext_lazy as _
from ishtar_common.forms import reverse_lazy
-from ishtar_common.wizards import Wizard, DeletionWizard, SourceWizard
+from ishtar_common.wizards import Wizard, DeletionWizard, SearchWizard
from archaeological_operations.wizards import OperationAdministrativeActWizard
from archaeological_operations.models import AdministrativeAct
@@ -29,6 +29,10 @@ from archaeological_context_records.models import ContextRecord
import models
+class FindSearch(SearchWizard):
+ model = models.Find
+
+
class FindWizard(Wizard):
model = models.Find
wizard_done_window = reverse_lazy('show-find')
@@ -98,6 +102,10 @@ class FindDeletionWizard(DeletionWizard):
'comment']
+class TreatmentSearch(SearchWizard):
+ model = models.Treatment
+
+
class TreatmentWizard(Wizard):
model = models.Treatment
wizard_done_window = reverse_lazy('show-treatment')
@@ -162,6 +170,10 @@ class TreatmentEditAdministrativeActWizard(TreatmentAdministrativeActWizard):
return self.get_current_object().treatment
+class TreatmentFileSearch(SearchWizard):
+ model = models.TreatmentFile
+
+
class TreatmentFileWizard(Wizard):
model = models.TreatmentFile
wizard_done_window = reverse_lazy('show-treatmentfile')