diff --git a/templates/c_admin/article/blog_form.html b/templates/c_admin/article/blog_form.html index d1630cfe..127b7c17 100644 --- a/templates/c_admin/article/blog_form.html +++ b/templates/c_admin/article/blog_form.html @@ -3,33 +3,35 @@ {% load i18n %} {# Displays article form #} - {% block scripts %} +{% block scripts %} + + {# selects #} + + + {# ajax #} + + + + + + + + + + + - - {# selects #} - - - - {# ajax #} - - - - - - - - - {% endblock %} +{% endblock %} {% block body %} {{ form.errors }} @@ -133,38 +135,9 @@ -
-
-

{% trans "Файлы" %}

-
-
- {% if article %} - {# button that shows modal window with file form #} - {% trans "Добавить файл" %} - {% else %} -

{% trans "Файлы можно добавлять только после введения основных данных" %}

- {% endif %} - {# this div shows list of files and refreshes when new file added #} -
- - - - - - - - - - - - {% include 'file_list.html' with files=files %} - -
{% trans "id" %}{% trans "Файл" %}{% trans "Имя" %}{% trans "Назначение" %}
-
+ {% include 'c_admin/includes/filegallery.html' with object=article model='article.Article' %} -
-
{% if form.draft %}
@@ -183,8 +156,6 @@
- -{% include 'c_admin/includes/file_form.html' with file_form=file_form object=article %} {% endblock %} diff --git a/templates/c_admin/file_list.html b/templates/c_admin/file_list.html deleted file mode 100644 index 3745ac81..00000000 --- a/templates/c_admin/file_list.html +++ /dev/null @@ -1,25 +0,0 @@ -{% load thumbnail %} -{% comment %} -Uses in ajax call - -Returns table with files properties - -{% endcomment %} - {% for file in files %} - - {{ file.id }} - - {% thumbnail file.file_path "100x100" crop="center" as im %} - - {% endthumbnail %} - - {{ file.file_name }} - {{ file.purpose }} - - - - - - {% endfor %} diff --git a/templates/c_admin/includes/file_form.html b/templates/c_admin/includes/file_form.html deleted file mode 100644 index 39c36877..00000000 --- a/templates/c_admin/includes/file_form.html +++ /dev/null @@ -1,49 +0,0 @@ -