Restores the warning message to the Project dashboard.

It had gotten lost in a previous commit.

Change-Id: I14af9a6feaf8d0a38343f1360e4631b34d94dea2
This commit is contained in:
Gabriel Hurley 2012-08-15 12:43:32 -07:00
parent d854ea0f55
commit ec534c17c4
2 changed files with 12 additions and 17 deletions

View File

@ -1,17 +0,0 @@
{% extends 'base.html' %}
{% load i18n %}
{% block content %}
{% if request.user.is_superuser %}
<div class="warning">
<div class="warning-text">
<h3 class="alert-error">
<strong>{% trans "Caution" %}:</strong>
<span>{% trans "You are acting as an admin user in the project dashboard." %}</span>
</h3>
<a href="{% url horizon:nova:overview:warning %}" class="btn btn-small btn-danger ajax-modal">{% trans "Learn More" %}</a>
</div>
</div>
{% endif %}
{{ block.super }}
{% endblock %}

View File

@ -12,6 +12,18 @@
</head>
<body id="{% block body_id %}{% endblock %}">
{% block content %}
{# FIXME(gabriel): remove the following warning block when Nova fixes their scoping upstream. #}
{% if request.user.is_superuser and request.horizon.dashboard.slug == "nova" %}
<div class="warning">
<div class="warning-text">
<h3 class="alert-error">
<strong>{% trans "Caution" %}:</strong>
<span>{% trans "You are acting as an admin user in the project dashboard." %}</span>
</h3>
<a href="{% url horizon:nova:overview:warning %}" class="btn btn-small btn-danger ajax-modal">{% trans "Learn More" %}</a>
</div>
</div>
{% endif %}
<div id="container">
{% block sidebar %}
{% include 'horizon/common/_sidebar.html' %}