Skip to content

Commit

Permalink
Make 'Grader is unstable' banner sticky
Browse files Browse the repository at this point in the history
Users might not see the alert sometimes, since it was
always at the top of the page.

Fixes #1309
  • Loading branch information
khattam2 authored and ihalaij1 committed Feb 1, 2024
1 parent 0ef09c8 commit 2673aa9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions course/templates/course/course_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ <h4>{% trans "Calendar" %}</h4>
</div>
{% endblock course_sidebar %}
<div class="col-sm-10" id="course-content">
{% if instance %}
{% course_alert instance %}
{% endif %}
{% if instance.is_past and instance.has_enrollment_closed %}
<div class="alert sticky-alert alert-default">
{% translate "COURSE_HAS_ALREADY_ENDED" %}
Expand Down
2 changes: 1 addition & 1 deletion course/templatetags/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def course_alert(instance):
_('GRADER_PROBLEMS_ALERT -- {exercises}'),
exercises=exercises,
)
return mark_safe(format_lazy('<div class="alert alert-danger">{message}</div>', message=message))
return mark_safe(format_lazy('<div class="alert alert-danger sticky-alert">{message}</div>', message=message))
return ''


Expand Down
3 changes: 0 additions & 3 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,6 @@ <h4>{% translate "SITE" %}</h4>
<main class="site-content container-fluid" id="content">
{% endblock %}
{% site_alert %}
{% if instance %}
{% course_alert instance %}
{% endif %}
{% include "_messages.html" %}
{% block content %}
<div class="error">
Expand Down

0 comments on commit 2673aa9

Please sign in to comment.