diff --git a/project/docs/views/base_views.py b/project/docs/views/base_views.py
index a948164..d3854ab 100644
--- a/project/docs/views/base_views.py
+++ b/project/docs/views/base_views.py
@@ -85,6 +85,7 @@ class BaseViews(object):
TEMPLATE_FORM = 'docs/_base/base_form.html'
TEMPLATE_IMG = 'docs/_base/preview.html'
TEMPLATE_FORM_JS = 'docs/stub_js.html'
+ TEMPLATE_CREATE_DOCS = ''
TEMPLATE_EMAIL = 'docs/email/base_email.html'
TEMPLATE_EMAIL_FORM = 'docs/email/base_email_form.html'
@@ -227,6 +228,7 @@ class BaseViews(object):
'filters': filters,
'obj_list_count_before_filtering': obj_list_count_before_filtering,
'email_form': email_form,
+ 'template_create_docs': self.TEMPLATE_CREATE_DOCS,
}
self.update_list_dict(dictionary)
return render(self.request, self.TEMPLATE_LIST, dictionary)
@@ -413,6 +415,7 @@ class BaseViews(object):
'padeji': self.PADEJI,
'padeji_mnoj': self.PADEJI_MNOJ,
'url_prefix': self.URL_PREFIX,
+ 'template_create_docs': self.TEMPLATE_CREATE_DOCS,
}
return render(self.request, self.TEMPLATE_IMG, dictionary)
except:
diff --git a/project/docs/views/invoice.py b/project/docs/views/invoice.py
index 811c1d2..9a1bf96 100644
--- a/project/docs/views/invoice.py
+++ b/project/docs/views/invoice.py
@@ -37,6 +37,7 @@ class InvoiceViews(BaseItemsViews):
# пути к шаблонам
TEMPLATE_LIST = 'docs/invoice/list.html'
TEMPLATE_FORM = 'docs/invoice/form.html'
+ TEMPLATE_CREATE_DOCS = 'docs/parts/invoice_create_docs.html'
# для генерации pdf/xls
PDF_TEMPLATE = 'docs/invoice/as_pdf.html'
diff --git a/project/templates/docs/_base/base_list.html b/project/templates/docs/_base/base_list.html
index fb831cb..2770885 100644
--- a/project/templates/docs/_base/base_list.html
+++ b/project/templates/docs/_base/base_list.html
@@ -81,7 +81,18 @@
{% for obj in page.object_list %}
+ {% url 'docs_aktrabot_add_by_invoice' invoice_id=obj.pk as url_aktrabot_by_invoice %}
+ {% url 'docs_nakladn_add_by_invoice' invoice_id=obj.pk as url_nakladn_by_invoice %}
+ {% url 'docs_faktura_add_by_invoice' invoice_id=obj.pk as url_faktura_by_invoice %}
+
{% include "docs/parts/doc_actions.html" %}
+ {% block panel_copy %}
+ {% if template_create_docs%}
+ {% include template_create_docs %}
+ {% endif %}
+ {% endblock %}
+ {% include "docs/parts/doc_actions2nd.html" %}
+
{% endfor %}
Фильтр списка
diff --git a/project/templates/docs/_base/preview.html b/project/templates/docs/_base/preview.html
index 678469d..422d535 100644
--- a/project/templates/docs/_base/preview.html
+++ b/project/templates/docs/_base/preview.html
@@ -21,6 +21,12 @@
{% include "docs/parts/doc_actions.html" %}
+ {% block panel_copy %}
+ {% if template_create_docs%}
+ {% include template_create_docs %}
+ {% endif %}
+ {% endblock %}
+ {% include "docs/parts/doc_actions2nd.html" %}
diff --git a/project/templates/docs/aktrabot/list.html b/project/templates/docs/aktrabot/list.html
index 7c32050..c0add44 100644
--- a/project/templates/docs/aktrabot/list.html
+++ b/project/templates/docs/aktrabot/list.html
@@ -32,9 +32,4 @@
Копию акта
- {% block panel_copy_extra %}
- {% comment %}
Счёт-фактуру
-
{% endcomment %}
-
Счёт-фактуру
- {% endblock %}
{% endblock %}
diff --git a/project/templates/docs/aktsverki/list.html b/project/templates/docs/aktsverki/list.html
index 5ae37d6..7c5c5ff 100644
--- a/project/templates/docs/aktsverki/list.html
+++ b/project/templates/docs/aktsverki/list.html
@@ -28,4 +28,3 @@
|
{% endblock %}
-{% block panel_copy_extra %}{% endblock %}
diff --git a/project/templates/docs/dover/list.html b/project/templates/docs/dover/list.html
index 3064ac8..0af0a35 100644
--- a/project/templates/docs/dover/list.html
+++ b/project/templates/docs/dover/list.html
@@ -35,4 +35,3 @@
Вы ещё не создали ни одной {{ padeji.rodit }}.
Создать.
{% endblock %}
-{% block panel_copy_extra %}{% endblock %}
diff --git a/project/templates/docs/faktura/list.html b/project/templates/docs/faktura/list.html
index cc939d6..66d04af 100644
--- a/project/templates/docs/faktura/list.html
+++ b/project/templates/docs/faktura/list.html
@@ -32,8 +32,3 @@
Вы ещё не создали ни одной {{ padeji.rodit }}.
Создать.
{% endblock %}
-{% block panel_copy_extra %}
- {% comment %}
Счёт-фактуру
-
{% endcomment %}
-
Счёт-фактуру
-{% endblock %}
diff --git a/project/templates/docs/invoice/list.html b/project/templates/docs/invoice/list.html
index 2cb5dad..4723c24 100644
--- a/project/templates/docs/invoice/list.html
+++ b/project/templates/docs/invoice/list.html
@@ -10,10 +10,3 @@
{{ obj.get_closed_status_display }} |
{% endblock %}
-{% block panel_copy_extra %}
-
Акт по счёту
-
-
Накладную
-
-
Счёт-фактуру
-{% endblock %}
diff --git a/project/templates/docs/nakladn/list.html b/project/templates/docs/nakladn/list.html
index 106fb2c..43d6166 100644
--- a/project/templates/docs/nakladn/list.html
+++ b/project/templates/docs/nakladn/list.html
@@ -32,8 +32,3 @@
Вы ещё не создали ни одной {{ padeji.rodit }}.
Создать.
{% endblock %}
-{% block panel_copy_extra %}
- {% comment %}
Счёт-фактуру
-
{% endcomment %}
-
Счёт-фактуру
-{% endblock %}
diff --git a/project/templates/docs/parts/doc_actions.html b/project/templates/docs/parts/doc_actions.html
index d64710c..1f66ae9 100644
--- a/project/templates/docs/parts/doc_actions.html
+++ b/project/templates/docs/parts/doc_actions.html
@@ -1,8 +1,5 @@
- {% url url_prefix|add:'edit' id=obj.pk as url_edit %}
{% url url_prefix|add:'copy' id=obj.pk as url_copy %}
- {% url url_prefix|add:'delete' id=obj.pk as url_delete %}
- {% url url_prefix|add:'email' id=obj.pk as url_email %}
{% url url_prefix|add:'img' id=obj.pk as url_img %}
{% url url_prefix|add:'pdf' id=obj.pk as url_pdf %}
{% url url_prefix|add:'xls' id=obj.pk as url_xls %}
@@ -11,7 +8,6 @@
{% url 'docs_nakladn_add_by_invoice' invoice_id=obj.pk as url_nakladn_by_invoice %}
{% url 'docs_faktura_add_by_invoice' invoice_id=obj.pk as url_faktura_by_invoice %}
-
-
diff --git a/project/templates/docs/parts/doc_actions2nd.html b/project/templates/docs/parts/doc_actions2nd.html
new file mode 100644
index 0000000..ed32674
--- /dev/null
+++ b/project/templates/docs/parts/doc_actions2nd.html
@@ -0,0 +1,18 @@
+
+ {% url url_prefix|add:'edit' id=obj.pk as url_edit %}
+ {% url url_prefix|add:'delete' id=obj.pk as url_delete %}
+ {% url url_prefix|add:'email' id=obj.pk as url_email %}
+
+
+
+
+
Отправить
+
+
+
+
Редактировать
+
+
+
+
Удалить
+
diff --git a/project/templates/docs/parts/invoice_create_docs.html b/project/templates/docs/parts/invoice_create_docs.html
new file mode 100644
index 0000000..22e5766
--- /dev/null
+++ b/project/templates/docs/parts/invoice_create_docs.html
@@ -0,0 +1,8 @@
+{% url 'docs_aktrabot_add_by_invoice' invoice_id=obj.pk as url_aktrabot_by_invoice %}
+{% url 'docs_nakladn_add_by_invoice' invoice_id=obj.pk as url_nakladn_by_invoice %}
+{% url 'docs_faktura_add_by_invoice' invoice_id=obj.pk as url_faktura_by_invoice %}
+
Акт по счёту
+
+
Накладную
+
+
Счёт-фактуру
diff --git a/project/templates/docs/platejka/list.html b/project/templates/docs/platejka/list.html
index b01ca47..6726ee1 100644
--- a/project/templates/docs/platejka/list.html
+++ b/project/templates/docs/platejka/list.html
@@ -33,6 +33,4 @@
{% block panel_copy %}
Копию плат. поручения
-
- {% block panel_copy_extra %}{% endblock %}
{% endblock %}