diff --git a/opentech/apply/dashboard/templates/dashboard/dashboard.html b/opentech/apply/dashboard/templates/dashboard/dashboard.html index d467da86e95e7e625d96e9ac200dd665ce101eff..73fead516f52b250612d4e7706efe9dee2e00f93 100644 --- a/opentech/apply/dashboard/templates/dashboard/dashboard.html +++ b/opentech/apply/dashboard/templates/dashboard/dashboard.html @@ -5,10 +5,13 @@ {% block content %} <div class="admin-bar"> - <div class="admin-bar__inner"> + <div class="admin-bar__inner admin-bar__inner--with-button"> {% block page_header %} <h1 class="gamma heading heading--no-margin heading--bold">Dashboard</h1> {% endblock %} + <a href="{% url 'wagtailadmin_home' %}" class="button button--primary {{ class }}}"> + Apply admin + </a> </div> </div> <div class="wrapper wrapper--large wrapper--inner-space-medium"> diff --git a/opentech/apply/dashboard/wagtail_hooks.py b/opentech/apply/dashboard/wagtail_hooks.py new file mode 100644 index 0000000000000000000000000000000000000000..89843e82ecd19e03272655582f5599b014b02753 --- /dev/null +++ b/opentech/apply/dashboard/wagtail_hooks.py @@ -0,0 +1,19 @@ +from urllib.parse import urljoin + +from django.urls import reverse + +from wagtail.core import hooks +from wagtail.admin.menu import MenuItem + +from opentech.apply.home.models import ApplyHomePage + + +@hooks.register('register_admin_menu_item') +def register_dashboard_menu_item(): + apply_home = ApplyHomePage.objects.first() + return MenuItem( + 'Apply Dashboard', + urljoin(apply_home.url, reverse('dashboard:dashboard', 'opentech.apply.urls')), + classnames='icon icon-arrow-left', + order=100000, + )