78 changed files with 508 additions and 341 deletions
-
1.gitignore
-
14abonapp/urls.py
-
27abonapp/urls_abon.py
-
30abonapp/views.py
-
5accounts_app/apps.py
-
12accounts_app/forms.py
-
22accounts_app/urls.py
-
36accounts_app/views.py
-
10clientsideapp/urls.py
-
2clientsideapp/views.py
-
10devapp/urls.py
-
4devapp/views.py
-
8djing/settings_example.py
-
20djing/urls.py
-
4djing/views.py
-
12ip_pool/urls.py
-
6ip_pool/views.py
-
2mydefs.py
-
6privatemessage/urls.py
-
2privatemessage/views.py
-
2searchapp/urls.py
-
2statistics/urls.py
-
8tariff_app/urls.py
-
4tariff_app/views.py
-
1taskapp/admin.py
-
28taskapp/models.py
-
13taskapp/urls.py
-
26taskapp/views.py
-
2templates/abonapp/abonamount.html
-
8templates/abonapp/activate_service.html
-
6templates/abonapp/addAbon.html
-
4templates/abonapp/addGroup.html
-
10templates/abonapp/addInvoice.html
-
10templates/abonapp/buy_tariff.html
-
10templates/abonapp/complete_service.html
-
6templates/abonapp/debtors.html
-
2templates/abonapp/editAbon.html
-
14templates/abonapp/ext.htm
-
12templates/abonapp/group_list.html
-
4templates/abonapp/invoiceForPayment.html
-
6templates/abonapp/log.html
-
4templates/abonapp/payHistory.html
-
20templates/abonapp/peoples.html
-
16templates/abonapp/services.html
-
11templates/accounts/acc_list.html
-
4templates/accounts/create_acc.html
-
10templates/accounts/ext.htm
-
6templates/accounts/group.html
-
4templates/accounts/group_list.html
-
2templates/accounts/login.html
-
2templates/accounts/profile_chgroup.html
-
2templates/accounts/settings/ch_info.html
-
14templates/accounts/settings/ext.htm
-
21templates/accounts/settings/permissions.html
-
38templates/base.html
-
8templates/base_without_left.html
-
4templates/clientsideapp/debt_buy.html
-
2templates/clientsideapp/debts.html
-
20templates/clientsideapp/ext.html
-
4templates/devapp/dev.html
-
8templates/devapp/devices.html
-
6templates/devapp/ext.htm
-
4templates/ip_pool/add_pool.html
-
8templates/ip_pool/index.html
-
8templates/ip_pool/ips.html
-
4templates/private_messages/item.html
-
2templates/private_messages/send_form.html
-
4templates/searchapp/index.html
-
4templates/tariff_app/editTarif.html
-
18templates/tariff_app/tarifs.html
-
6templates/taskapp/add_edit_task.html
-
10templates/taskapp/ext.htm
-
8templates/taskapp/footer_btns.html
-
18templates/taskapp/tasklist.html
-
28templates/taskapp/tasklist_active.html
-
86templates/taskapp/tasklist_all.html
-
12templates/taskapp/tasklist_finish.html
-
12templates/taskapp/tasklist_own.html
@ -0,0 +1,5 @@ |
|||||
|
from django.apps import AppConfig |
||||
|
|
||||
|
|
||||
|
class AccountsAppConfig(AppConfig): |
||||
|
name = 'acc_app' |
||||
@ -0,0 +1,12 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
from django import forms |
||||
|
from models import UserProfile |
||||
|
|
||||
|
|
||||
|
class SetupPerms(forms.ModelForm): |
||||
|
class Meta: |
||||
|
model = UserProfile |
||||
|
fields = ['user_permissions'] |
||||
|
widgets = { |
||||
|
'user_permissions': forms.CheckboxSelectMultiple() |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
{% extends request.is_ajax|yesno:'nullcont.htm,accounts/settings/ext.htm' %} |
||||
|
{% block content %} |
||||
|
|
||||
|
{% if warntext %} |
||||
|
<div class="alert alert-warning alert-dismissable"> |
||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
||||
|
{{ warntext }} |
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
<form role="form" action="{% url 'acc_app:setup_perms' uid %}" method="post">{% csrf_token %} |
||||
|
{% for perm, pname in form.user_permissions.field.choices %} |
||||
|
<div class="checkbox"> |
||||
|
<label> |
||||
|
<input type="checkbox"> |
||||
|
{{ pname }} |
||||
|
</label> |
||||
|
</div> |
||||
|
{% endfor %} |
||||
|
</form> |
||||
|
{% endblock %} |
||||
@ -1,7 +1,7 @@ |
|||||
<tr{% if not msg.is_viewed %} class="green"{% endif %}> |
<tr{% if not msg.is_viewed %} class="green"{% endif %}> |
||||
<td><input type="checkbox" id="c{{ msg.id }}"><label for="c{{ msg.id }}" class="checkbox"></label></td> |
<td><input type="checkbox" id="c{{ msg.id }}"><label for="c{{ msg.id }}" class="checkbox"></label></td> |
||||
<td>{{ msg.text }}</td> |
<td>{{ msg.text }}</td> |
||||
<td><a href="{% url 'other_profile' msg.sender.id %}">{{ msg.sender.get_full_name }}</a></td> |
|
||||
|
<td><a href="{% url 'acc_app:other_profile' msg.sender.id %}">{{ msg.sender.get_full_name }}</a></td> |
||||
<td>{{ msg.date_send }}</td> |
<td>{{ msg.date_send }}</td> |
||||
<td><a href="{% url 'privmsg_delitem' msg.id %}" class="btn btn-blue jsdel"><i class="icon-trash"></i></a></td> |
|
||||
|
<td><a href="{% url 'privmsg:delitem' msg.id %}" class="btn btn-blue jsdel"><i class="icon-trash"></i></a></td> |
||||
</tr> |
</tr> |
||||
@ -0,0 +1,8 @@ |
|||||
|
<a href="{% url 'taskapp:add' %}" class="btn btn-sm btn-success" title="Создать новую задачу"> |
||||
|
<span class="glyphicon glyphicon-plus"></span> Добавить задачу |
||||
|
</a> |
||||
|
{% if perms.taskapp.can_viewall %} |
||||
|
<a href="{% url 'taskapp:all_tasks' %}" class="btn btn-sm btn-info"> |
||||
|
<span class="glyphicon glyphicon-baby-formula"></span> Просмотреть все задачи |
||||
|
</a> |
||||
|
{% endif %} |
||||
@ -0,0 +1,86 @@ |
|||||
|
{% extends request.is_ajax|yesno:'bajax.html,base.html' %} |
||||
|
{% block main %} |
||||
|
|
||||
|
<ol class="breadcrumb"> |
||||
|
<li><span class="glyphicon glyphicon-home"></span></li> |
||||
|
<li><a href="{% url 'taskapp:home' %}">Задачи</a></li> |
||||
|
<li class="active">Все задачи</li> |
||||
|
</ol> |
||||
|
|
||||
|
{% if warntext %} |
||||
|
<div class="alert alert-danger alert-dismissable"> |
||||
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
||||
|
<strong>Важно!</strong> {{ warntext }} |
||||
|
</div> |
||||
|
{% endif %} |
||||
|
|
||||
|
<div class="page-header"> |
||||
|
<h2>Лог всех задач в системе</h2> |
||||
|
</div> |
||||
|
|
||||
|
<div class="table-responsive"> |
||||
|
<table class="table table-striped table-bordered"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th>#</th> |
||||
|
<th class="col-sm-2">Пару слов..</th> |
||||
|
<th class="col-sm-1">Кому назначена</th> |
||||
|
<th class="col-sm-1">Кто назначил</th> |
||||
|
<th class="col-sm-1">Характер поломки</th> |
||||
|
<th class="col-sm-1">Состояние</th> |
||||
|
<th class="col-sm-1">Приоритет</th> |
||||
|
<th class="col-sm-1">Устройство</th> |
||||
|
<th class="col-sm-1">Дата создания</th> |
||||
|
<th class="col-sm-1">Приложение</th> |
||||
|
<th class="col-sm-2" colspan="3">Действия</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
{% for task in tasks %} |
||||
|
|
||||
|
{% if task.priority == 'E' %} |
||||
|
<tr class="success"> |
||||
|
{% elif task.priority == 'C' %} |
||||
|
<tr> |
||||
|
{% elif task.priority == 'A' %} |
||||
|
<tr class="danger"> |
||||
|
{% else %} |
||||
|
<tr>{% endif %} |
||||
|
|
||||
|
<td>{{ task.id }}</td> |
||||
|
<td>{{ task.descr }}</td> |
||||
|
<td><a href="{% url 'acc_app:other_profile' task.recipient.id %}" title="{{ task.recipient.get_full_name }}">{{ task.recipient.username }}</a></td> |
||||
|
<td><a href="{% url 'acc_app:other_profile' task.author.id %}" title="{{ task.author.get_full_name }}">{{ task.author.username }}</a></td> |
||||
|
<td>{{ task.get_mode_display }}</td> |
||||
|
<td>{{ task.get_state_display }}</td> |
||||
|
<td>{{ task.get_priority_display }}</td> |
||||
|
<td><a href="{% url 'devapp:view' task.device.id %}" target="_blank">{{ task.device.ip_address }}</a></td> |
||||
|
<td>{{ task.time_of_create|date:'d N yг H:i:s' }}</td> |
||||
|
<td>{% if task.attachment %}<a href="{{ task.attachment.url }}" target="_blank">{{ task.attachment.name }}</a>{% else %}―{% endif %}</td> |
||||
|
<td colspan="3" class="btn-group btn-group-justified"> |
||||
|
{% if perms.taskapp.can_change_task %} |
||||
|
<a href="{% url 'taskapp:edit' task.id %}" class="btn btn-default btn-sm" title="Редактировать"> |
||||
|
<span class="glyphicon glyphicon-edit"></span> |
||||
|
</a> |
||||
|
{% endif %} |
||||
|
</td> |
||||
|
</tr> |
||||
|
{% empty %} |
||||
|
<tr> |
||||
|
<td colspan="13">Список пуст</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</tbody> |
||||
|
<tfoot> |
||||
|
<tr> |
||||
|
<td colspan="13"> |
||||
|
{% include 'taskapp/footer_btns.html' %} |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tfoot> |
||||
|
</table> |
||||
|
</div> |
||||
|
|
||||
|
{% include 'toolbar_page.html' with pag=tasks %} |
||||
|
|
||||
|
{% endblock %} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue