diff --git a/geonode/context_processors.py b/geonode/context_processors.py index 3b4ba3a082f..2fb2510ca7f 100644 --- a/geonode/context_processors.py +++ b/geonode/context_processors.py @@ -181,7 +181,8 @@ def resource_urls(request): ), OGC_SERVER=getattr(settings, 'OGC_SERVER', None), DELAYED_SECURITY_SIGNALS=getattr(settings, 'DELAYED_SECURITY_SIGNALS', False), - READ_ONLY_MODE=getattr(Configuration.load(), 'read_only', False) + READ_ONLY_MODE=getattr(Configuration.load(), 'read_only', False), + ADVANCED_EDIT_EXCLUDE_FIELD=getattr(settings, "ADVANCED_EDIT_EXCLUDE_FIELD", []), ) return defaults diff --git a/geonode/documents/templates/documents/document_metadata_advanced.html b/geonode/documents/templates/documents/document_metadata_advanced.html index 6f1b5f4bf30..d18f1bb3bb6 100644 --- a/geonode/documents/templates/documents/document_metadata_advanced.html +++ b/geonode/documents/templates/documents/document_metadata_advanced.html @@ -66,10 +66,32 @@

{% trans "Edit Metadata" %}

Unfortunately this needs to appear at the top (or the bottom) of the form since tkeywords_form is a complete other django form. There might be a better way to solve this.-->
- {{ document_form|as_bootstrap }} + {% block document_fields %} + {% for field in document_form %} + {% if field.name != 'use_featureinfo_custom_template' and field.name != 'featureinfo_custom_template' and field.name not in ADVANCED_EDIT_EXCLUDE_FIELD %} +
+
+ + {{ field }} +
+
+ {% endif %} + {% endfor %} + {% endblock document_fields %} + + {% block thesauri %} + {# layer_form|as_bootstrap #} {% if THESAURI_FILTERS %} - {{ tkeywords_form }} + {% for field in tkeywords_form %} +
+

+ + {{ field }} +

+
+ {% endfor %} {% endif %} +
diff --git a/geonode/documents/templates/layouts/doc_panels.html b/geonode/documents/templates/layouts/doc_panels.html index 675a05083e0..a813ae9b104 100644 --- a/geonode/documents/templates/layouts/doc_panels.html +++ b/geonode/documents/templates/layouts/doc_panels.html @@ -252,6 +252,7 @@ {% trans "Optional Metadata" %} + {% block mandatory %}
@@ -268,6 +269,7 @@
+ {% block doc_thumbnail %}
+ {% endblock doc_thumbnail %}
+ {% block doc_title %}
{{ document_form.title }}
+ {% endblock doc_title %} + {% block doc_links %}
{{ document_form.links }}
+ {% endblock doc_links %} + {% block doc_abstract %}
{{ document_form.abstract }}
+ {% endblock doc_abstract %}
-
- - {{ document_form.keywords }} -
- {% if THESAURI_FILTERS %} -
- {{ tkeywords_form }} -
- {% endif %} + {% block doc_date_type %}
{{ document_form.date_type }}
+ {% endblock doc_date_type %} + + {% block doc_date %}
{{ document_form.date }}
+ {% endblock doc_date %} + {% block doc_category %}
+ {% endblock doc_group %} + {% block doc_keywords %} +
+ + {{ document_form.keywords }} +
+ {% endblock doc_keywords %} + {% if THESAURI_FILTERS %} +
+ {{ tkeywords_form.as_p }} +
+ {% endif %}
@@ -370,6 +390,8 @@
+ {% endblock mandatory %} + {% block advanced %}
@@ -378,51 +400,66 @@
+ {% block doc_language %}
{{ document_form.language }}
+ {% endblock doc_language %} + {% block doc_license %}
{{ document_form.license }}
+ {% endblock doc_license %} + {% block doc_doi %}
{{ document_form.doi }}
+ {% endblock doc_doi %} + {% block doc_attribution %}
{{ document_form.attribution }}
+ {% endblock doc_attribution %}
+ {% block doc_regions %}
{{ document_form.regions }}
+ {% endblock doc_regions %} + {% block doc_data_quality_statement %}
{{ document_form.data_quality_statement }}
+ {% endblock doc_data_quality_statement %}
+ {% block doc_restriction_code_type %}
{{ document_form.restriction_code_type }}
+ {% endblock doc_restriction_code_type %} + {% block doc_constraints_other %}
{{ document_form.constraints_other }} -
+
+ {% endblock doc_constraints_other %}
-
@@ -430,53 +467,69 @@
+ {% endblock advanced %} + {% block ownership %}

{% trans "Other, Optional, Metadata" %}

+ {% block doc_edition %}
{{ document_form.edition }}
+ {% endblock doc_edition %} + {% block doc_purpose %}
{{ document_form.purpose }}
+ {% endblock doc_purpose %} + {% block doc_supplemental_information %}
{{ document_form.supplemental_information }}
+ {% endblock doc_supplemental_information %}
+ {% block doc_temporal_extent_start %}
{{ document_form.temporal_extent_start }}
+ {% endblock doc_temporal_extent_start %}
+ {% block doc_temporal_extent_end %}
{{ document_form.temporal_extent_end }}
+ {% endblock doc_temporal_extent_end %}
+ {% block doc_maintenance_frequency %}
{{ document_form.maintenance_frequency }}
+ {% endblock doc_maintenance_frequency %} + {% block doc_spatial_representation_type %}
{{ document_form.spatial_representation_type }}
+ {% endblock doc_spatial_representation_type %}
@@ -507,6 +560,8 @@
+ {% endblock ownership %} +
diff --git a/geonode/layers/templates/layers/layer_metadata_advanced.html b/geonode/layers/templates/layers/layer_metadata_advanced.html index 515715f2641..35dc5dbe0e8 100644 --- a/geonode/layers/templates/layers/layer_metadata_advanced.html +++ b/geonode/layers/templates/layers/layer_metadata_advanced.html @@ -90,8 +90,8 @@

{% trans "Edit Metadata" %}

There might be a better way to solve this. -->
{% for field in layer_form %} - {% if field.name != 'use_featureinfo_custom_template' and field.name != 'featureinfo_custom_template' %} -
+ {% if field.name != 'use_featureinfo_custom_template' and field.name != 'featureinfo_custom_template' and field.name not in ADVANCED_EDIT_EXCLUDE_FIELD %} +
{{ field }}
diff --git a/geonode/layers/templates/layouts/panels.html b/geonode/layers/templates/layouts/panels.html index cae0e92e9ed..c5df3fa1365 100644 --- a/geonode/layers/templates/layouts/panels.html +++ b/geonode/layers/templates/layouts/panels.html @@ -232,6 +232,7 @@
+{% block edit_progress %}
@@ -244,6 +245,8 @@ {% trans "Optional" %}
+{% endblock edit_progress %} + {% block breadcrumbs %} + {% endblock breadcrumbs %} + {% block mandatory %}
@@ -273,6 +278,7 @@
+ {% block thumbnail %}
@@ -294,38 +300,39 @@
+ {% endblock thumbnail %}
+ {% block layer_title %}
{{ layer_form.title }}
+ {% endblock layer_title %} + {% block layer_abstract %}
{{ layer_form.abstract }}
+ {% endblock layer_abstract %}
-
- - {{ layer_form.keywords }} -
- {% if THESAURI_FILTERS %} -
- {{ tkeywords_form }} -
- {% endif %} + {% block layer_date_type %}
{{ layer_form.date_type }}
+ {% endblock layer_date_type %} + {% block layer_date %}
{{ layer_form.date }}
+ {% endblock layer_date %} + {% block layer_category %}
+ {% endblock layer_group %} + {% block layer_free_keyword %} +
+ + {{ layer_form.keywords }} +
+ {% endblock layer_free_keyword %} + {% if THESAURI_FILTERS %} +
+ {{tkeywords_form.as_p}} +
+ {% endif %}
@@ -375,7 +396,8 @@
- + {% endblock %} + {% block advanced %}
@@ -383,6 +405,7 @@
+ {% block layer_attributes %}
@@ -403,6 +426,8 @@ {{ layer_form.attribution }}
+ {% endblock layer_attributes %} + {% block layer_regions %}
@@ -414,6 +439,8 @@ {{ layer_form.data_quality_statement }}
+ {% endblock layer_regions %} + {% block layer_constraints %}
@@ -426,6 +453,7 @@ {{ layer_form.constraints_other }}
+ {% endblock layer_constraints %}
@@ -435,83 +463,107 @@
- + {% endblock %} + {% block other_tab %}{% endblock other_tab %} + {% block ownership %}
-
+

{% trans "Other, Optional, Metadata" %}

+ {% block layer_edition %}
{{ layer_form.edition }}
+ {% endblock layer_edition %} + {% block layer_purpose %}
{{ layer_form.purpose }}
+ {% endblock layer_purpose %} + {% block layer_supplemental_information %}
{{ layer_form.supplemental_information }}
+ {% endblock layer_supplemental_information %}
-
+ {% block layer_temporal_extent_start %} +
{{ layer_form.temporal_extent_start }}
-
+ {% endblock layer_temporal_extent_start %} + {% block layer_temporal_extent_end %} +
{{ layer_form.temporal_extent_end }}
+ {% endblock layer_temporal_extent_end %}
+ {% block layer_maintenance_frequency %}
{{ layer_form.maintenance_frequency }}
+ {% endblock layer_maintenance_frequency %} + {% block layer_spatial_representation_type %}
{{ layer_form.spatial_representation_type }}
+ {% endblock layer_spatial_representation_type %}
{% trans "Responsible Parties" %}
-
- - {{ layer_form.poc }} -
+ {% block layer_poc %} +
+ + {{ layer_form.poc }} +
+ {% endblock layer_poc %}
{% trans "Responsible and Permissions" %}
+ {% block layer_owner %}
{{ layer_form.owner }}
+ {% endblock layer_owner %} + {% block layer_metadata_author %}
{{ layer_form.metadata_author }}
+ {% endblock layer_metadata_author %}
+ {% endblock %} + {% block dataset %}
@@ -562,6 +614,7 @@
+ {% endblock %}
diff --git a/geonode/maps/templates/layouts/map_panels.html b/geonode/maps/templates/layouts/map_panels.html index 546056c40f3..e337f1741da 100644 --- a/geonode/maps/templates/layouts/map_panels.html +++ b/geonode/maps/templates/layouts/map_panels.html @@ -270,6 +270,7 @@
+ {% block map_thumbnail %}
@@ -290,38 +291,39 @@
+ {% endblock map_thumbnail %}
+ {% block map_title %}
{{ map_form.title }}
+ {% endblock map_title %} + {% block map_abstract %}
{{ map_form.abstract }}
+ {% endblock map_abstract %}
-
- - {{ map_form.keywords }} -
- {% if THESAURI_FILTERS %} -
- {{ tkeywords_form }} -
- {% endif %} + {% block map_date_type %}
{{ map_form.date_type }}
+ {% endblock map_date_type %} + {% block map_date %}
{{ map_form.date }}
+ {% endblock map_date %} + {% block map_category %}
+ {% endblock map_group %} + {% block map_keywords %} +
+ + {{ map_form.keywords }} +
+ {% endblock map_keywords %} + {% if THESAURI_FILTERS %} +
+ {{tkeywords_form.as_p}} +
+ {% endif %}
@@ -379,47 +395,63 @@
+ {% block map_language %}
{{ map_form.language }}
+ {% endblock map_language %} + {% block map_license %}
{{ map_form.license }}
+ {% endblock map_license %} + {% block map_doi %}
{{ map_form.doi }}
+ {% endblock map_doi %} + {% block map_attribution %}
{{ map_form.attribution }}
+ {% endblock map_attribution %}
+ {% block map_regions %}
- - {{ map_form.regions }} + + {{ map_form.regions }}
+ {% endblock map_regions %} + {% block map_data_quality_statement %}
- - - {{ map_form.data_quality_statement }} + + + {{ map_form.data_quality_statement }}
+ {% endblock map_data_quality_statement %}
+ {% block map_restriction_code_type %}
{{ map_form.restriction_code_type }}
+ {% endblock map_restriction_code_type %} + {% block map_constraints_other %}
{{ map_form.constraints_other }} -
+
+ {% endblock map_constraints_other %}
@@ -436,21 +468,27 @@

{% trans "Other, Optional, Metadata" %}

+ {% block map_edition %}
{{ map_form.edition }}
+ {% endblock map_edition %} + {% block map_purpose %}
{{ map_form.purpose }}
+ {% endblock map_purpose %} + {% block map_supplemental_information %}
{{ map_form.supplemental_information }}
+ {% endblock map_supplemental_information %}
@@ -461,11 +499,13 @@
+ {% block map_temporal_extent_end %}
{{ map_form.temporal_extent_end }}
+ {% endblock map_temporal_extent_end %}