-
-
-
{% trans "Build Notes" %}
-
-
-
-
-
+
+
{% trans "Build Notes" %}
+ {% include "spacer.html" %}
+
+ {% include "notes_buttons.html" %}
- {% if build.notes %}
- {{ build.notes | markdownify }}
- {% endif %}
+
@@ -392,17 +383,18 @@ onPanelLoad('attachments', function() {
});
onPanelLoad('notes', function() {
- $('#edit-notes').click(function() {
- constructForm('{% url "api-build-detail" build.pk %}', {
- fields: {
- notes: {
- multiline: true,
- }
- },
- title: '{% trans "Edit Notes" %}',
- reload: true,
- });
- });
+
+ setupNotesField(
+ 'build-notes',
+ '{% url "api-build-detail" build.pk %}',
+ {
+ {% if roles.build.change %}
+ editable: true,
+ {% else %}
+ editable: false,
+ {% endif %}
+ }
+ );
});
function reloadTable() {
diff --git a/InvenTree/company/templates/company/detail.html b/InvenTree/company/templates/company/detail.html
index 401dfe219e..ad8354f8a2 100644
--- a/InvenTree/company/templates/company/detail.html
+++ b/InvenTree/company/templates/company/detail.html
@@ -1,7 +1,6 @@
{% extends "company/company_base.html" %}
{% load static %}
{% load i18n %}
-{% load markdownify %}
{% block sidebar %}
{% include 'company/sidebar.html' %}
diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html
index f470fc75f1..a6393b7b68 100644
--- a/InvenTree/order/templates/order/purchase_order_detail.html
+++ b/InvenTree/order/templates/order/purchase_order_detail.html
@@ -4,7 +4,6 @@
{% load status_codes %}
{% load i18n %}
{% load static %}
-{% load markdownify %}
{% block sidebar %}
{% include 'order/po_sidebar.html' %}
diff --git a/InvenTree/order/templates/order/sales_order_detail.html b/InvenTree/order/templates/order/sales_order_detail.html
index 9797c8dedf..f11d1fa832 100644
--- a/InvenTree/order/templates/order/sales_order_detail.html
+++ b/InvenTree/order/templates/order/sales_order_detail.html
@@ -4,7 +4,6 @@
{% load status_codes %}
{% load i18n %}
{% load static %}
-{% load markdownify %}
{% block sidebar %}
{% include "order/so_sidebar.html" %}
@@ -118,24 +117,16 @@
-
-
-
{% trans "Order Notes" %}
-
-
-
-
-
+
+
{% trans "Order Notes" %}
+ {% include "spacer.html" %}
+
+ {% include "notes_buttons.html" %}
- {% if order.notes %}
- {{ order.notes | markdownify }}
- {% endif %}
+
@@ -176,16 +167,18 @@
});
});
- $('#edit-notes').click(function() {
- constructForm('{% url "api-so-detail" order.pk %}', {
- fields: {
- notes: {
- multiline: true,
- }
- },
- title: '{% trans "Edit Notes" %}',
- reload: true,
- });
+ onPanelLoad('order-notes', function() {
+ setupNotesField(
+ 'order-notes',
+ '{% url "api-so-detail" order.pk %}',
+ {
+ {% if roles.purchase_order.change %}
+ editable: true,
+ {% else %}
+ editable: false,
+ {% endif %}
+ }
+ );
});
enableDragAndDrop(
diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html
index da5524fb39..2f13faab8a 100644
--- a/InvenTree/part/templates/part/detail.html
+++ b/InvenTree/part/templates/part/detail.html
@@ -3,7 +3,6 @@
{% load i18n %}
{% load inventree_extras %}
{% load crispy_forms_tags %}
-{% load markdownify %}
{% block sidebar %}
{% include 'part/part_sidebar.html' %}
diff --git a/InvenTree/report/templates/report/inventree_po_report.html b/InvenTree/report/templates/report/inventree_po_report.html
index 2be71f6c38..f999644c2e 100644
--- a/InvenTree/report/templates/report/inventree_po_report.html
+++ b/InvenTree/report/templates/report/inventree_po_report.html
@@ -4,7 +4,6 @@
{% load report %}
{% load barcode %}
{% load inventree_extras %}
-{% load markdownify %}
{% block page_margin %}
margin: 2cm;
diff --git a/InvenTree/stock/templates/stock/item.html b/InvenTree/stock/templates/stock/item.html
index 632f9e523a..ae0742e99e 100644
--- a/InvenTree/stock/templates/stock/item.html
+++ b/InvenTree/stock/templates/stock/item.html
@@ -4,7 +4,6 @@
{% load inventree_extras %}
{% load i18n %}
{% load l10n %}
-{% load markdownify %}
{% block sidebar %}
{% include "stock/stock_sidebar.html" %}