Improved calendar month view
This commit is contained in:
parent
a24386c45e
commit
ba3ed04b44
4 changed files with 30 additions and 2 deletions
|
|
@ -40,8 +40,9 @@
|
|||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li><a href="/p/most_recent/">{{ T('show-all') }}</a></li>
|
||||
<li class="nl-next"><a href="/p/most_recent/">{{ T('show-all') }}</a></li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,20 @@
|
|||
<p class="nl-placeholder">{{ T('notes-month-empty') }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% set past_year = advance_calendar(d, -2) %}
|
||||
{% set past_month = advance_calendar(d, -1) %}
|
||||
{% set next_month = advance_calendar(d, 1) %}
|
||||
{% set next_year = advance_calendar(d, 2) %}
|
||||
<div class="calendar-navigation">
|
||||
<ul class="inline">
|
||||
<li>« <a href="/calendar/{{ past_year.year }}/{{ past_year.month }}">{{ past_year.strftime("%B %Y") }}</a></li>
|
||||
<li><a href="/calendar/{{ past_month.year }}/{{ past_month.month }}">{{ past_month.strftime("%B %Y") }}</a></li>
|
||||
<li><strong>{{ d.strftime("%B %Y") }}</strong></li>
|
||||
<li><a href="/calendar/{{ next_month.year }}/{{ next_month.month }}">{{ next_month.strftime("%B %Y") }}</a></li>
|
||||
<li><a href="/calendar/{{ next_year.year }}/{{ next_year.month }}">{{ next_year.strftime("%B %Y") }}</a> »</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p>{{ T('back-to') }} <a href="/calendar">{{ T('calendar') }}</a></p>
|
||||
</article>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue