summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/admin.py8
-rw-r--r--ishtar_common/fixtures/initial_data-fr.json396
-rw-r--r--ishtar_common/forms_common.py8
-rw-r--r--ishtar_common/locale/django.pot378
-rw-r--r--ishtar_common/static/media/style.css81
-rw-r--r--ishtar_common/templates/blocks/JQueryJqGrid.html11
-rw-r--r--ishtar_common/templates/blocks/form_flex_snippet.html14
-rw-r--r--ishtar_common/templates/ishtar/sheet_source.html3
-rw-r--r--ishtar_common/templates/ishtar/wizard/default_wizard.html4
-rw-r--r--ishtar_common/templates/ishtar/wizard/search.html9
-rw-r--r--ishtar_common/views.py37
-rw-r--r--ishtar_common/widgets.py5
-rw-r--r--ishtar_common/wizards.py11
13 files changed, 752 insertions, 213 deletions
diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py
index 8c998deac..f8cc34208 100644
--- a/ishtar_common/admin.py
+++ b/ishtar_common/admin.py
@@ -101,18 +101,22 @@ admin.site.register(models.Department, DepartmentAdmin)
class OrganizationAdmin(HistorizedObjectAdmin):
- list_display = ('name', 'organization_type')
+ list_display = ('pk', 'name', 'organization_type')
list_filter = ("organization_type",)
search_fields = ('name',)
+ exclude = ('merge_key', 'merge_exclusion', 'merge_candidate',
+ 'exclude_from_merge')
model = models.Organization
admin.site.register(models.Organization, OrganizationAdmin)
class PersonAdmin(HistorizedObjectAdmin):
- list_display = ('name', 'surname', 'raw_name', 'email')
+ list_display = ('pk', 'name', 'surname', 'raw_name', 'email')
list_filter = ("person_types",)
search_fields = ('name', 'surname', 'email', 'raw_name')
+ exclude = ('merge_key', 'merge_exclusion', 'merge_candidate',
+ 'exclude_from_merge')
model = models.Person
admin.site.register(models.Person, PersonAdmin)
diff --git a/ishtar_common/fixtures/initial_data-fr.json b/ishtar_common/fixtures/initial_data-fr.json
index dfac559fd..48793410f 100644
--- a/ishtar_common/fixtures/initial_data-fr.json
+++ b/ishtar_common/fixtures/initial_data-fr.json
@@ -779,5 +779,401 @@
"order": 1,
"txt_idx": "sampling"
}
+ },
+ {
+ "pk": 115,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Autre \u00e9tude",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "other_study"
+ }
+ },
+ {
+ "pk": 1,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "Une op\u00e9ration arch\u00e9ologique visant \u00e0 qualifier et quantifier la pr\u00e9sence de vestiges sur une surface donn\u00e9e.",
+ "available": true,
+ "label": "Diagnostic arch\u00e9ologique",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "arch_diagnostic"
+ }
+ },
+ {
+ "pk": 7,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "\u00c9tude de b\u00e2ti (pr\u00e9ventif)",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "building_study"
+ }
+ },
+ {
+ "pk": 10,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "\u00c9tude documentaire (pr\u00e9ventif)",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "documents_study"
+ }
+ },
+ {
+ "pk": 12,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "\u00c9valuation",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "evaluation"
+ }
+ },
+ {
+ "pk": 113,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": null,
+ "available": true,
+ "label": "Fouille ancienne",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "ancient_excavation"
+ }
+ },
+ {
+ "pk": 2,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "A pr\u00e9ciser",
+ "available": true,
+ "label": "Fouille arch\u00e9ologique pr\u00e9ventive",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "prev_excavation"
+ }
+ },
+ {
+ "pk": 123,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": false,
+ "label": "Prospection inventaire (pr\u00e9ventif)",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "inventory_survey"
+ }
+ },
+ {
+ "pk": 124,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": null,
+ "available": false,
+ "label": "Prospection (pr\u00e9ventif)",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "survey"
+ }
+ },
+ {
+ "pk": 22,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": null,
+ "available": true,
+ "label": "Sauvetage urgent",
+ "preventive": true,
+ "order": 1,
+ "txt_idx": "emergency_excavation"
+ }
+ },
+ {
+ "pk": 118,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Aide \u00e0 la pr\u00e9paration de publication",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "assistance_preparation_help"
+ }
+ },
+ {
+ "pk": 130,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Aide \u00e0 l'\u00e9dition",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "AE"
+ }
+ },
+ {
+ "pk": 132,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": null,
+ "available": true,
+ "label": "Diagnostic arch\u00e9ologique (programm\u00e9)",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "arch_diagnostic_research"
+ }
+ },
+ {
+ "pk": 131,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Diffusion (pour les colloques, expo, s\u00e9minaires...)",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "communication"
+ }
+ },
+ {
+ "pk": 8,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "\u00c9tude de b\u00e2ti (programm\u00e9)",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "building_study_research"
+ }
+ },
+ {
+ "pk": 11,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "\u00c9tude documentaire (programm\u00e9)",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "documents_study_research"
+ }
+ },
+ {
+ "pk": 3,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Fouille arch\u00e9ologique programm\u00e9e",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "prog_excavation"
+ }
+ },
+ {
+ "pk": 13,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Fouille arch\u00e9ologique programm\u00e9e pluriannuelle",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "prog_excavation_multiyear"
+ }
+ },
+ {
+ "pk": 122,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Programme d'analyses",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "analysis_program"
+ }
+ },
+ {
+ "pk": 16,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Projet Collectif de Recherche",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "collective_research_project"
+ }
+ },
+ {
+ "pk": 14,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Prospection a\u00e9rienne",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "aerial_survey_research"
+ }
+ },
+ {
+ "pk": 126,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": false,
+ "label": "Prospection a\u00e9rienne (pr\u00e9ventif)",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "aerial_survey"
+ }
+ },
+ {
+ "pk": 117,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Prospection avec mat\u00e9riel sp\u00e9cialis\u00e9",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "specialized_eqp_prospection"
+ }
+ },
+ {
+ "pk": 20,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Prospection avec relev\u00e9 d'art rupestre",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "rock_art_survey"
+ }
+ },
+ {
+ "pk": 120,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": null,
+ "available": true,
+ "label": "Prospection d\u00e9tecteur de m\u00e9taux",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "metal_detector_prospection"
+ }
+ },
+ {
+ "pk": 114,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": false,
+ "label": "Prospection diachronique",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "diachronic_prospection"
+ }
+ },
+ {
+ "pk": 17,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Prospection inventaire",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "inventory_survey_research"
+ }
+ },
+ {
+ "pk": 18,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": false,
+ "label": "Prospection (programm\u00e9)",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "survey_research"
+ }
+ },
+ {
+ "pk": 5,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "Une campagne de prospection sur un th\u00e8me particulier",
+ "available": true,
+ "label": "Prospection th\u00e9matique",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "thematic_survey"
+ }
+ },
+ {
+ "pk": 116,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": false,
+ "label": "Prospection th\u00e9matique",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "thematic_prospection"
+ }
+ },
+ {
+ "pk": 121,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": null,
+ "available": true,
+ "label": "Relev\u00e9 d'art rupestre",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "cave_art_record"
+ }
+ },
+ {
+ "pk": 21,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "Pas assez gros pour \u00eatre une fouille, mais porte n\u00e9anmoins atteinte au sous-sol.",
+ "available": false,
+ "label": "Sondage",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "sampling_research"
+ }
+ },
+ {
+ "pk": 127,
+ "model": "ishtar_common.operationtype",
+ "fields": {
+ "comment": "",
+ "available": true,
+ "label": "Sondage (programm\u00e9)",
+ "preventive": false,
+ "order": 1,
+ "txt_idx": "sampling"
+ }
}
]
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py
index 29997a741..5863baab2 100644
--- a/ishtar_common/forms_common.py
+++ b/ishtar_common/forms_common.py
@@ -593,6 +593,9 @@ class SourceForm(forms.Form):
required=False)
description = forms.CharField(label=_(u"Description"),
widget=forms.Textarea, required=False)
+ additional_information = forms.CharField(
+ label=_(u"Additional information"), widget=forms.Textarea,
+ required=False)
duplicate = forms.BooleanField(label=_(u"Has a duplicate"),
required=False)
@@ -609,9 +612,14 @@ class SourceSelect(TableSelect):
validators=[models.valid_id(models.Author)], label=_(u"Author"),
required=False)
+ title = forms.CharField(label=_(u"Title"))
source_type = forms.ChoiceField(label=_("Source type"), choices=[])
reference = forms.CharField(label=_(u"Reference"))
internal_reference = forms.CharField(label=_(u"Internal reference"))
+ description = forms.CharField(label=_(u"Description"))
+ comment = forms.CharField(label=_(u"Comment"))
+ additional_information = forms.CharField(
+ label=_(u"Additional informations"))
duplicate = forms.NullBooleanField(label=_(u"Has a duplicate"))
def __init__(self, *args, **kwargs):
diff --git a/ishtar_common/locale/django.pot b/ishtar_common/locale/django.pot
index 20e1cd7bf..5a49d053f 100644
--- a/ishtar_common/locale/django.pot
+++ b/ishtar_common/locale/django.pot
@@ -23,7 +23,7 @@ msgstr ""
msgid "Archaeological file"
msgstr ""
-#: context_processors.py:34 models.py:1166
+#: context_processors.py:34 models.py:1178
msgid "Operation"
msgstr ""
@@ -175,7 +175,7 @@ msgid "Template"
msgstr ""
#: forms_common.py:39 forms_common.py:57 forms_common.py:169
-#: forms_common.py:269 forms_common.py:274 models.py:1059 models.py:2262
+#: forms_common.py:269 forms_common.py:274 models.py:1059 models.py:2274
#: templates/blocks/JQueryAdvancedTown.html:19
#: templates/ishtar/sheet_organization.html:17
msgid "Town"
@@ -191,25 +191,25 @@ msgid ""
"french town Saint-Denis in the Seine-Saint-Denis department.</p>"
msgstr ""
-#: forms_common.py:66 forms_common.py:640 ishtar_menu.py:42 models.py:1960
-#: models.py:2090 models.py:2144 templates/ishtar/sheet_person.html:6
+#: forms_common.py:66 forms_common.py:648 ishtar_menu.py:42 models.py:1973
+#: models.py:2102 models.py:2156 templates/ishtar/sheet_person.html:6
msgid "Person"
msgstr ""
-#: forms_common.py:157 forms_common.py:231 ishtar_menu.py:66 models.py:1883
+#: forms_common.py:157 forms_common.py:231 ishtar_menu.py:66 models.py:1895
#: templates/ishtar/sheet_organization.html:6
msgid "Organization"
msgstr ""
#: forms_common.py:160 forms_common.py:196 forms_common.py:226
-#: forms_common.py:259 models.py:992 models.py:1216 models.py:1433
-#: models.py:1877 models.py:1950 models.py:2248
+#: forms_common.py:259 models.py:992 models.py:1228 models.py:1445
+#: models.py:1889 models.py:1963 models.py:2260
#: templates/ishtar/sheet_organization.html:12
#: templates/ishtar/sheet_organization.html:25
msgid "Name"
msgstr ""
-#: forms_common.py:161 models.py:1161 models.py:1564
+#: forms_common.py:161 models.py:1173 models.py:1576
msgid "Organization type"
msgstr ""
@@ -247,8 +247,8 @@ msgstr ""
msgid "Mobile phone"
msgstr ""
-#: forms_common.py:197 forms_common.py:229 models.py:1588 models.py:1879
-#: models.py:2185 templates/sheet_ope.html:85 templates/sheet_ope.html.py:105
+#: forms_common.py:197 forms_common.py:229 models.py:1600 models.py:1891
+#: models.py:2197 templates/sheet_ope.html:85 templates/sheet_ope.html.py:105
#: templates/sheet_ope.html:126 templates/ishtar/import_list.html:13
#: templates/ishtar/sheet_organization.html:27
#: templates/ishtar/sheet_person.html:56
@@ -260,7 +260,7 @@ msgstr ""
msgid "Organization search"
msgstr ""
-#: forms_common.py:227 forms_common.py:257 models.py:1948
+#: forms_common.py:227 forms_common.py:257 models.py:1961
#: templates/ishtar/sheet_organization.html:26
msgid "Surname"
msgstr ""
@@ -273,13 +273,14 @@ msgstr ""
msgid "Identity"
msgstr ""
-#: forms_common.py:256 forms_common.py:574 models.py:1946 models.py:2182
-#: templates/sheet_ope.html:104 templates/ishtar/sheet_person.html:55
+#: forms_common.py:256 forms_common.py:574 forms_common.py:615 models.py:1959
+#: models.py:2194 templates/sheet_ope.html:104
+#: templates/ishtar/sheet_person.html:55
#: templates/ishtar/blocks/window_tables/documents.html:5
msgid "Title"
msgstr ""
-#: forms_common.py:261 models.py:1952
+#: forms_common.py:261 models.py:1965
msgid "Raw name"
msgstr ""
@@ -287,7 +288,7 @@ msgstr ""
msgid "Current organization"
msgstr ""
-#: forms_common.py:325 forms_common.py:355 forms_common.py:359 models.py:1930
+#: forms_common.py:325 forms_common.py:355 forms_common.py:359 models.py:1943
msgid "Person type"
msgstr ""
@@ -319,7 +320,7 @@ msgstr ""
msgid "Send the new password by email?"
msgstr ""
-#: forms_common.py:430 forms_common.py:443 models.py:2263
+#: forms_common.py:430 forms_common.py:443 models.py:2275
msgid "Towns"
msgstr ""
@@ -335,69 +336,78 @@ msgstr ""
msgid "Documentation informations"
msgstr ""
-#: forms_common.py:576 forms_common.py:612 models.py:1565 models.py:2165
+#: forms_common.py:576 forms_common.py:616 models.py:1577 models.py:2177
msgid "Source type"
msgstr ""
-#: forms_common.py:578 forms_common.py:613 templates/sheet_ope.html:84
+#: forms_common.py:578 forms_common.py:617 templates/sheet_ope.html:84
msgid "Reference"
msgstr ""
-#: forms_common.py:581 forms_common.py:614
+#: forms_common.py:581 forms_common.py:618
msgid "Internal reference"
msgstr ""
-#: forms_common.py:584 models.py:2196
+#: forms_common.py:584 models.py:2208
msgid "Numerical ressource (web address)"
msgstr ""
-#: forms_common.py:585 models.py:2198
+#: forms_common.py:585 models.py:2210
msgid "Receipt date"
msgstr ""
-#: forms_common.py:587 models.py:1715 models.py:2200
+#: forms_common.py:587 models.py:1727 models.py:2212
msgid "Creation date"
msgstr ""
-#: forms_common.py:590 models.py:2203
+#: forms_common.py:590 models.py:2215
msgid "Receipt date in documentation"
msgstr ""
-#: forms_common.py:592 models.py:260 models.py:1460 models.py:2210
+#: forms_common.py:592 forms_common.py:620 models.py:260 models.py:1472
+#: models.py:2222
msgid "Comment"
msgstr ""
-#: forms_common.py:594 models.py:1220 models.py:1392 models.py:1434
-#: models.py:2209 templates/sheet_ope.html:128
+#: forms_common.py:594 forms_common.py:619 models.py:1232 models.py:1404
+#: models.py:1446 models.py:2221 templates/sheet_ope.html:128
msgid "Description"
msgstr ""
-#: forms_common.py:596 forms_common.py:615 models.py:2213
+#: forms_common.py:597 models.py:2223
+msgid "Additional information"
+msgstr ""
+
+#: forms_common.py:599 forms_common.py:623 models.py:2225
msgid "Has a duplicate"
msgstr ""
-#: forms_common.py:609 forms_common.py:633 forms_common.py:666 models.py:2149
+#: forms_common.py:612 forms_common.py:641 forms_common.py:674 models.py:2161
#: templates/ishtar/wizard/wizard_person_deletion.html:124
msgid "Author"
msgstr ""
-#: forms_common.py:625
+#: forms_common.py:622
+msgid "Additional informations"
+msgstr ""
+
+#: forms_common.py:633
msgid "Would you like to delete this documentation?"
msgstr ""
-#: forms_common.py:641 models.py:1566 models.py:2139 models.py:2146
+#: forms_common.py:649 models.py:1578 models.py:2151 models.py:2158
msgid "Author type"
msgstr ""
-#: forms_common.py:659
+#: forms_common.py:667
msgid "Author selection"
msgstr ""
-#: forms_common.py:673
+#: forms_common.py:681
msgid "There are identical authors."
msgstr ""
-#: forms_common.py:677 models.py:2150 models.py:2192
+#: forms_common.py:685 models.py:2162 models.py:2204
#: templates/sheet_ope.html:106
#: templates/ishtar/blocks/window_tables/documents.html:7
msgid "Authors"
@@ -411,7 +421,7 @@ msgstr ""
msgid "Account management"
msgstr ""
-#: ishtar_menu.py:34 models.py:776 views.py:1084
+#: ishtar_menu.py:34 models.py:776 views.py:1117
msgid "Global variables"
msgstr ""
@@ -435,19 +445,19 @@ msgstr ""
msgid "Merge"
msgstr ""
-#: ishtar_menu.py:61 ishtar_menu.py:88 models.py:1752 widgets.py:110
+#: ishtar_menu.py:61 ishtar_menu.py:88 models.py:1764 widgets.py:110
msgid "Delete"
msgstr ""
-#: ishtar_menu.py:96 models.py:1726
+#: ishtar_menu.py:96 models.py:1738
msgid "Imports"
msgstr ""
-#: ishtar_menu.py:99 views.py:1092
+#: ishtar_menu.py:99 views.py:1125
msgid "New import"
msgstr ""
-#: ishtar_menu.py:103 views.py:1106
+#: ishtar_menu.py:103 views.py:1139
msgid "Current imports"
msgstr ""
@@ -479,7 +489,7 @@ msgstr ""
msgid "Available"
msgstr ""
-#: models.py:474 models.py:1506
+#: models.py:474 models.py:1518
msgid "Key"
msgstr ""
@@ -495,7 +505,7 @@ msgstr ""
msgid "Creator"
msgstr ""
-#: models.py:687 models.py:2274
+#: models.py:687 models.py:2286
msgid "Order"
msgstr ""
@@ -515,7 +525,7 @@ msgstr ""
msgid "Description of the variable"
msgstr ""
-#: models.py:772 models.py:1507
+#: models.py:772 models.py:1519
msgid "Value"
msgstr ""
@@ -549,7 +559,7 @@ msgstr ""
msgid "Document templates"
msgstr ""
-#: models.py:1031 models.py:1041 models.py:1710
+#: models.py:1031 models.py:1041 models.py:1722
msgid "State"
msgstr ""
@@ -561,534 +571,530 @@ msgstr ""
msgid "Departments"
msgstr ""
-#: models.py:1098
-msgid "Tel:"
+#: models.py:1100
+msgid "Tel: "
msgstr ""
-#: models.py:1100
+#: models.py:1104
msgid "Mobile: "
msgstr ""
-#: models.py:1102
+#: models.py:1108
msgid "Email: "
msgstr ""
-#: models.py:1107
+#: models.py:1113
msgid "Merge key"
msgstr ""
-#: models.py:1162
+#: models.py:1174
msgid "Organization types"
msgstr ""
-#: models.py:1168
+#: models.py:1180
msgid "Archaeological site"
msgstr ""
-#: models.py:1169
+#: models.py:1181
msgid "Parcels"
msgstr ""
-#: models.py:1171
+#: models.py:1183
msgid "Operation source"
msgstr ""
-#: models.py:1177 views.py:899 views.py:956
+#: models.py:1189 views.py:932 views.py:989
msgid "Archaeological files"
msgstr ""
-#: models.py:1184 views.py:902 views.py:966
+#: models.py:1196 views.py:935 views.py:999
msgid "Context records"
msgstr ""
-#: models.py:1187 views.py:904 views.py:971
+#: models.py:1199 views.py:937 views.py:1004
msgid "Finds"
msgstr ""
-#: models.py:1218
+#: models.py:1230
msgid "Slug"
msgstr ""
-#: models.py:1222 templates/ishtar/dashboards/dashboard_main.html:26
+#: models.py:1234 templates/ishtar/dashboards/dashboard_main.html:26
msgid "Users"
msgstr ""
-#: models.py:1224
+#: models.py:1236
msgid "Associated model"
msgstr ""
-#: models.py:1226
+#: models.py:1238
msgid "Is template"
msgstr ""
-#: models.py:1227
+#: models.py:1239
msgid "Unicity keys (separator \";\")"
msgstr ""
-#: models.py:1231
+#: models.py:1243
msgid "Importer - Type"
msgstr ""
-#: models.py:1232
+#: models.py:1244
msgid "Importer - Types"
msgstr ""
-#: models.py:1322
+#: models.py:1334
msgid "Importer - Default"
msgstr ""
-#: models.py:1323
+#: models.py:1335
msgid "Importer - Defaults"
msgstr ""
-#: models.py:1358
+#: models.py:1370
msgid "Importer - Default value"
msgstr ""
-#: models.py:1359
+#: models.py:1371
msgid "Importer - Default values"
msgstr ""
-#: models.py:1391
+#: models.py:1403
msgid "Column number"
msgstr ""
-#: models.py:1394
+#: models.py:1406
msgid "Required"
msgstr ""
-#: models.py:1397
+#: models.py:1409
msgid "Importer - Column"
msgstr ""
-#: models.py:1398
+#: models.py:1410
msgid "Importer - Columns"
msgstr ""
-#: models.py:1418
+#: models.py:1430
msgid "Field name"
msgstr ""
-#: models.py:1420 models.py:1454
+#: models.py:1432 models.py:1466
msgid "Force creation of new item"
msgstr ""
-#: models.py:1422 models.py:1456
+#: models.py:1434 models.py:1468
msgid "Concatenate with existing"
msgstr ""
-#: models.py:1424 models.py:1458
+#: models.py:1436 models.py:1470
msgid "Concatenate character"
msgstr ""
-#: models.py:1428
+#: models.py:1440
msgid "Importer - Duplicate field"
msgstr ""
-#: models.py:1429
+#: models.py:1441
msgid "Importer - Duplicate fields"
msgstr ""
-#: models.py:1436
+#: models.py:1448
msgid "Regular expression"
msgstr ""
-#: models.py:1439
+#: models.py:1451
msgid "Importer - Regular expression"
msgstr ""
-#: models.py:1440
+#: models.py:1452
msgid "Importer - Regular expressions"
msgstr ""
-#: models.py:1463
+#: models.py:1475
msgid "Importer - Target"
msgstr ""
-#: models.py:1464
+#: models.py:1476
msgid "Importer - Targets"
msgstr ""
-#: models.py:1488 views.py:306
+#: models.py:1500 views.py:306
msgid "True"
msgstr ""
-#: models.py:1489 views.py:308
+#: models.py:1501 views.py:308
msgid "False"
msgstr ""
-#: models.py:1508
+#: models.py:1520
msgid "Is set"
msgstr ""
-#: models.py:1515
+#: models.py:1527
msgid "Importer - Target key"
msgstr ""
-#: models.py:1516
+#: models.py:1528
msgid "Importer - Targets keys"
msgstr ""
-#: models.py:1567 models.py:2177 models.py:2188
+#: models.py:1579 models.py:2189 models.py:2200
msgid "Format"
msgstr ""
-#: models.py:1568 models.py:2278
+#: models.py:1580 models.py:2290
msgid "Operation type"
msgstr ""
-#: models.py:1569
+#: models.py:1581
msgid "Period"
msgstr ""
-#: models.py:1570
+#: models.py:1582
msgid "Unit"
msgstr ""
-#: models.py:1571
+#: models.py:1583
msgid "Material"
msgstr ""
-#: models.py:1573
+#: models.py:1585
msgid "Conservatory state"
msgstr ""
-#: models.py:1574
+#: models.py:1586
msgid "Preservation type"
msgstr ""
-#: models.py:1575
+#: models.py:1587
msgid "Object type"
msgstr ""
-#: models.py:1577
+#: models.py:1589
msgid "Identification type"
msgstr ""
-#: models.py:1578 models.py:2171
+#: models.py:1590 models.py:2183
msgid "Support type"
msgstr ""
-#: models.py:1584
+#: models.py:1596
msgid "Integer"
msgstr ""
-#: models.py:1585
+#: models.py:1597
msgid "Float"
msgstr ""
-#: models.py:1586
+#: models.py:1598
msgid "String"
msgstr ""
-#: models.py:1587 templates/sheet_ope.html:86
+#: models.py:1599 templates/sheet_ope.html:86
msgid "Date"
msgstr ""
-#: models.py:1589 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83
+#: models.py:1601 templates/sheet_ope.html:61 templates/sheet_ope.html.py:83
#: templates/ishtar/sheet_person.html:54
#: templates/ishtar/dashboards/dashboard_main_detail.html:120
msgid "Year"
msgstr ""
-#: models.py:1590
+#: models.py:1602
msgid "String to boolean"
msgstr ""
-#: models.py:1591
+#: models.py:1603
msgctxt "filesystem"
msgid "File"
msgstr ""
-#: models.py:1592
+#: models.py:1604
msgid "Unknow type"
msgstr ""
-#: models.py:1608
+#: models.py:1620
msgid "4 digit year. e.g.: \"2015\""
msgstr ""
-#: models.py:1609
+#: models.py:1621
msgid "4 digit year/month/day. e.g.: \"2015/02/04\""
msgstr ""
-#: models.py:1610
+#: models.py:1622
msgid "Day/month/4 digit year. e.g.: \"04/02/2015\""
msgstr ""
-#: models.py:1620
+#: models.py:1632
msgid "Options"
msgstr ""
-#: models.py:1622
+#: models.py:1634
msgid "Split character(s)"
msgstr ""
-#: models.py:1626
+#: models.py:1638
msgid "Importer - Formater type"
msgstr ""
-#: models.py:1627
+#: models.py:1639
msgid "Importer - Formater types"
msgstr ""
-#: models.py:1674 templates/ishtar/dashboards/dashboard_main_detail.html:61
+#: models.py:1686 templates/ishtar/dashboards/dashboard_main_detail.html:61
msgid "Created"
msgstr ""
-#: models.py:1675
+#: models.py:1687
msgid "Analyse in progress"
msgstr ""
-#: models.py:1676
+#: models.py:1688
msgid "Analysed"
msgstr ""
-#: models.py:1677
+#: models.py:1689
msgid "Import pending"
msgstr ""
-#: models.py:1678
+#: models.py:1690
msgid "Import in progress"
msgstr ""
-#: models.py:1679
+#: models.py:1691
msgid "Finished with errors"
msgstr ""
-#: models.py:1680
+#: models.py:1692
msgid "Finished"
msgstr ""
-#: models.py:1681
+#: models.py:1693
msgid "Archived"
msgstr ""
-#: models.py:1693
+#: models.py:1705
msgid "Imported file"
msgstr ""
-#: models.py:1696
+#: models.py:1708
msgid "Associated images (zip file)"
msgstr ""
-#: models.py:1698
+#: models.py:1710
msgid "Encoding"
msgstr ""
-#: models.py:1700
+#: models.py:1712
msgid "Skip lines"
msgstr ""
-#: models.py:1701 templates/ishtar/import_list.html:47
+#: models.py:1713 templates/ishtar/import_list.html:47
msgid "Error file"
msgstr ""
-#: models.py:1704
+#: models.py:1716
msgid "Result file"
msgstr ""
-#: models.py:1707 templates/ishtar/import_list.html:53
+#: models.py:1719 templates/ishtar/import_list.html:53
msgid "Match file"
msgstr ""
-#: models.py:1713
+#: models.py:1725
msgid "Conservative import"
msgstr ""
-#: models.py:1718
+#: models.py:1730
msgid "End date"
msgstr ""
-#: models.py:1720
+#: models.py:1732
msgid "Seconds remaining"
msgstr ""
-#: models.py:1725
+#: models.py:1737
msgid "Import"
msgstr ""
-#: models.py:1742
+#: models.py:1754
msgid "Analyse"
msgstr ""
-#: models.py:1744 models.py:1747
+#: models.py:1756 models.py:1759
msgid "Re-analyse"
msgstr ""
-#: models.py:1745
+#: models.py:1757
msgid "Launch import"
msgstr ""
-#: models.py:1748
+#: models.py:1760
msgid "Re-import"
msgstr ""
-#: models.py:1749
+#: models.py:1761
msgid "Archive"
msgstr ""
-#: models.py:1751
+#: models.py:1763
msgid "Unarchive"
msgstr ""
-#: models.py:1884
+#: models.py:1896
msgid "Organizations"
msgstr ""
-#: models.py:1886
+#: models.py:1898
msgid "Can view all Organization"
msgstr ""
-#: models.py:1887
+#: models.py:1899
msgid "Can view own Organization"
msgstr ""
-#: models.py:1888
+#: models.py:1900
msgid "Can add own Organization"
msgstr ""
-#: models.py:1890
+#: models.py:1902
msgid "Can change own Organization"
msgstr ""
-#: models.py:1892
+#: models.py:1904
msgid "Can delete own Organization"
msgstr ""
-#: models.py:1926
+#: models.py:1939
msgid "Groups"
msgstr ""
-#: models.py:1931
+#: models.py:1944
msgid "Person types"
msgstr ""
-#: models.py:1938
+#: models.py:1951
msgid "Mr"
msgstr ""
-#: models.py:1939
+#: models.py:1952
msgid "Miss"
msgstr ""
-#: models.py:1940
+#: models.py:1953
msgid "Mr and Miss"
msgstr ""
-#: models.py:1941
+#: models.py:1954
msgid "Mrs"
msgstr ""
-#: models.py:1942
+#: models.py:1955
msgid "Doctor"
msgstr ""
-#: models.py:1954 models.py:2001
+#: models.py:1967 models.py:2014
msgid "Types"
msgstr ""
-#: models.py:1957
+#: models.py:1970
msgid "Is attached to"
msgstr ""
-#: models.py:1961
+#: models.py:1974
msgid "Persons"
msgstr ""
-#: models.py:1963
+#: models.py:1976
msgid "Can view all Person"
msgstr ""
-#: models.py:1964
+#: models.py:1977
msgid "Can view own Person"
msgstr ""
-#: models.py:1965
+#: models.py:1978
msgid "Can add own Person"
msgstr ""
-#: models.py:1966
+#: models.py:1979
msgid "Can change own Person"
msgstr ""
-#: models.py:1967
+#: models.py:1980
msgid "Can delete own Person"
msgstr ""
-#: models.py:2094
+#: models.py:2106
msgid "Ishtar user"
msgstr ""
-#: models.py:2095
+#: models.py:2107
msgid "Ishtar users"
msgstr ""
-#: models.py:2140
+#: models.py:2152
msgid "Author types"
msgstr ""
-#: models.py:2166
+#: models.py:2178
msgid "Source types"
msgstr ""
-#: models.py:2172
+#: models.py:2184
msgid "Support types"
msgstr ""
-#: models.py:2178
+#: models.py:2190
msgid "Formats"
msgstr ""
-#: models.py:2183
+#: models.py:2195
msgid "External ID"
msgstr ""
-#: models.py:2186
+#: models.py:2198
msgid "Support"
msgstr ""
-#: models.py:2190
+#: models.py:2202
msgid "Scale"
msgstr ""
-#: models.py:2204
+#: models.py:2216
msgid "Item number"
msgstr ""
-#: models.py:2205
+#: models.py:2217
msgid "Ref."
msgstr ""
-#: models.py:2208
+#: models.py:2220
msgid "Internal ref."
msgstr ""
-#: models.py:2211
-msgid "Additional information"
-msgstr ""
-
-#: models.py:2249
+#: models.py:2261
msgid "Surface (m2)"
msgstr ""
-#: models.py:2250 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107
+#: models.py:2262 templates/sheet_ope.html:46 templates/sheet_ope.html.py:107
msgid "Localisation"
msgstr ""
-#: models.py:2275
+#: models.py:2287
msgid "Is preventive"
msgstr ""
-#: models.py:2279
+#: models.py:2291
msgid "Operation types"
msgstr ""
-#: models.py:2305
+#: models.py:2317
msgid "Preventive"
msgstr ""
-#: models.py:2306
+#: models.py:2318
msgid "Research"
msgstr ""
@@ -1120,34 +1126,34 @@ msgstr ""
msgid "Organization deletion"
msgstr ""
-#: views.py:600 templates/base.html:80
+#: views.py:633 templates/base.html:80
#: templates/ishtar/sheet_organization.html:35
#: templatetags/link_to_window.py:16
msgid "Details"
msgstr ""
-#: views.py:828 views.py:882
+#: views.py:861 views.py:915
msgid "Operation not permitted."
msgstr ""
-#: views.py:830
+#: views.py:863
#, python-format
msgid "New %s"
msgstr ""
-#: views.py:900 views.py:960
+#: views.py:933 views.py:993
msgid "Operations"
msgstr ""
-#: views.py:1153 templates/ishtar/import_list.html:43
+#: views.py:1186 templates/ishtar/import_list.html:43
msgid "Link unmatched items"
msgstr ""
-#: views.py:1168
+#: views.py:1201
msgid "Delete import"
msgstr ""
-#: views.py:1227 views.py:1243
+#: views.py:1260 views.py:1276
msgid "Corporation manager"
msgstr ""
@@ -1511,7 +1517,7 @@ msgstr ""
msgid "full"
msgstr ""
-#: templates/blocks/JQueryJqGrid.html:88
+#: templates/blocks/JQueryJqGrid.html:96
#: templates/ishtar/blocks/window_tables/dynamic_documents.html:42
msgid "An error as occured during search. Check your query fields."
msgstr ""
diff --git a/ishtar_common/static/media/style.css b/ishtar_common/static/media/style.css
index fdde40cb0..a4c62739b 100644
--- a/ishtar_common/static/media/style.css
+++ b/ishtar_common/static/media/style.css
@@ -8,7 +8,7 @@ a.remove,
background-color:#fff;
}
-div.form {
+div.form, ul.form {
background-color: #f1f2f6;
}
@@ -132,6 +132,11 @@ textarea{
height:80px;
}
+textarea.xlarge{
+ height: 450px;
+ width: 450px;
+}
+
dt{
font-weight:bold;
color:#922;
@@ -407,7 +412,10 @@ div#main_menu > ul > li{
div#content{
clear:both;
- margin:190px 200px 70px 200px;
+ margin-top:190px ;
+ margin-bottom: 70px;
+ margin-left: 200px;
+ margin-right: 150px;
text-align:center;
}
@@ -498,6 +506,47 @@ div.form {
text-align:center;
}
+ul.form-flex {
+ list-style-type: none;
+ text-align: left;
+ display: -ms-flexbox;
+ display: -webkit-flex;
+ display: -moz-flex;
+ display: flex;
+ -webkit-flex-wrap: wrap;
+ -ms-flex-wrap: wrap;
+ -moz-flex-wrap: wrap;
+ flex-wrap: wrap;
+ width: 400px;
+ padding: 0;
+ margin: 0;
+}
+
+
+ul.form-flex li{
+ width: 395px;
+}
+
+@media screen and (min-width: 1051px) {
+ div.form,
+ ul.form-flex {
+ width: 800px;
+ }
+}
+
+@media screen and (min-width: 1400px) {
+ div.form,
+ ul.form-flex {
+ width: 1200px;
+ }
+}
+
+ul.form-flex label {
+ display: inline-block;
+ width: 150px;
+ padding-left: 10px;
+}
+
.form table{
padding:0.2em;
margin-left:auto;
@@ -520,10 +569,24 @@ div.form {
color:#922;
}
-.form table .required th{
+.form .required label{
font-weight:bold;
}
+.form p.input{
+ display: inline-block;
+ width: 200px;
+ margin: 5px;
+}
+
+.form p.input input{
+ width: 200px;
+}
+
+.form p.input select{
+ width: 200px;
+}
+
.form input[readonly=True]{
background-color:#f1f2f6;
border:0;
@@ -538,6 +601,10 @@ div.form {
font-size:0.9em;
}
+ul.form .help_text{
+ width: 400px;
+}
+
.help_text div{
background-color:#FFF;
margin:1em;;
@@ -613,10 +680,6 @@ table.confirm tr.spacer td:last-child{
background-image:none;
}
-.ui-widget-header {
- background:none;
-}
-
.ui-tabs .ui-tabs-nav li a{
color: #D14;
}
@@ -972,8 +1035,8 @@ a.remove{
width:60px;
}
-.widget-parcel{
- width:60px;
+.form p.input input.widget-parcel{
+ width:85px;
}
.small, .small input{
diff --git a/ishtar_common/templates/blocks/JQueryJqGrid.html b/ishtar_common/templates/blocks/JQueryJqGrid.html
index e8647dadf..1639c70f2 100644
--- a/ishtar_common/templates/blocks/JQueryJqGrid.html
+++ b/ishtar_common/templates/blocks/JQueryJqGrid.html
@@ -1,5 +1,4 @@
{% load i18n %}
-</table>
<button id='search_{{name}}' class='submit'>{% trans "Search" %}</button>
@@ -42,7 +41,15 @@ jQuery(document).ready(function(){
for (idx in query_vars)
{
var key = query_vars[idx];
- var val = jQuery("#id_"+key).val();
+ var item = jQuery("#id_"+key);
+ var val = null;
+ if (item.prop('type') == 'checkbox'){
+ if (item.prop('checked')){
+ var val = item.val();
+ }
+ } else {
+ var val = item.val();
+ }
if (val){
if (data) data += "&";
data += key + "=" + val;
diff --git a/ishtar_common/templates/blocks/form_flex_snippet.html b/ishtar_common/templates/blocks/form_flex_snippet.html
new file mode 100644
index 000000000..03d8b15f0
--- /dev/null
+++ b/ishtar_common/templates/blocks/form_flex_snippet.html
@@ -0,0 +1,14 @@
+{% load i18n %}
+<ul class='form-flex'>
+ {% if form.non_field_errors %}<li class='errors'>
+ {{form.non_field_errors}}
+ </li>{%endif%}
+ {% for field in form %}{% if not field.is_hidden %}
+ <li{% if field.field.required %} class='required'{% endif %}>
+ {{ field.label_tag }}
+ <p class='input'>{{ field.errors }}{{field|safe}}</p>{% if field.help_text %}
+ <a href="#{{field.auto_id}}" class="help_display" title="{% trans "Help"%}">?</a>
+ <div class="help_text" id="{{field.auto_id}}_help">
+ {{field.help_text}}</div>
+ {%endif%}</li>{% else %}{{field}}{% endif %}{% endfor %}
+</ul>
diff --git a/ishtar_common/templates/ishtar/sheet_source.html b/ishtar_common/templates/ishtar/sheet_source.html
index 47e285017..06001f783 100644
--- a/ishtar_common/templates/ishtar/sheet_source.html
+++ b/ishtar_common/templates/ishtar/sheet_source.html
@@ -12,6 +12,9 @@
{% field "Item number" item.item_number %}
{% field "Ref." item.reference %}
{% field "Internal ref." item.internal_reference %}
+{% field "Creation date" item.creation_date %}
+{% field "Receipt date" item.receipt_date %}
+{% field "Receipt date in documentation" item.receipt_date_in_documentation %}
{% field "Has a duplicate" item.duplicate %}
{% field "Description" item.description %}
{% field "Comment" item.comment %}
diff --git a/ishtar_common/templates/ishtar/wizard/default_wizard.html b/ishtar_common/templates/ishtar/wizard/default_wizard.html
index a39037d10..1a17cf32b 100644
--- a/ishtar_common/templates/ishtar/wizard/default_wizard.html
+++ b/ishtar_common/templates/ishtar/wizard/default_wizard.html
@@ -35,9 +35,9 @@
<tr class='modify'><td colspan="2"><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></td></tr></li>
</table>
{% else %}
-<table>
+{% if not is_search %}<table>{% endif %}
{% table_form wizard.form %}
-</table>
+{% if not is_search %}</table>{% endif %}
{% endif %}
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
diff --git a/ishtar_common/templates/ishtar/wizard/search.html b/ishtar_common/templates/ishtar/wizard/search.html
index 5cf96552b..e5066cf87 100644
--- a/ishtar_common/templates/ishtar/wizard/search.html
+++ b/ishtar_common/templates/ishtar/wizard/search.html
@@ -8,8 +8,8 @@
<ul id='form_path'>
<li class='current'><a href='#'>{{current_step.form_label}}</a></li>
</ul>
-<div class='form'>
{% if wizard.form.forms %}
+<div class='form'>
<div class='top_button'><input type="submit" id="submit_form" value="{% trans "Validate" %}"/></div>
<table class='formset'>
{%if wizard.form.non_form_errors%}<tr class='error'><th colspan='2'>{{wizard.form.non_form_errors}}</th></tr>{%endif%}
@@ -20,9 +20,8 @@
<tr class='modify'><td colspan="2"><button name="formset_modify" value="{{wizard.steps.current}}">{% trans "Add/Modify" %}</button></td></tr></li>
</table>
{% else %}
-<table>
- {{ wizard.form.as_table }}
-</table>
-{% endif %}
+<div class='form'>
+ {{ wizard.form.as_p }}
</div>
+{% endif %}
{% endblock %}
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index 1f2bc7f67..50acd5595 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -378,6 +378,13 @@ def get_item(model, func_name, default_name, extra_request_keys=[],
old = 'old' in request_items and int(request_items['old'])
except ValueError:
return HttpResponse('[]', mimetype='text/plain')
+
+ relation_types = set()
+ for k in request_items:
+ if k.startswith('relation_types_'):
+ relation_types.add(request_items[k])
+ continue
+
for k in request_keys:
val = request_items.get(k)
if not val:
@@ -460,15 +467,41 @@ def get_item(model, func_name, default_name, extra_request_keys=[],
and_reqs.append(reqs)
break
query = Q(**dct)
- if own:
- query = query & model.get_query_owns(request.user)
for k, or_req in or_reqs:
alt_dct = dct.copy()
alt_dct.pop(k)
alt_dct.update(or_req)
query = query | Q(**alt_dct)
+
+ if relation_types:
+ alt_dct = {
+ 'right_relations__relation_type__pk__in': list(relation_types)}
+ for k in dct:
+ val = dct[k]
+ if k == 'year':
+ k = 'year__exact'
+ alt_dct['right_relations__right_record__' + k] = val
+ if not dct:
+ # fake condition to trick Django (1.4): without it only the
+ # alt_dct is managed
+ query = query & Q(pk__isnull=False)
+ query = query | Q(**alt_dct)
+ for k, or_req in or_reqs:
+ altor_dct = alt_dct.copy()
+ altor_dct.pop(k)
+ for j in or_req:
+ val = or_req[j]
+ if j == 'year':
+ j = 'year__exact'
+ altor_dct['right_relations__right_record__' + j] = val
+ query = query | Q(**altor_dct)
+
+ if own:
+ query = query & model.get_query_owns(request.user)
+
for and_req in and_reqs:
query = query & and_req
+
items = model.objects.filter(query).distinct()
q = request_items.get('sidx')
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py
index dc6324b79..688648e10 100644
--- a/ishtar_common/widgets.py
+++ b/ishtar_common/widgets.py
@@ -567,9 +567,10 @@ class JQueryJqGrid(forms.RadioSelect):
return jq_col_names, extra_cols
def render(self, name, value=None, attrs=None):
- t = loader.get_template('blocks/form_snippet.html')
+ t = loader.get_template('blocks/form_flex_snippet.html')
form = self.form()
- rendered = t.render(Context({'form': form}))
+ rendered = t.render(Context({'form': form,
+ 'flex': True}))
dct = {}
if self.new:
model_name = self.associated_model._meta.object_name.lower()
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 031498ca3..ffbf9b994 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -188,9 +188,13 @@ class Wizard(NamedUrlWizardView):
self.request.session['CURRENT_ACTION'] = self.get_wizard_name()
step = self.steps.first
current_step = self.steps.current
- context.update({'current_step': self.form_list[current_step],
- 'wizard_label': self.label,
- 'current_object': self.get_current_object()})
+ dct = {'current_step': self.form_list[current_step],
+ 'wizard_label': self.label,
+ 'current_object': self.get_current_object(),
+ 'is_search': current_step.startswith('selec-')
+ if current_step else False
+ }
+ context.update(dct)
if step == current_step:
return context
previous_steps, next_steps, previous_step_counter = [], [], 0
@@ -988,6 +992,7 @@ class SearchWizard(NamedUrlWizardView):
self.request.session['CURRENT_ACTION'] = self.get_wizard_name()
current_step = self.steps.current
context.update({'current_step': self.form_list[current_step],
+ 'is_search': True,
'wizard_label': self.label})
return context