35 changed files with 472 additions and 269 deletions
-
169abonapp/models.py
-
2abonapp/urls.py
-
5abonapp/urls_abon.py
-
99abonapp/views.py
-
4accounts_app/views.py
-
28agent/main.py
-
13agent/models.py
-
5agent/sslTransmitter.py
-
24clientsideapp/views.py
-
10djing/settings_example.py
-
2djing/views.py
-
18global_context_processors.py
-
8mydefs.py
-
2privatemessage/models.py
-
1tariff_app/forms.py
-
1tariff_app/models.py
-
2tariff_app/views.py
-
2taskapp/models.py
-
1taskapp/urls.py
-
10taskapp/views.py
-
36templates/abonapp/activate_service.html
-
2templates/abonapp/buy_tariff.html
-
16templates/abonapp/complete_service.html
-
48templates/abonapp/debtors.html
-
3templates/abonapp/ext.htm
-
3templates/abonapp/group_list.html
-
27templates/abonapp/services.html
-
2templates/accounts/index.html
-
8templates/base.html
-
85templates/clientsideapp/buy.html
-
15templates/clientsideapp/ext.html
-
12templates/clientsideapp/pays.html
-
8templates/tariff_app/editTarif.html
-
7templates/taskapp/ext.htm
-
63templates/taskapp/tasklist_own.html
@ -0,0 +1,18 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
from abonapp.models import Abon |
||||
|
from django.shortcuts import get_object_or_404 |
||||
|
|
||||
|
|
||||
|
def context_processor_client_ipaddress(request): |
||||
|
ip = request.META.get('REMOTE_ADDR', '') or request.META.get('HTTP_X_FORWARDED_FOR', '') |
||||
|
return { |
||||
|
'client_ipaddress': ip |
||||
|
} |
||||
|
|
||||
|
|
||||
|
# От сюда можно получать на клиентской стороне профиль абонента |
||||
|
def context_processor_additional_profile(request): |
||||
|
if request.user.is_staff or request.user.is_anonymous(): |
||||
|
return {'subscriber': request.user} |
||||
|
else: |
||||
|
return {'subscriber': get_object_or_404(Abon, id=request.user.id)} |
||||
@ -0,0 +1,36 @@ |
|||||
|
{% 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 'abongroup_list_link' %}">Группы абонентов</a></li> |
||||
|
<li><a href="{% url 'people_list_link' abon_group.id %}">{{ abon_group.title }}</a></li> |
||||
|
<li><a href="{% url 'abonhome_link' abon_group.id abon.id %}">{{ abon.fio }}</a></li> |
||||
|
<li class="active">Активировать услугу</li> |
||||
|
</ol> |
||||
|
|
||||
|
|
||||
|
<div class="panel panel-default"> |
||||
|
<div class="panel-heading"> |
||||
|
<h3 class="panel-title">Активировать услугу</h3> |
||||
|
</div> |
||||
|
<div class="panel-body"> |
||||
|
{% if warntext %} |
||||
|
<div class="alert-danger">{{ warntext }}</div> |
||||
|
{% endif %} |
||||
|
<form role="form" action="{% url 'abonapp_activate_service' abon_group.id abon.id abtar.id %}" method="post">{% csrf_token %} |
||||
|
<input name="finish_confirm" value="yes" type="hidden"> |
||||
|
|
||||
|
<p>Вы уверены что хотите активировать абоненту эту услугу?<br> |
||||
|
Обратите внимание что с его счёта <b>снимутся деньги</b> и откроется доступ к ресурсам оплаченной услуги.<br> |
||||
|
Стоимость услуги: {{ amount }}руб. На счету {{ abon.ballance }} руб, останется {{ diff }} руб.</p> |
||||
|
|
||||
|
<button type="submit" class="btn btn-sm btn-primary"> |
||||
|
<span class="glyphicon glyphicon-save"></span> Подтвердить |
||||
|
</button> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
{% endblock %} |
||||
@ -0,0 +1,48 @@ |
|||||
|
{% extends 'base.html' %} |
||||
|
{% block main %} |
||||
|
|
||||
|
|
||||
|
<ol class="breadcrumb"> |
||||
|
<li><span class="glyphicon glyphicon-home"></span></li> |
||||
|
<li><a href="{% url 'abongroup_list_link' %}">Группы абонентов</a></li> |
||||
|
<li class="active">Должники</li> |
||||
|
</ol> |
||||
|
|
||||
|
|
||||
|
<h3>Народ, у которого есть неоплаченные услуги</h3> |
||||
|
<div class="table-responsive"> |
||||
|
<table class="table table-striped table-bordered"> |
||||
|
<thead> |
||||
|
<tr> |
||||
|
<th width="15">#</th> |
||||
|
<th>Абонент</th> |
||||
|
<th>Цена</th> |
||||
|
<th>Комментарий</th> |
||||
|
<th>Дата создания</th> |
||||
|
<th>Автор</th> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
{% for invoice in invoices %} |
||||
|
<tr> |
||||
|
<td>{{ invoice.id }}</td> |
||||
|
<td><a href="{% url 'abonhome_link' invoice.abon.group.id invoice.abon.id %}" target="_blank">{{ invoice.abon.username }}</a></td> |
||||
|
<td>{{ invoice.amount }}</td> |
||||
|
<td>{{ invoice.comment}}</td> |
||||
|
<td>{{ invoice.date_create|date:'d b H:i' }}</td> |
||||
|
<td><a href="{% url 'other_profile' invoice.author.id %}" target="_blank">{{ invoice.author.username }}</a></td> |
||||
|
</tr> |
||||
|
{% empty %} |
||||
|
<tr> |
||||
|
<td colspan="7"> |
||||
|
Нет должников |
||||
|
</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</tbody> |
||||
|
</table> |
||||
|
</div> |
||||
|
|
||||
|
{% include 'toolbar_page.html' with pag=peoples %} |
||||
|
|
||||
|
{% endblock %} |
||||
@ -0,0 +1,63 @@ |
|||||
|
{% extends request.is_ajax|yesno:'nullcont.htm,taskapp/ext.htm' %} |
||||
|
{% block content %} |
||||
|
|
||||
|
<div class="table-responsive"> |
||||
|
<table class="table table-striped table-bordered"> |
||||
|
<thead> |
||||
|
<tr><th>#</th> |
||||
|
<th class="col-sm-6">Пару слов..</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> |
||||
|
</tr> |
||||
|
</thead> |
||||
|
<tbody> |
||||
|
{% for task in tasks %} |
||||
|
|
||||
|
{% if task.priority == 'E' %}<tr class="danger"> |
||||
|
{% elif task.priority == 'D' %}<tr class="warning"> |
||||
|
{% elif task.priority == 'C' %}<tr class="info"> |
||||
|
{% elif task.priority == 'B' %}<tr> |
||||
|
{% elif task.priority == 'A' %}<tr class="success"> |
||||
|
{% else %}<tr>{% endif %} |
||||
|
|
||||
|
<td>{{ task.id }}</td> |
||||
|
<td>{{ task.descr }}</td> |
||||
|
<td><a href="{% url 'other_profile' task.recipient.id %}" title="{{ task.recipient.get_full_name }}">{{ task.recipient.username }}</a></td> |
||||
|
<td>{{ task.get_state_display }}</td> |
||||
|
<td>{{ task.get_priority_display }}</td> |
||||
|
<td>{{ task.out_date|date:'d N yг' }}</td> |
||||
|
<td>{{ task.time_of_create|date:'d N yг H:i:s' }}</td> |
||||
|
<td class="btn-group"> |
||||
|
<a href="{% url 'task_edit' task.id %}" class="btn btn-sm btn-default" title="Редактировать"> |
||||
|
<span class="glyphicon glyphicon-edit"></span> |
||||
|
</a> |
||||
|
<a href="#" class="btn btn-sm btn-danger disabled" title="Удалить"> |
||||
|
<span class="glyphicon glyphicon-remove-circle"></span> |
||||
|
</a> |
||||
|
</td> |
||||
|
</tr> |
||||
|
{% empty %} |
||||
|
<tr> |
||||
|
<td colspan="8">Все ваши задачи выполнены</td> |
||||
|
</tr> |
||||
|
{% endfor %} |
||||
|
</tbody> |
||||
|
<tfoot> |
||||
|
<tr> |
||||
|
<td colspan="8"> |
||||
|
<a href="{% url 'task_add' %}" class="btn btn-sm btn-success" title="Создать новую задачу"> |
||||
|
<span class="glyphicon glyphicon-plus"></span> |
||||
|
</a> |
||||
|
</td> |
||||
|
</tr> |
||||
|
</tfoot> |
||||
|
</table> |
||||
|
</div> |
||||
|
|
||||
|
{% include 'toolbar_page.html' with pag=tasks %} |
||||
|
|
||||
|
{% endblock %} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue