summaryrefslogtreecommitdiff
path: root/ishtar_common/admin.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-11-14 12:46:21 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:19 +0100
commit2fd7a306df69b723036a94346baa7ea17c9b7364 (patch)
tree036df768cb1e04a782ef5c513a013d2c57473e2c /ishtar_common/admin.py
parent0782d3b5e87b48adf8663dd3723567c587fe9e4b (diff)
downloadIshtar-2fd7a306df69b723036a94346baa7ea17c9b7364.tar.bz2
Ishtar-2fd7a306df69b723036a94346baa7ea17c9b7364.zip
Admin: site profile - better form layout
Diffstat (limited to 'ishtar_common/admin.py')
-rw-r--r--ishtar_common/admin.py103
1 files changed, 103 insertions, 0 deletions
diff --git a/ishtar_common/admin.py b/ishtar_common/admin.py
index beb213689..8e47b33b4 100644
--- a/ishtar_common/admin.py
+++ b/ishtar_common/admin.py
@@ -503,6 +503,109 @@ class IshtarSiteProfileAdmin(admin.ModelAdmin):
)
model = models.IshtarSiteProfile
form = AdminIshtarSiteProfileForm
+ fieldsets = (
+ (None, {
+ "fields": (
+ "label",
+ "slug",
+ "active",
+ "homepage",
+ )
+ }),
+ (_("Detail"), {
+ "classes": ("collapse",),
+ "fields": (
+ "description",
+ "warning_name",
+ "warning_message"
+ ),
+ }),
+ (_("Modules"), {
+ "classes": ("collapse",),
+ "fields": (
+ "files",
+ "archaeological_site",
+ "context_record",
+ "find",
+ "warehouse",
+ "preservation",
+ "mapping",
+ "underwater",
+ ),
+ }),
+ (_("Advanced configuration"), {
+ "classes": ("collapse",),
+ "fields": (
+ "config",
+ "default_language",
+ "archaeological_site_label",
+ "parent_relations_engine",
+ "delete_image_zip_on_archive",
+ "clean_redundant_document_association",
+ "person_raw_name",
+ "currency",
+ "account_naming_style",
+ "point_precision",
+ "default_center",
+ "default_zoom",
+ "srs",
+ ),
+ }),
+ (_("Advanced features"), {
+ "classes": ("collapse",),
+ "fields": (
+ "experimental_feature",
+ "calculate_weight_on_full",
+ "locate_warehouses",
+ "use_town_for_geo",
+ "relation_graph",
+ "parcel_mandatory",
+ ),
+ }),
+ (_("Index"), {
+ "classes": ("collapse",),
+ "description": "<div style='padding: .75rem 1.25rem;padding-right: 1.25rem;margin-bottom: 1rem;border: 1px solid transparent;border-radius: .25rem;color: #856404;background-color: #fff3cd;border-color: #ffeeba;'>" + \
+ str(
+ _("Change this with extra care. With incorrect configuration, the "
+ "application might be unusable. Some change need to adapt importers. "
+ "Regeneration of ID might be required.")
+ ) + "</div>",
+ "fields": (
+ "operation_prefix",
+ "default_operation_prefix",
+ "operation_region_code",
+ "operation_complete_identifier",
+ "operation_custom_index",
+ "site_complete_identifier",
+ "site_custom_index",
+ "file_external_id",
+ "file_complete_identifier",
+ "file_custom_index",
+ "parcel_external_id",
+ "context_record_external_id",
+ "contextrecord_complete_identifier",
+ "contextrecord_custom_index",
+ "base_find_external_id",
+ "basefind_complete_identifier",
+ "basefind_custom_index",
+ "find_external_id",
+ "find_complete_identifier",
+ "find_use_index",
+ "find_index",
+ "find_custom_index",
+ "container_external_id",
+ "container_complete_identifier",
+ "container_custom_index",
+ "warehouse_external_id",
+ "warehouse_complete_identifier",
+ "warehouse_custom_index",
+ "document_external_id",
+ "document_complete_identifier",
+ "document_custom_index",
+
+ ),
+ }),
+ )
admin_site.register(models.IshtarSiteProfile, IshtarSiteProfileAdmin)