Skip to content
Snippets Groups Projects
Unverified Commit 40e4cecf authored by Todd Dembrey's avatar Todd Dembrey Committed by GitHub
Browse files

Merge pull request #426 from OpenTechFund/feature/270-create-admin-links

WIP: Feature/270 create admin links
parents 8350ec5c 023a5b86
No related branches found
No related tags found
No related merge requests found
......@@ -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">
......
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,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment