diff --git a/benefits/templates/admin/agency-base.html b/benefits/templates/admin/agency-base.html index 69768a372..fc4a982e6 100644 --- a/benefits/templates/admin/agency-base.html +++ b/benefits/templates/admin/agency-base.html @@ -28,30 +28,7 @@

{{ site_header }}

{% endblock branding %} {% block usertools %} - {% if has_permission %} -
- {% block welcome-msg %} - - Welcome, - {% firstof user.get_short_name user.get_username %}. - - {% endblock welcome-msg %} - {% block userlinks %} - {% if user.is_active and user.is_staff %} - {% url 'django-admindocs-docroot' as docsroot %} - {% if docsroot %}Documentation /{% endif %} - {% endif %} - {% if user.has_usable_password %} - Change password / - {% endif %} - -
- {% csrf_token %} - -
- {% endblock userlinks %} -
- {% endif %} + {% include "admin/includes/usertools.html" %} {% endblock usertools %} {% block coltype %} diff --git a/benefits/templates/admin/includes/usertools.html b/benefits/templates/admin/includes/usertools.html new file mode 100644 index 000000000..b0ff961a3 --- /dev/null +++ b/benefits/templates/admin/includes/usertools.html @@ -0,0 +1,26 @@ +{% load i18n static %} + +{% if has_permission %} +
+ {% block welcome-msg %} + + Welcome, + {% firstof user.get_short_name user.get_username %}. + + {% endblock welcome-msg %} + {% block userlinks %} + {% if user.is_active and user.is_staff %} + {% url 'django-admindocs-docroot' as docsroot %} + {% if docsroot %}Documentation /{% endif %} + {% endif %} + {% if user.has_usable_password %} + Change password / + {% endif %} + +
+ {% csrf_token %} + +
+ {% endblock userlinks %} +
+{% endif %}