Project

General

Profile

« Previous | Next » 

Revision a5a20700

Added by Benjamin Dauvergne over 12 years ago

factorize all agenda navigation code in an agenda/base.html template

View differences:

calebasse/agenda/templates/agenda/service-activity.html
1
{% extends "calebasse/base.html" %}
2
{% block extrascripts %}
3

  
4
<script>
5
$(function() {
6
    $('#agenda-date').datepicker({
7
        dateFormat: "DD d MM yy",
8
        onClose: function(dateText, inst) {
9
            console.log('close');
10
        }
11
    });
12
    $('#agenda-date').on('change', function () {
13
        var date = $(this).datepicker('getDate')
14
        var year = date.getFullYear();
15
        var month = date.getMonth() + 1;
16
        var day = date.getDate();
17
        window.location.href='../../' + year + '-' + month + '-' + day + '/activite-du-service';
18
    });
19
});
20
</script>
21
{% endblock %}
22

  
23
{% block title %}{{ block.super }} - Agenda {% endblock %}
24

  
25
{% block header %}
26
  {{ block.super }}
27
  <span>Agenda - {{ service_name }}</spam>
28
{% endblock %}
1
{% extends "agenda/base.html" %}
29 2

  
30 3
{% block appbar %}
31 4
<h2>Activité du service - {{ date|date:"DATE_FORMAT" }}</h2>
32 5
<a href="..">Retourner à l'agenda</a>
33
<button>Imprimer</button>
6
<button id='print-button'>Imprimer</button>
34 7
{% endblock %}
35 8

  
36
{% block content %}
37
<div id="datesel">
38
  <a href="../../{{ previous_month|date:"SHORT_DATE_FORMAT"}}/activite-du-service">««</a>
39
  <a href="../../{{ previous_day|date:"SHORT_DATE_FORMAT"}}/activite-du-service">«</a>
40
  <input id="agenda-date" value="{{ date|date:"DATE_FORMAT" }}"/>
41
  <a href="../../{{ next_day|date:"SHORT_DATE_FORMAT"}}/activite-du-service">»</a>
42
  <a href="../../{{ next_month|date:"SHORT_DATE_FORMAT"}}/activite-du-service">»»</a>
43
</div>
44

  
9
{% block agenda-content %}
45 10
<table class="main" id="activity">
46 11
  <thead>
47 12
    <tr> <th>Heure</th> <th>Durée</th> <th>Patient</th> <th>Thérapeute(s)</th> <th>Acte</th> </tr>

Also available in: Unified diff