switch to toast notifications everywhere
This commit is contained in:
parent
8b66b40f0d
commit
fa93b59a8c
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="toast-notifications-list-pf">
|
<div class="toast-notifications-list-pf">
|
||||||
{% include 'partials/messages.html' with toast=True %}
|
{% include 'partials/messages.html' %}
|
||||||
</div>
|
</div>
|
||||||
<div class="login-pf-page">
|
<div class="login-pf-page">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<div class="toast-notifications-list-pf">
|
<div class="toast-notifications-list-pf">
|
||||||
{% include 'partials/messages.html' with toast=True %}
|
{% include 'partials/messages.html' %}
|
||||||
</div>
|
</div>
|
||||||
<div class="login-pf-page login-pf-page-accounts">
|
<div class="login-pf-page login-pf-page-accounts">
|
||||||
<header class="login-pf-page-header">
|
<header class="login-pf-page-header">
|
||||||
|
|
|
@ -5,83 +5,83 @@
|
||||||
{% load is_active %}
|
{% load is_active %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
<div class="toast-notifications-list-pf">
|
||||||
|
{% include 'partials/messages.html' %}
|
||||||
|
</div>
|
||||||
<nav class="navbar navbar-default navbar-pf" role="navigation">
|
<nav class="navbar navbar-default navbar-pf" role="navigation">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
|
||||||
<span class="sr-only">{% trans 'Toggle navigation' %}</span>
|
<span class="sr-only">{% trans 'Toggle navigation' %}</span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
|
||||||
<a class="navbar-brand" href="/">
|
|
||||||
<img src="{% static 'img/brand.svg' %}" alt="passbook" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="collapse navbar-collapse navbar-collapse-1">
|
|
||||||
<ul class="nav navbar-nav navbar-utility">
|
|
||||||
<li class="dropdown">
|
|
||||||
<button class="btn btn-link nav-item-iconic" id="horizontalDropdownMenu1" data-toggle="dropdown" aria-haspopup="true"
|
|
||||||
aria-expanded="true">
|
|
||||||
<span title="Help" class="fa pficon-help dropdown-title"></span>
|
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu" aria-labelledby="horizontalDropdownMenu1">
|
<a class="navbar-brand" href="/">
|
||||||
{% comment %} <li><a href="#0">Help</a></li> {% endcomment %}
|
<img src="{% static 'img/brand.svg' %}" alt="passbook" />
|
||||||
<li><a data-toggle="modal" data-target="#about-modal" href="#0">{% trans 'About' %}</a></li>
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="collapse navbar-collapse navbar-collapse-1">
|
||||||
|
<ul class="nav navbar-nav navbar-utility">
|
||||||
|
<li class="dropdown">
|
||||||
|
<button class="btn btn-link nav-item-iconic" id="horizontalDropdownMenu1" data-toggle="dropdown"
|
||||||
|
aria-haspopup="true" aria-expanded="true">
|
||||||
|
<span title="Help" class="fa pficon-help dropdown-title"></span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu" aria-labelledby="horizontalDropdownMenu1">
|
||||||
|
{% comment %} <li><a href="#0">Help</a></li> {% endcomment %}
|
||||||
|
<li><a data-toggle="modal" data-target="#about-modal" href="#0">{% trans 'About' %}</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="dropdown">
|
||||||
|
<button class="btn btn-link dropdown-toggle" data-toggle="dropdown">
|
||||||
|
<span class="pficon pficon-user"></span>
|
||||||
|
<span class="dropdown-title">
|
||||||
|
{{ user.username }} <b class="caret"></b>
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'passbook_core:user-settings' %}">{% trans 'User Settings' %}</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'passbook_core:user-change-password' %}">{% trans 'Change Password' %}</a>
|
||||||
|
</li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li>
|
||||||
|
<a href="{% url 'passbook_core:auth-logout' %}">{% trans 'Logout' %}</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
{% is_active_app 'passbook_admin' as is_admin %}
|
||||||
<li class="dropdown">
|
<ul class="nav navbar-nav navbar-primary {% if is_admin == 'active' %}persistent-secondary{% endif %}">
|
||||||
<button class="btn btn-link dropdown-toggle" data-toggle="dropdown">
|
<li class="{% is_active_url 'passbook_core:overview' %}">
|
||||||
<span class="pficon pficon-user"></span>
|
<a href="{% url 'passbook_core:overview' %}">{% trans 'Overview' %}</a>
|
||||||
<span class="dropdown-title">
|
</li>
|
||||||
{{ user.username }} <b class="caret"></b>
|
{% if user.is_superuser %}
|
||||||
</span>
|
<li class="{% is_active_app 'passbook_admin' %}">
|
||||||
</button>
|
<a href="{% url 'passbook_admin:overview' %}">{% trans 'Administration' %}</a>
|
||||||
<ul class="dropdown-menu">
|
{% block nav_secondary %}
|
||||||
<li>
|
{% endblock %}
|
||||||
<a href="{% url 'passbook_core:user-settings' %}">{% trans 'User Settings' %}</a>
|
</li>
|
||||||
</li>
|
{% endif %}
|
||||||
<li>
|
|
||||||
<a href="{% url 'passbook_core:user-change-password' %}">{% trans 'Change Password' %}</a>
|
|
||||||
</li>
|
|
||||||
<li class="divider"></li>
|
|
||||||
<li>
|
|
||||||
<a href="{% url 'passbook_core:auth-logout' %}">{% trans 'Logout' %}</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
|
||||||
{% is_active_app 'passbook_admin' as is_admin %}
|
|
||||||
<ul class="nav navbar-nav navbar-primary {% if is_admin == 'active' %}persistent-secondary{% endif %}">
|
|
||||||
<li class="{% is_active_url 'passbook_core:overview' %}">
|
|
||||||
<a href="{% url 'passbook_core:overview' %}">{% trans 'Overview' %}</a>
|
|
||||||
</li>
|
|
||||||
{% if user.is_superuser %}
|
|
||||||
<li class="{% is_active_app 'passbook_admin' %}">
|
|
||||||
<a href="{% url 'passbook_admin:overview' %}">{% trans 'Administration' %}</a>
|
|
||||||
{% block nav_secondary %}
|
|
||||||
{% endblock %}
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
<div class="container-fluid container-cards-pf">
|
<div class="container-fluid container-cards-pf">
|
||||||
<div class="container">
|
{% block content %}
|
||||||
{% include 'partials/messages.html' %}
|
{% endblock %}
|
||||||
</div>
|
|
||||||
{% block content %}
|
|
||||||
{% endblock %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// initialize tooltips
|
// initialize tooltips
|
||||||
$('[data-toggle="tooltip"]').tooltip();
|
$('[data-toggle="tooltip"]').tooltip();
|
||||||
|
|
||||||
// Initialize the vertical navigation
|
// Initialize the vertical navigation
|
||||||
$().setupVerticalNavigation(true);
|
$().setupVerticalNavigation(true);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
{% if messages %}
|
{% if messages %}
|
||||||
{% for msg in messages %}
|
{% for msg in messages %}
|
||||||
<div class="{% if toast %}toast-pf{% endif %} alert alert-{{ msg.level_tag }}">
|
<div class="toast-pf alert alert-dismissable alert-{{ msg.level_tag }}">
|
||||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||||
<span class="pficon pficon-close"></span>
|
<span class="pficon pficon-close"></span>
|
||||||
</button>
|
</button>
|
||||||
{% if msg.level_tag == 'danger' %}
|
{% if msg.level_tag == 'danger' %}
|
||||||
<span class="pficon pficon-error-circle-o"></span>
|
<span class="pficon pficon-error-circle-o"></span>
|
||||||
{% elif msg.level_tag == 'warning' %}
|
{% elif msg.level_tag == 'warning' %}
|
||||||
<span class="pficon pficon-warning-triangle-o"></span>
|
<span class="pficon pficon-warning-triangle-o"></span>
|
||||||
{% elif msg.level_tag == 'success' %}
|
{% elif msg.level_tag == 'success' %}
|
||||||
<span class="pficon pficon-ok"></span>
|
<span class="pficon pficon-ok"></span>
|
||||||
{% elif msg.level_tag == 'info' %}
|
{% elif msg.level_tag == 'info' %}
|
||||||
<span class="pficon pficon-info"></span>
|
<span class="pficon pficon-info"></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<strong>{{ msg.message|safe }}</strong>
|
{{ msg.message|safe }}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Reference in New Issue