calendar-social/calsocial/templates/month-view.html

70 lines
2.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<table class="calendar">
<thead>
<tr class="sizer">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="month">
<td>
<a href="{{ url_for('hello', date=calendar.prev_year.timestamp()) }}">« {{ calendar.prev_year_year }}</a>
</td>
<td>
<a href="{{ url_for('hello', date=calendar.prev_month.timestamp()) }}"> {{ calendar.prev_month_name }}</a>
</td>
<td colspan="3" class="month-name">
{% if not calendar.has_today %}
<a href="{{ url_for('hello', date=now_ts) }}">
{% endif %}
{{ calendar.month }}
{% if not calendar.has_today %}
</a>
{% endif %}
</td>
<td>
<a href="{{ url_for('hello', date=calendar.next_month.timestamp()) }}">{{ calendar.next_month_name }} </a>
</td>
<td>
<a href="{{ url_for('hello', date=calendar.next_year.timestamp()) }}">{{ calendar.next_year_year }} »</a>
</td>
</tr>
<tr class="days">
{% for day in calendar.day_names %}
<td>
{{ day }}
</td>
{% endfor %}
</tr>
</thead>
<tbody>
{% set markers = namespace() -%}
{% set markers.first = true -%}
{% for day in calendar.days -%}
{% if loop.index0 % (calendar.day_names) | length == 0 -%}
{% if not markers.first %}
</tr>
{%- else %}
{%- set markers.first = false %}
{%- endif %}
<tr class="week">
{%- endif %}
<td class="{% if day.month != calendar.timestamp.month %} other-month{% endif %}{% if day.date() == now.date() %} today{% endif %}">
<span class="day-num">{{ day.day }}</span>
{% for event in calendar.day_events(day, user=current_user if user_only else none) %}
<a href="{{ url_for('event_details', event_uuid=event.event_uuid) }}" class="event">
{% if not event.all_day %}
{{ event.start_time_for_user(current_user).strftime('%H:%M') }}{{ event.end_time_for_user(current_user).strftime('%H:%M') }}
{% endif %}
{{ event.title }}
</a>
{% endfor %}
</td>
{% endfor %}
</tr>
</tbody>
</table>