diff --git a/taskapp/locale/ru/LC_MESSAGES/django.po b/taskapp/locale/ru/LC_MESSAGES/django.po
index a20c0c0..45171c7 100644
--- a/taskapp/locale/ru/LC_MESSAGES/django.po
+++ b/taskapp/locale/ru/LC_MESSAGES/django.po
@@ -462,3 +462,12 @@ msgstr "Имя и количество комментов"
msgid "None"
msgstr "Нету"
+
+msgid "View empty tasks"
+msgstr "Задачи без получателей"
+
+msgid "Tasks in which no recipients"
+msgstr "Задачи, в которых нет получателей"
+
+msgid "Tasks in which was trouble while at runtime"
+msgstr "Задачи в которых возникли проблемы во время выполнения"
diff --git a/taskapp/templates/taskapp/ext.htm b/taskapp/templates/taskapp/ext.htm
index 04412ba..4df5e41 100644
--- a/taskapp/templates/taskapp/ext.htm
+++ b/taskapp/templates/taskapp/ext.htm
@@ -7,11 +7,13 @@
{% trans 'Tasks' %}
-
{% include 'message_block.html' %}
diff --git a/taskapp/templates/taskapp/footer_btns.html b/taskapp/templates/taskapp/footer_btns.html
index 5c4dfd3..a9ed49d 100644
--- a/taskapp/templates/taskapp/footer_btns.html
+++ b/taskapp/templates/taskapp/footer_btns.html
@@ -1,14 +1,16 @@
{% load i18n %}
-
diff --git a/taskapp/templates/taskapp/tasklist_empty.html b/taskapp/templates/taskapp/tasklist_empty.html
new file mode 100644
index 0000000..f5632e7
--- /dev/null
+++ b/taskapp/templates/taskapp/tasklist_empty.html
@@ -0,0 +1,91 @@
+{% extends request.is_ajax|yesno:'nullcont.htm,taskapp/ext.htm' %}
+{% load i18n %}
+
+{% block pagetitle %}
+ {% trans 'Tasks in which no recipients' %}
+{% endblock %}
+
+{% block content %}
+
+
+
+
+
+ | # |
+ {% trans 'Name' %} |
+ {% trans 'Address' %} |
+ {% trans 'The nature of the damage' %} |
+ {% trans 'Description' %} |
+ {% trans 'Task author' %} |
+ {% trans 'Date of create' %} |
+ {% trans 'Actions' %} |
+
+
+
+ {% with has_change_task=perms.taskapp.change_task %}
+ {% for task in tasks %}
+
+ {% if task.is_relevant %}
+
+ {% else %}
+ {% if task.priority == 'E' %}
+
+ {% elif task.priority == 'C' %}
+
+ {% elif task.priority == 'A' %}
+
+ {% else %}
+
+ {% endif %}
+ {% endif %}
+
+ | {{ task.pk }} |
+
+ {% if task.abon and task.abon.group %}
+ {{ task.abon.get_full_name }} |
+ {{ task.abon.group.title }}, {{ task.abon.street|default:_('Not assigned') }} {{ task.abon.house|default:_('Not assigned') }} |
+ {% else %}
+ {% trans 'User does not exist' %} |
+ --- |
+ {% endif %}
+
+ {{ task.get_mode_display }} |
+ {{ task.descr }} |
+
+ {% if task.author %}
+ {{ task.author.username }}
+ {% else %}
+ {% trans 'Not assigned' %}
+ {% endif %}
+ |
+ {{ task.time_of_create|date:'d E H:i' }} |
+
+
+ {% if has_change_task %}
+
+
+
+ {% endif %}
+ |
+
+ {% empty %}
+
+ | {% trans 'The list is empty' %} |
+
+ {% endfor %}
+ {% endwith %}
+
+
+
+ |
+ {% include 'taskapp/footer_btns.html' %}
+ |
+
+
+
+
+
+ {% include 'pagination.html' %}
+
+{% endblock %}
diff --git a/taskapp/templates/taskapp/tasklist_failed.html b/taskapp/templates/taskapp/tasklist_failed.html
index 004747d..75b8431 100644
--- a/taskapp/templates/taskapp/tasklist_failed.html
+++ b/taskapp/templates/taskapp/tasklist_failed.html
@@ -1,5 +1,10 @@
{% extends request.is_ajax|yesno:'nullcont.htm,taskapp/ext.htm' %}
{% load i18n %}
+
+{% block pagetitle %}
+ {% trans 'Tasks in which was trouble while at runtime' %}
+{% endblock %}
+
{% block content %}
diff --git a/taskapp/urls.py b/taskapp/urls.py
index 608cab5..5485e77 100644
--- a/taskapp/urls.py
+++ b/taskapp/urls.py
@@ -21,5 +21,6 @@ urlpatterns = [
url(r'^own$', views.OwnTaskListView.as_view(), name='own_tasks'),
url(r'^my$', views.MyTaskListView.as_view(), name='my_tasks'),
url(r'^all$', views.AllTasksListView.as_view(), name='all_tasks'),
+ url(r'^empty$', views.EmptyTasksListView.as_view(), name='empty_tasks'),
url(r'^check_news$', views.check_news, name='check_news')
]
diff --git a/taskapp/views.py b/taskapp/views.py
index 69111da..7d449a8 100644
--- a/taskapp/views.py
+++ b/taskapp/views.py
@@ -91,6 +91,13 @@ class AllTasksListView(BaseTaskListView):
.select_related('abon', 'abon__street', 'abon__group', 'author')
+class EmptyTasksListView(NewTasksView):
+ template_name = 'taskapp/tasklist_empty.html'
+
+ def get_queryset(self):
+ return Task.objects.annotate(reccount=Count('recipients')).filter(reccount__lt=1)
+
+
@login_required
@permission_required('taskapp.delete_task')
def task_delete(request, task_id):