Skip to content

Commit ed679d2

Browse files
authored
Hide django sidebar by default in recap screen (#4556)
1 parent 1439357 commit ed679d2

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

backend/reviews/templates/grants-recap.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{% extends "admin/base_site.html" %} {% load i18n %} {% load markdownify %}
2-
{% load localize countryname get_item %} {% block breadcrumbs %}
2+
{% load localize countryname get_item %}
3+
{% block extrahead %}
4+
{{ block.super }}
5+
<script>
6+
// Collapse Django admin sidebar by default on this page
7+
if (localStorage.getItem('django.admin.navSidebarIsOpen') !== 'false') {
8+
localStorage.setItem('django.admin.navSidebarIsOpen', 'false');
9+
}
10+
</script>
11+
{% endblock %}
12+
{% block breadcrumbs %}
313
<div class="breadcrumbs">
414
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
515
&rsaquo; <a href="{% url 'admin:app_list' 'reviews' %}">Reviews</a> &rsaquo;

backend/reviews/templates/proposals-recap.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
{% load i18n %}
33
{% load markdownify %}
44
{% load localize countryname get_item %}
5+
{% block extrahead %}
6+
{{ block.super }}
7+
<script>
8+
// Collapse Django admin sidebar by default on this page
9+
if (localStorage.getItem('django.admin.navSidebarIsOpen') !== 'false') {
10+
localStorage.setItem('django.admin.navSidebarIsOpen', 'false');
11+
}
12+
</script>
13+
{% endblock %}
514
{% block breadcrumbs %}
615
<div class="breadcrumbs">
716
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>

0 commit comments

Comments
 (0)