Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: implement the top-right usertools block #2324

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions benefits/static/css/admin/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ html[data-theme="light"],
--link-fg: #ffffff;
--body-quiet-color: var(--dark-color);
}

#user-tools,
#logout-form button {
text-transform: unset;
}
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 %}
Loading