Parcourir la source

Add edit link from public page

Jocelyn Delande il y a 9 ans
Parent
commit
85244c6e9e

+ 1 - 0
costs/templates/costs/base.html

@@ -15,6 +15,7 @@
   <link rel="stylesheet" type="text/css" href="{% static "costs/3rd/semantic/components/site.css" %}" >
 
   <link rel="stylesheet" type="text/css" href="{% static "costs/3rd/semantic/components/breadcrumb.css" %}" >
+  <link rel="stylesheet" type="text/css" href="{% static "costs/3rd/semantic/components/button.css" %}" >
   <link rel="stylesheet" type="text/css" href="{% static "costs/3rd/semantic/components/container.css" %}" >
   <link rel="stylesheet" type="text/css" href="{% static "costs/3rd/semantic/components/divider.css" %}" >
   <link rel="stylesheet" type="text/css" href="{% static "costs/3rd/semantic/components/grid.css" %}" >

+ 9 - 0
costs/templates/costs/document_detail.html

@@ -15,6 +15,15 @@
 </div>
 {% endif %}
 
+{% if request.user.is_staff %}
+<a href="{% url 'admin:costs_document_change' document.id %}" class="ui button">
+  <i class="edit icon"></i>
+    Éditer
+</a>
+{% endif %}
+
+
+
 {% endblock %}
 
 

+ 6 - 0
costs/templates/costs/service_detail.html

@@ -29,6 +29,12 @@
 {{ service.description|linebreaks }}
   </p>
   </div>
+  {% if request.user.is_staff %}
+  <a href="{% url 'admin:costs_service_change' service.id %}" class="ui button">
+    <i class="edit icon"></i>
+    Éditer
+  </a>
+  {% endif %}
 {% endblock %}