diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-05-09 13:16:58 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:21:00 +0100 |
| commit | 12de821ded4f964c89d1ac758701bcaf4750e7de (patch) | |
| tree | 232c6731b19d3a860776a23beeb485ebcc5500ba /ishtar_common/templates | |
| parent | 5caf4058758d0e5640f1e92d919ffa3fcae0ba27 (diff) | |
| download | Ishtar-12de821ded4f964c89d1ac758701bcaf4750e7de.tar.bz2 Ishtar-12de821ded4f964c89d1ac758701bcaf4750e7de.zip | |
Geodata: filter edit permissions for geo items
Diffstat (limited to 'ishtar_common/templates')
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/sheet_geographic.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html index c5a413cc6..69cd67fcc 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html @@ -1,4 +1,4 @@ -{% load i18n window_field %} +{% load i18n ishtar_helpers window_field %} <table id='{{window_id}}-geographic-data' class="table table-striped"> <tr> {% if permission_change_geo %}<th> </th>{% endif %} @@ -13,7 +13,9 @@ </tr> {% for geo in geo_item.geodata.all %} <tr> - {% if permission_change_geo %}<td><a href="#"><i class="fa fa-pencil"></i></a></td>{% endif %} + {% if permission_change_geo %} + <td><a href="#">{% if geo|can_edit_item:request %}<i class="fa fa-pencil"></i></a>{% else %}–{% endif %}</td> + {% endif %} <td>{% if geo.id == geo_item.main_geodata_id %}<i class="fa fa-check-circle text-success" aria-hidden="true"></i>{% else %}–{% endif %}</td> <td>{% if geo.data_type %}{{ geo.data_type }}{% else %}-{% endif %}</td> <td>{{ geo.source_label }}</td> |
