Projet

Général

Profil

« Précédent | Suivant » 

Révision 5e2377b1

Ajouté par Serghei Mihai il y a presque 10 ans

agenda: do not show events and schedules from other services, display
notification instead

Closes #5023

Voir les différences:

calebasse/agenda/templates/agenda/agendas-therapeutes.html
34 34
            {% for appointment in worker_agenda.appointments %}
35 35
            <tr data-event-id="{{ appointment.event_id }}">
36 36
                <td class="col-time">{{ appointment.begin_hour }}</td>
37
                {% if not CURRENT_SERVICE_EVENTS_ONLY and not appointment.holiday and appointment.type != 'info' and appointment.other_services_names  %}
38
                <td colspan=8 class="col-record-id">
39
                  {% if appointment.event %}Evenement{% else %}Rendez-vous{% endif %}
40
                  {% with services=appointment.other_services_names|length %}
41
                  dans le{{ services|pluralize }} service{{ services|pluralize }}
42
                  {% endwith %}
43
                  {% for service in appointment.other_services_names %}
44
                  {{ service|upper }}{% if not forloop.last %}, {% endif %}
45
                  {% endfor %}
46
                </td>
47
                {% else %}
37 48
                <td class="col-duration">{% if appointment.length %}{{ appointment.length }}min{% endif %}</td>
38 49
                <td class="col-record-id">
39 50
                    {% if appointment.patient_record_id %}
......
58 69
                    {% endfor %}
59 70
                    {% endif %}
60 71
                </td>
72
                {% endif %}
61 73
            </tr>
62 74
            {% endfor %}
63 75
        </tbody>
calebasse/agenda/views.py
489 489
                        'patient__service',
490 490
                        'act_set__actvalidationstate_set',
491 491
                        'exceptions', 'participants')
492

  
493
        context['CURRENT_SERVICE_EVENTS_ONLY'] = settings.CURRENT_SERVICE_EVENTS_ONLY
494

  
492 495
        events = [ e.today_occurrence(self.date) for e in events ] \
493 496
             + [ e.today_occurrence(self.date) for e in eventswithact ]
494 497
        for e in events:
calebasse/settings.py
292 292
# Invoicing file saving directory
293 293
INVOICING_DIRECTORY = None
294 294

  
295
# display events only for current service
296
CURRENT_SERVICE_EVENTS_ONLY = True
297

  
295 298
#CSV_ENCODING = 'cp1252' #For windows : windows-1252/Winlatin1
296 299
#CSVPROFILE = {\
297 300
#    'delimiter' : ';',

Formats disponibles : Unified diff