diff options
Diffstat (limited to 'ishtar_common/templates/ishtar/blocks/sheet_geographic.html')
-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 d1ac63815..295c7ef46 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html @@ -1,4 +1,5 @@ {% load i18n ishtar_helpers window_field %} +{% with search_url=item.get_search_url %} <table id='{{window_id}}-geographic-data' class="table table-striped"> <tr> {% if permission_change_geo %}<th> </th>{% endif %} @@ -14,7 +15,7 @@ {% for geo in geo_item.geodata.all %} <tr> {% if permission_change_geo %} - <td><a href="{% url 'edit-geo' geo.pk %}">{% if geo|can_edit_item:request %}<i class="fa fa-pencil"></i></a>{% else %}–{% endif %}</td> + <td><a href="{% url 'edit-geo' geo.pk %}{% if search_url %}?back_url={{search_url}}%3Fopen_item={{geo_item.pk}}{% endif %}">{% 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> @@ -29,6 +30,7 @@ </table> {% if permission_change_geo %} <div class="text-center"> - <a class="btn btn-success" href="{% url 'create-pre-geo' item.app_label item.model_name item.pk %}"><i class="fa fa-plus"></i> {% trans "geo item" %}</a> + <a class="btn btn-success" href="{% url 'create-pre-geo' item.app_label item.model_name item.pk %}{% if search_url %}?back_url={{search_url}}%3Fopen_item={{geo_item.pk}}{% endif %}"><i class="fa fa-plus"></i> {% trans "geo item" %}</a> </div> {% endif %} +{% endwith %}
\ No newline at end of file |