summaryrefslogtreecommitdiffstats
path: root/templates/calendar.html
blob: 70d3ecf0a0e3e45d6ca41445caa3bedcb08c8dd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{% extends "base.html" %}

{% block title %}
	CUCC expedition calendar:
	{% if expedition %}
		{{ expedition.year }}
    {% else %}
    	choose a year
    {% endif %}
{% endblock %}

{% block head %}
<style type="text/css"> 
<!--
.no                     { background: #7f96e8; width: 80pt; font-size: 10pt }
.yes                    { background: #ff6666; width: 80pt; font-size: 10pt }
.name                    { background: #999; width: 80pt; text-align:right; font-size: 10pt }
.date                    { background: #999; width: 80pt; text-align:right; font-size: 10pt }
--> 
</style>

{% endblock %}

{% block content %}
	{% if expedition %}
    	<table>
        	<tr><td />
            	{% for date in expedition.ListDays %}               	
        	        {% ifchanged date.month %}
    	                <td class="date">{{ date|date:"F" }}</td>
                    {% else %}
                    	<td class="date"></td>
	                {% endifchanged %}            
                {% endfor %}                    
        	</tr>
            <tr><td />
            	{% for date in expedition.ListDays %}               	
					<td class="date">{{ date|date:"D" }}</td>
                {% endfor %}
            </tr>
        	<tr><td />
            	{% for date in expedition.ListDays %}               	
					<td class="date">{{ date|date:"d" }}</td>
                {% endfor %}
            </tr>

    		{% for personexpedition in expedition.personexpedition_set.all %}
            	<tr>
                      <td class="name">
                          {{ personexpedition.person }}
                      </td>
                      {% for dateTF in personexpedition.ListDaysTF %}
                      		<td {{ dateTF|yesno:"class='yes',class='no'"|safe }}></td>
                      {% empty %}
                      		<td colspan="{{ expedition.ListDays|length }}"><center>No data.</center></td>
                      {% endfor %}

                    
                 </tr>
            {% endfor %}
	    </table>
    {% endif %}
{% endblock %}