0001-manager-use-bold-for-current-day-header-in-month-vie.patch
chrono/manager/static/css/style.scss | ||
---|---|---|
94 | 94 |
.agenda-table thead th { |
95 | 95 |
width: 14vw; |
96 | 96 |
padding-bottom: 1ex; |
97 |
font-weight: normal; |
|
97 | 98 |
} |
98 | 99 | |
99 | 100 |
@for $i from 1 through 7 { |
... | ... | |
110 | 111 |
padding: 1ex 2ex; |
111 | 112 |
vertical-align: top; |
112 | 113 |
width: 8ex; |
114 |
font-weight: normal; |
|
113 | 115 |
&.hour { |
114 | 116 |
width: 5%; |
115 | 117 |
text-align: left; |
... | ... | |
121 | 123 |
&.weekday { |
122 | 124 |
width: 12.5%; |
123 | 125 |
padding-top: 3rem; |
126 |
&.today { |
|
127 |
font-weight: bold; |
|
128 |
} |
|
124 | 129 |
} |
125 | 130 |
} |
126 | 131 | |
127 | 132 |
.agenda-table tbody tr:first-child th.weekday { |
128 | 133 |
// don't add extra padding on top row |
129 |
padding-top: 0;
|
|
134 |
padding-top: 1ex;
|
|
130 | 135 |
} |
131 | 136 | |
132 | 137 |
.agenda-table tbody tr.odd th.hour, |
chrono/manager/templates/chrono/manager_agenda_month_view.html | ||
---|---|---|
39 | 39 |
<tr> |
40 | 40 |
<th></th> |
41 | 41 |
{% for day in week_days.days %} |
42 |
<th class="weekday{% if day.date.day == view.date.day %} current-day{% endif %}">{% if not day.other_month %}<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.id year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"d" %}">{{ day.date|date:"l j" }}</a>{% endif %}</th>
|
|
42 |
<th class="weekday {% if day.today %}today{% endif %}">{% if not day.other_month %}<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.id year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"d" %}">{{ day.date|date:"l j" }}</a>{% endif %}</th>
|
|
43 | 43 |
{% endfor %} |
44 | 44 |
</tr> |
45 | 45 |
{% for hour in week_days.periods %} |
46 | 46 |
<tr class="{% cycle 'odd' 'even' %}"> |
47 | 47 |
<th class="hour">{{ hour|date:"TIME_FORMAT" }}</th> |
48 | 48 |
{% for day in week_days.days %} |
49 |
<td{% if day.other_month %} class="other-month"{% endif %}>
|
|
49 |
<td class="{% if day.other_month %}other-month{% endif %} {% if day.today %}today{% endif %}">
|
|
50 | 50 |
{% if forloop.parentloop.first %} |
51 | 51 |
{% for slot in day.infos.opening_hours %} |
52 | 52 |
<div class="opening-hours" style="height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;left:{{ slot.css_left|stringformat:".1f" }}%;"></div> |
chrono/manager/views.py | ||
---|---|---|
386 | 386 |
def get_day_timetable_infos(self, day, interval): |
387 | 387 |
period = current_date = day.replace(hour=self.min_timeperiod.hour, minute=0) |
388 | 388 |
timetable = {'date': current_date, |
389 |
'today': day.day == datetime.date.today().day, |
|
389 | 390 |
'other_month': day.month != self.date.month, |
390 | 391 |
'infos': {'opening_hours': [], 'booked_slots': []}} |
391 | 392 | |
392 |
- |