diff options
Diffstat (limited to 'archaeological_finds')
| -rw-r--r-- | archaeological_finds/models_finds.py | 3 | ||||
| -rw-r--r-- | archaeological_finds/templates/ishtar/sheet_basefind.html | 2 | ||||
| -rw-r--r-- | archaeological_finds/templates/ishtar/sheet_find.html | 7 | 
3 files changed, 7 insertions, 5 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 5a9f9e3ae..4b976a730 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -2349,7 +2349,8 @@ class Find(          actions = super(Find, self).get_extra_actions(request)          is_locked = hasattr(self, "is_locked") and self.is_locked(request.user) -        can_add_geo = self.can_do(request, "add_geovectordata") +        profile = get_current_profile() +        can_add_geo = profile.mapping and self.can_do(request, "add_geovectordata")          if can_add_geo:              if self.base_finds.count() == 1:                  actions.append(self.base_finds.all()[0].get_add_geo_action()) diff --git a/archaeological_finds/templates/ishtar/sheet_basefind.html b/archaeological_finds/templates/ishtar/sheet_basefind.html index c3ab1c792..2de9f5afe 100644 --- a/archaeological_finds/templates/ishtar/sheet_basefind.html +++ b/archaeological_finds/templates/ishtar/sheet_basefind.html @@ -55,12 +55,14 @@      <div class="clearfix">      </div> +    {% if not is_external and SHOW_GEO %}      <h3>{% trans "Geographic localisation" %}</h3>      <div class='row'>          {% with geo_item=base_find %}          {% include "ishtar/blocks/sheet_map.html"%}          {% endwith %}      </div> +    {% endif %}      <div class="row">          {% field_flex_full "Point of topographic reference" base_find.topographic_localisation %}      </div> diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 9cfcfe707..a628498e0 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -30,7 +30,6 @@  {% with display_warehouse_treatments=item.container|or_:item.container_ref|or_:item.upstream_treatment|or_:item.downstream_treatment|or_:non_modif_treatments_count|or_:associated_treatment_files_count %}  {% with can_view_documents=permission_view_own_document|or_:permission_view_document %}  {% with display_documents=can_view_documents|and_:item.documents_count %} -{% with display_geo=item.geodata.count %}  {% with has_image=item.images_number %}  {% if output != "ODT" and output != "PDF"%} @@ -67,7 +66,7 @@          </a>      </li>      {% endif %} -    {% if not is_external and display_geo %} +    {% if not is_external and SHOW_GEO %}      <li class="nav-item">          <a class="nav-link" id="{{window_id}}-geodata-tab"             data-toggle="tab" href="#{{window_id}}-geodata" role="tab" @@ -539,7 +538,7 @@    </div>    {% endif %} -  {% if not is_external and display_geo %} +  {% if not is_external and SHOW_GEO %}    <div class="tab-pane fade" id="{{window_id}}-geodata"         role="tabpanel" aria-labelledby="{{window_id}}-geodata-tab">        <h3>{% trans "Geographic data" %}</h3> @@ -563,7 +562,7 @@    {% endif %}  </div> -{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}  {% endblock %}  | 
