Update flowcell chage_form override
[htsworkflow.git] / htsworkflow / templates / admin / experiments / flowcell / change_form.html
index 068fbfea4df63e453f2223dd1224e16c92987428..24fea571e9bfdf507342e1c10bf7379f5f7383a3 100644 (file)
@@ -1,11 +1,10 @@
 {% extends "admin/change_form.html" %}
-{% load i18n %}
-{% block object-tools %}
-{% if change %}{% if not is_popup %}
-  <ul class="object-tools">
-    <li><a href="../../../../{{ app_label }}/started/{{ object_id }}/">{% trans "Started Email" %}</a></li>
-    <li><a href="history/" class="historylink">{% trans "History" %}</a></li>
-  {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
-  </ul>
-{% endif %}{% endif %}
+{% load i18n admin_urls %}
+{% block object-tools-items %}
+    <li><a href="{% url 'started_email' pk=object_id %}">{% trans "Started Email" %}</a></li>
+    <li>
+        {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
+        <a href="{% add_preserved_filters history_url %}" class="historylink">{% trans "History" %}</a>
+    </li>
+    {% if has_absolute_url %}<li><a href="{{ absolute_url }}" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif %}
 {% endblock %}