manager: use bold for current day header in month view (#29431)
This commit is contained in:
parent
bce2afa53c
commit
9bb4a067f0
|
@ -94,6 +94,7 @@ a.timeperiod-exception-all {
|
|||
.agenda-table thead th {
|
||||
width: 14vw;
|
||||
padding-bottom: 1ex;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@for $i from 1 through 7 {
|
||||
|
@ -110,6 +111,7 @@ a.timeperiod-exception-all {
|
|||
padding: 1ex 2ex;
|
||||
vertical-align: top;
|
||||
width: 8ex;
|
||||
font-weight: normal;
|
||||
&.hour {
|
||||
width: 5%;
|
||||
text-align: left;
|
||||
|
@ -121,12 +123,15 @@ a.timeperiod-exception-all {
|
|||
&.weekday {
|
||||
width: 12.5%;
|
||||
padding-top: 3rem;
|
||||
&.today {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.agenda-table tbody tr:first-child th.weekday {
|
||||
// don't add extra padding on top row
|
||||
padding-top: 0;
|
||||
padding-top: 1ex;
|
||||
}
|
||||
|
||||
.agenda-table tbody tr.odd th.hour,
|
||||
|
|
|
@ -39,14 +39,14 @@
|
|||
<tr>
|
||||
<th></th>
|
||||
{% for day in week_days.days %}
|
||||
<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>
|
||||
<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>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for hour in week_days.periods %}
|
||||
<tr class="{% cycle 'odd' 'even' %}">
|
||||
<th class="hour">{{ hour|date:"TIME_FORMAT" }}</th>
|
||||
{% for day in week_days.days %}
|
||||
<td{% if day.other_month %} class="other-month"{% endif %}>
|
||||
<td class="{% if day.other_month %}other-month{% endif %} {% if day.today %}today{% endif %}">
|
||||
{% if forloop.parentloop.first %}
|
||||
{% for slot in day.infos.opening_hours %}
|
||||
<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>
|
||||
|
|
|
@ -386,6 +386,7 @@ class AgendaMonthView(AgendaDateView, MonthArchiveView):
|
|||
def get_day_timetable_infos(self, day, interval):
|
||||
period = current_date = day.replace(hour=self.min_timeperiod.hour, minute=0)
|
||||
timetable = {'date': current_date,
|
||||
'today': day.date() == datetime.date.today(),
|
||||
'other_month': day.month != self.date.month,
|
||||
'infos': {'opening_hours': [], 'booked_slots': []}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue