data_explorer/templates/_banner.html
{% load staticfiles %}
{% if NON_PROD_INSTANCE_NAME or show_debug_ui %}
<div id="banner" class="banner__non-prod">
<div class="container">
<a class="skip-nav" tabindex="-1" href="#main">Skip navigation</a>
<p id="usa">
{% if NON_PROD_INSTANCE_NAME %}
This is a {{ NON_PROD_INSTANCE_NAME }} version of CALC.
Please visit <a href="https://calc.gsa.gov">calc.gsa.gov</a> for the production site.
{% else %}
This is a development version of CALC.
{% endif %}
</p>
<div class="developer-nav">
<a href="{% url 'styleguide:index' %}">Style guide</a> |
<a href="/docs/">Docs</a>
{% if show_debug_ui %}
|
<details>
<summary>Switch user…</summary>
<ul>
{% for su in SAMPLE_USERS %}
<li>
<a href="{% url 'login_sample_user' username=su.username %}?next={{ request.path|urlencode }}">
{{ su.desc }}<br>
<span class="email">{{ su.email }}</span>
</a>
</li>
{% endfor %}
</ul>
</details>
{% endif %}
</div>
{% if canonical_url != request.build_absolute_uri %}
<br>
<p>
You should probably <a href="/admin/sites/site/1/">change your site's domain name</a>, or some links may not work.
</p>
{% endif %}
</div>
</div>
{% else %}
<div id="banner">
<div class="container">
<a class="skip-nav" tabindex="-1" href="#main">Skip navigation</a>
<p id="usa">
<img src="{% static 'frontend/images/flag-usa.png' %}" alt="USA flag">
An official website of the U.S. government</p>
</div>
</div>
{% endif %}