manager: move settings and print buttons to kebab menu (#75013)
gitea/chrono/pipeline/head This commit looks good
Details
gitea/chrono/pipeline/head This commit looks good
Details
This commit is contained in:
parent
e10a80dcce
commit
a1c3bd7974
|
@ -5,13 +5,15 @@
|
|||
{% block navigation %}{% endblock %}
|
||||
|
||||
<span class="actions">
|
||||
{% block actions %}
|
||||
<a class="extra-actions-menu-opener"></a>
|
||||
<ul class="extra-actions-menu">
|
||||
{% if user_can_manage %}
|
||||
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
|
||||
<li><a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a></li>
|
||||
{% endif %}
|
||||
<a href="" onclick="window.print()">{% trans 'Print' %}</a>
|
||||
{% block agenda-extra-menu-actions %}{% endblock %}
|
||||
<li><a href="" onclick="window.print()">{% trans 'Print' %}</a></li>
|
||||
</ul>
|
||||
|
||||
{% include "chrono/manager_agenda_view_buttons_fragment.html" with active=kind %}
|
||||
{% endblock %}
|
||||
{% include "chrono/manager_agenda_view_buttons_fragment.html" with active=kind %}
|
||||
</span>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
{% extends "chrono/manager_agenda_day_view.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block actions %}
|
||||
<a class="extra-actions-menu-opener"></a>
|
||||
<ul class="extra-actions-menu">
|
||||
<li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
|
||||
{% if agenda.subscriptions.exists %}
|
||||
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{{ block.super }}
|
||||
{% block agenda-extra-menu-actions %}
|
||||
<li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
|
||||
{% if agenda.subscriptions.exists %}
|
||||
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
{% extends "chrono/manager_agenda_month_view.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block actions %}
|
||||
<a class="extra-actions-menu-opener"></a>
|
||||
<ul class="extra-actions-menu">
|
||||
<li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
|
||||
{% if agenda.subscriptions.exists %}
|
||||
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{{ block.super }}
|
||||
{% block agenda-extra-menu-actions %}
|
||||
<li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
|
||||
{% if agenda.subscriptions.exists %}
|
||||
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
{% extends "chrono/manager_agenda_week_view.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block actions %}
|
||||
<a class="extra-actions-menu-opener"></a>
|
||||
<ul class="extra-actions-menu">
|
||||
<li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
|
||||
{% if agenda.subscriptions.exists %}
|
||||
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{{ block.super }}
|
||||
{% block agenda-extra-menu-actions %}
|
||||
<li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
|
||||
{% if agenda.subscriptions.exists %}
|
||||
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -1319,8 +1319,8 @@ def test_agenda_events_week_view(app, admin_user):
|
|||
agenda.update_event_recurrences()
|
||||
resp = app.get('/manage/agendas/%s/week/%s/%s/%s/' % (agenda.pk, 2020, 11, 11))
|
||||
assert len(resp.pyquery.find('.event-title')) == 1
|
||||
assert 'Exception: 11/10/2020' in resp.pyquery.find('li')[4].text_content()
|
||||
assert 'xyz' in resp.pyquery.find('li')[5].text_content()
|
||||
assert 'Exception: 11/10/2020' in resp.pyquery('li a.disabled')[0].text_content()
|
||||
assert 'xyz' in resp.pyquery('li.bookable')[0].text_content()
|
||||
|
||||
# create another event with recurrence, the same day/time
|
||||
start_datetime = localtime().replace(day=4, month=11, year=2020)
|
||||
|
@ -1415,9 +1415,9 @@ def test_agenda_events_month_view(app, admin_user):
|
|||
agenda.update_event_recurrences()
|
||||
resp = app.get('/manage/agendas/%s/month/%s/%s/%s/' % (agenda.pk, 2020, 11, 1))
|
||||
assert len(resp.pyquery.find('.event-title')) == 4
|
||||
assert 'abc' in resp.pyquery.find('li')[4].text_content()
|
||||
assert 'Exception: 11/10/2020' in resp.pyquery.find('li')[5].text_content()
|
||||
assert 'xyz' in resp.pyquery.find('li')[6].text_content()
|
||||
assert 'abc' in resp.pyquery('li.bookable')[0].text_content()
|
||||
assert 'Exception: 11/10/2020' in resp.pyquery('li a.disabled')[0].text_content()
|
||||
assert 'xyz' in resp.pyquery('li.bookable')[1].text_content()
|
||||
|
||||
# 12/2020 has 5 Wednesday
|
||||
resp = app.get('/manage/agendas/%s/month/%s/%s/%s/' % (agenda.pk, 2020, 12, 1))
|
||||
|
|
Loading…
Reference in New Issue