Skip to content

Commit

Permalink
Update barplan template to improve display of shift dates and years
Browse files Browse the repository at this point in the history
  • Loading branch information
AndersSeverinsen committed Dec 22, 2024
1 parent a5596af commit f8c1cd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bartenders/templates/barplan.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2 id="barplan">{% translate "Barplan" %}</h2>
<tbody>
{% for shift in bartendershifts %}
<tr style="{% if shift|is_with_user:user %}background-color: skyblue;{% endif %}{% if shift|compare_to_current_week == -1 %}color:gray;{% endif %}">
<td class="col-md-2">{% if shift|compare_to_current_week == 0 %}<b alt="{% translate "This weeks friday" %}">{{ shift.display_str }} {% if show_all %} {{ shift.start_datetime.year }}{% endif %}{% else %} {{ shift.display_str }} {% if show_all %} {{ shift.start_datetime.year }}{% endif %}{% endif %}</td>
<td class="col-md-2">{% if shift|compare_to_current_week == 0 %}<b alt="{% translate "This weeks friday" %}">{{ shift.display_str }}{% if show_all_bartendershifts %}, {{ shift.start_datetime.year }}{% endif %}{% else %} {{ shift.display_str }}{% if show_all_bartendershifts %}, {{ shift.start_datetime.year }}{% endif %}{% endif %}</td>
<td class="col-md-3">{{ shift.responsible.name }}</td>
<td class="col-md-7">
{% for bartender in shift.other_bartenders.all %}
Expand Down Expand Up @@ -124,7 +124,7 @@ <h2 id="pantvagter">{% translate "Pantvagter" %}</h2>
<tbody>
{% for shift in boardmemberdepositshifts %}
<tr style="{% if shift|is_with_user:user %}background-color: skyblue;{% endif %}{% if shift|compare_to_current_week == -1 %}color:gray;{% endif %}">
<td class="col-md-2">{% if shift|compare_to_current_week == 0 %}<b alt="{% translate "Current week" %}">{{ shift.start_date | date:"d M" }}{% if show_all %} {{ shift.start_date.year }}{% endif %} - {{ shift.end_date | date:"d M" }}{% if show_all %} {{ shift.end_date.year }}{% endif %}</b>{% else %}{{ shift.start_date | date:"d M" }}{% if show_all %} {{ shift.start_date.year }}{% endif %} - {{ shift.end_date | date:"d M" }}{% if show_all %} {{ shift.end_date.year }}{% endif %}{% endif %}</td>
<td class="col-md-2">{% if shift|compare_to_current_week == 0 %}<b alt="{% translate "Current week" %}">{{ shift.start_date | date:"d M" }}{% if show_all_depositshifts %} {{ shift.start_date.year }}{% endif %} - {{ shift.end_date | date:"d M" }}{% if show_all_depositshifts %}, {{ shift.end_date.year }}{% endif %}</b>{% else %}{{ shift.start_date | date:"d M" }}{% if show_all_depositshifts %}, {{ shift.start_date.year }}{% endif %} - {{ shift.end_date | date:"d M" }}{% if show_all_depositshifts %}, {{ shift.end_date.year }}{% endif %}{% endif %}</td>
<td class="col-md-9">
{% for responsible in shift.responsibles.all %}
{% if responsible.first_deposit_shift == shift %}<b alt="{% translate "Bartender's first deposit shift" %}">{{ responsible.name }}</b>{% else %}{{ responsible.name }}{% endif %}{% if not forloop.last %},{% endif %}
Expand Down

0 comments on commit f8c1cd8

Please sign in to comment.