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

Wrap notifications HTML code into a block #4273

Merged
merged 1 commit into from
Jun 21, 2018
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
2 changes: 2 additions & 0 deletions readthedocs/templates/401.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
{% include "error_header.html" %}
{% endblock %}

{% block notify %}{% endblock %}

{# Hide the language select form so we don't set a CSRF cookie #}
{% block language-select-form %}{% endblock %}

Expand Down
2 changes: 2 additions & 0 deletions readthedocs/templates/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
{% include "error_header.html" %}
{% endblock %}

{% block notify %}{% endblock %}

{# Hide the language select form so we don't set a CSRF cookie #}
{% block language-select-form %}{% endblock %}

Expand Down
14 changes: 8 additions & 6 deletions readthedocs/templates/500.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{% extends "base.html" %}
{% load i18n %}

{% block title %}
{% trans "Server Error" %}
{% endblock %}
{% block title %}
{% trans "Server Error" %}
{% endblock %}

{% block header-wrapper %}
{% include "error_header.html" %}
{% endblock %}

{% block header-wrapper %}
{% include "error_header.html" %}
{% endblock %}
{% block notify %}{% endblock %}

{# Hide the language select form so we don't set a CSRF cookie #}
{% block language-select-form %}{% endblock %}
Expand Down
22 changes: 13 additions & 9 deletions readthedocs/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,19 @@
<div id="content">
<div class="wrapper">

{% if messages %}
<ul class="notifications">
{% for message in messages %}
<li class="notification notification-{{ message.level }}" {% if message.pk %}data-dismiss-url="{% url 'message_mark_read' message.pk %}{% endif %}">
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
<!-- BEGIN notify -->
{% block notify %}
{% if messages %}
<ul class="notifications">
{% for message in messages %}
<li class="notification notification-{{ message.level }}" {% if message.pk %}data-dismiss-url="{% url 'message_mark_read' message.pk %}{% endif %}">
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
<!-- END notify -->

{% block content-header %}
{% endblock %}
Expand Down