Skip to content

Commit

Permalink
feat: implement usertools block in agency-base
Browse files Browse the repository at this point in the history
  • Loading branch information
lalver1 committed Aug 27, 2024
1 parent 0708dc1 commit aa73dca
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 19 deletions.
4 changes: 4 additions & 0 deletions benefits/static/img/icon/box-arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 42 additions & 19 deletions benefits/templates/admin/agency-base.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,59 @@
<div id="header-container" class="navbar navbar-expand-sm navbar-dark justify-content-between">
<div class="container">
<span class="navbar-brand p-0">
<img class="sm d-lg-none" src="{% static "img/logo-sm.svg" %}" width="90" height="51.3" alt="{% translate "California Integrated Travel Project: Benefits logo (small)" context "image alt text" %}" />
<img class="lg d-none d-lg-block" src="{% static "img/logo-lg.svg" %}" width="220" height="50" alt="{% translate "California Integrated Travel Project: Benefits logo (large)" context "image alt text" %}" />
<img class="sm d-lg-none" src="{% static "img/logo-sm.svg" %}" width="90" height="51.3" alt="California Integrated Travel Project: Benefits logo (small)" />
<img class="lg d-none d-lg-block" src="{% static "img/logo-lg.svg" %}" width="220" height="50" alt="California Integrated Travel Project: Benefits logo (large)" />
</span>
</div>
<h1 class="p-0 m-0 text-white">Administrator</h1>
</div>
{% endblock branding %}

{% block usertools %}
{% endblock usertools %}
{% if has_permission %}
<div id="user-tools">
{% block welcome-msg %}
<span class="text-uppercase text-white">
Welcome,
<span class="fw-bold">{% firstof user.get_short_name user.get_username %}</span>. </span>
{% endblock welcome-msg %}
{% block userlinks %}
{% if user.is_active and user.is_staff %}
{% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %}<a href="{{ docsroot }}">Documentation</a> /{% endif %}
{% endif %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}">Change password</a> /
{% endif %}
<img class="icon" width="15" height="15" src="{% static "img/icon/box-arrow-right.svg" %}" alt="" />
<form id="logout-form" method="post" action="{% url 'admin:logout' %}">
{% csrf_token %}
<button type="submit" class="border-0">Sign out</button>
</form>
{% endblock userlinks %}
</div>
{% endif %}
{% endblock usertools %}

{% block coltype %}
w-100
{% endblock coltype %}
{% block coltype %}
w-100
{% endblock coltype %}

{% block bodyclass %}
{{ block.super }} dashboard
{% endblock bodyclass %}
{% block bodyclass %}
{{ block.super }} dashboard
{% endblock bodyclass %}

{% block nav-breadcrumbs %}
{% endblock nav-breadcrumbs %}
{% block nav-breadcrumbs %}
{% endblock nav-breadcrumbs %}

{% block nav-sidebar %}
{% endblock nav-sidebar %}
{% block nav-sidebar %}
{% endblock nav-sidebar %}

{% block content_title %}
{% endblock content_title %}
{% block content_title %}
{% endblock content_title %}

{% block content %}
{% endblock content %}
{% block content %}
{% endblock content %}

{% block sidebar %}
{% endblock sidebar %}
{% block sidebar %}
{% endblock sidebar %}

0 comments on commit aa73dca

Please sign in to comment.