Revision fcfb4f5b
Added by Mikaël Ates almost 12 years ago
calebasse/agenda/templates/agenda/act-validation.html | ||
---|---|---|
16 | 16 |
{% endif %} |
17 | 17 |
{% endblock %} |
18 | 18 |
|
19 |
{% block beforecontent %} |
|
20 |
<div id="extra-top-links"> |
|
21 |
<a href="../jours-non-verouilles">Jours non vérouillés</a> |
|
22 |
</div> |
|
23 |
{% endblock %} |
|
24 |
|
|
19 | 25 |
{% block agenda-content %} |
20 | 26 |
{% if validation_msg %} |
21 | 27 |
<ul> |
calebasse/agenda/templates/agenda/days-not-locked.html | ||
---|---|---|
1 |
{% extends "agenda/base.html" %} |
|
2 |
{% load url from future %} |
|
3 |
|
|
4 |
{% block body-class %}{{ block.super }} no-left-column{% endblock %} |
|
5 |
|
|
6 |
{% block appbar %} |
|
7 |
<h2>Jours non vérouillés</h2> |
|
8 |
<a href="..">Retourner à l'agenda</a> |
|
9 |
{% endblock %} |
|
10 |
|
|
11 |
{% block content %} |
|
12 |
{% if days_not_locked %} |
|
13 |
<ul> |
|
14 |
{% for day in days_not_locked %} |
|
15 |
<li><a href="../../{{ day.year }}-{{ day.month }}-{{ day.day }}/validation-des-actes">{{ day.day }}/{{ day.month }}/{{ day.year }}</a></li> |
|
16 |
{% endfor %} |
|
17 |
</ul> |
|
18 |
{% endif %} |
|
19 |
{% endblock %} |
calebasse/agenda/urls.py | ||
---|---|---|
5 | 5 |
from views import (redirect_today, AgendaHomepageView, NewAppointmentView, |
6 | 6 |
NewEventView, AgendaServiceActivityView, UpdateAppointmentView, |
7 | 7 |
UpdateEventView, AgendaServiceActValidationView, AutomatedValidationView, |
8 |
UnlockAllView, AgendasTherapeutesView) |
|
8 |
UnlockAllView, AgendasTherapeutesView, JoursNonVerouillesView)
|
|
9 | 9 |
|
10 | 10 |
agenda_patterns = patterns('', |
11 | 11 |
url(r'^$', |
... | ... | |
46 | 46 |
AgendasTherapeutesView.as_view( |
47 | 47 |
template_name='agenda/agendas-therapeutes.html'), |
48 | 48 |
name='agendas-therapeutes'), |
49 |
url(r'^jours-non-verouilles/$', |
|
50 |
JoursNonVerouillesView.as_view( |
|
51 |
template_name='agenda/days-not-locked.html'), |
|
52 |
name='days-not-locked'), |
|
49 | 53 |
) |
50 | 54 |
|
51 | 55 |
urlpatterns = patterns('', |
calebasse/agenda/views.py | ||
---|---|---|
17 | 17 |
from calebasse.actes.validation_states import VALIDATION_STATES |
18 | 18 |
from calebasse.actes.models import Act, ValidationMessage |
19 | 19 |
from calebasse.actes.validation import (automated_validation, |
20 |
unlock_all_acts_of_the_day) |
|
20 |
unlock_all_acts_of_the_day, are_all_acts_of_the_day_locked)
|
|
21 | 21 |
from calebasse import cbv |
22 | 22 |
|
23 | 23 |
from forms import (NewAppointmentForm, NewEventForm, |
... | ... | |
309 | 309 |
|
310 | 310 |
return context |
311 | 311 |
|
312 |
class JoursNonVerouillesView(TemplateView): |
|
312 | 313 |
|
314 |
template_name = 'agenda/days-not-locked.html' |
|
315 |
|
|
316 |
def get_context_data(self, **kwargs): |
|
317 |
context = super(JoursNonVerouillesView, self).get_context_data(**kwargs) |
|
318 |
acts = EventAct.objects.filter(is_billed=False, |
|
319 |
patient__service=self.service).order_by('date') |
|
320 |
days_not_locked = [] |
|
321 |
for act in acts: |
|
322 |
current_day = datetime.datetime(act.date.year, act.date.month, act.date.day) |
|
323 |
if not current_day in days_not_locked: |
|
324 |
locked = are_all_acts_of_the_day_locked(current_day, self.service) |
|
325 |
if not locked: |
|
326 |
days_not_locked.append(current_day) |
|
327 |
context['days_not_locked'] = days_not_locked |
|
328 |
return context |
calebasse/facturation/templates/facturation/index.html | ||
---|---|---|
4 | 4 |
{% block appbar %} |
5 | 5 |
<h2>{% if service_name == "CMPP" %}Facturation{% else %}Décompte{% endif %}</h2> |
6 | 6 |
<a href="../..">Retourner à l'accueil</a> |
7 |
<button id="new-dossier">Jours non verrouillés</button> |
|
8 | 7 |
{% endblock %} |
9 | 8 |
|
10 | 9 |
{% block content %} |
Also available in: Unified diff
Add a dedicated page for days not locked (#2034).