feat: Add a bug report link to the menu bar (#4525)
This required making some horizontal room for it, mostly by showing a user photo or shorter tag when they are logged in.
This commit is contained in:
parent
9b896e5869
commit
3e2b1fc92e
|
@ -227,6 +227,13 @@ th {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Style the navbar user photo
|
||||||
|
.nav-link .user-photo {
|
||||||
|
object-fit: cover;
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
// Style the righthand navigation panel
|
// Style the righthand navigation panel
|
||||||
#righthand-panel {
|
#righthand-panel {
|
||||||
max-height: 80vh;
|
max-height: 80vh;
|
||||||
|
|
|
@ -42,23 +42,32 @@
|
||||||
<img alt="IETF Logo" class="me-2"
|
<img alt="IETF Logo" class="me-2"
|
||||||
src="{% static 'ietf/images/ietf-logo-nor-white.svg' %}">
|
src="{% static 'ietf/images/ietf-logo-nor-white.svg' %}">
|
||||||
Datatracker
|
Datatracker
|
||||||
{% if server_mode and server_mode != "production" %}Dev Mode{% endif %}
|
{% if server_mode and server_mode != "production" %}
|
||||||
|
<span class="text-danger">δ</span>
|
||||||
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
<div class="collapse navbar-collapse" id="navbar-collapse">
|
<div class="collapse navbar-collapse" id="navbar-collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
{% include "base/menu.html" with flavor="top" %}
|
{% include "base/menu.html" with flavor="top" %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% if not user.is_authenticated %}
|
<div class="d-flex align-items-center">
|
||||||
<a class="d-none d-sm-block mx-5 btn {% if server_mode and server_mode == "production" %} btn-warning {% else %} btn-info {% endif %}"
|
<a class="nav-link {% if server_mode and server_mode != "production" %}text-danger{% else %}text-warning{% endif %} d-none d-xl-inline me-xl-4"
|
||||||
rel="nofollow"
|
target="_blank"
|
||||||
href="{% url 'ietf.ietfauth.views.login' %}?next={{ request.get_full_path|removesuffix:'accounts/logout/'|urlencode }}">
|
href="https://github.com/ietf-tools/datatracker/issues/new/choose">
|
||||||
Sign
|
Report a bug
|
||||||
in
|
<i class="bi bi-bug"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
|
||||||
<div class="d-flex d-none d-lg-block">
|
{% if not user.is_authenticated %}
|
||||||
<label aria-label="Document search">
|
<a class="btn me-1 {% if server_mode and server_mode == "production" %} btn-warning {% else %} btn-info {% endif %} d-none d-sm-block"
|
||||||
|
rel="nofollow"
|
||||||
|
href="{% url 'ietf.ietfauth.views.login' %}?next={{ request.get_full_path|removesuffix:'accounts/logout/'|urlencode }}">
|
||||||
|
Sign in
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<label class="d-none d-md-block" aria-label="Document search">
|
||||||
<input class="form-control select2-field"
|
<input class="form-control select2-field"
|
||||||
id="navbar-doc-search"
|
id="navbar-doc-search"
|
||||||
data-select2-ajax-url="{% url 'ietf.doc.views_search.ajax_select2_search_docs' model_name='docalias' doc_type='draft' %}"
|
data-select2-ajax-url="{% url 'ietf.doc.views_search.ajax_select2_search_docs' model_name='docalias' doc_type='draft' %}"
|
||||||
|
@ -137,7 +146,7 @@
|
||||||
<span class="mx-2 text-danger">
|
<span class="mx-2 text-danger">
|
||||||
<i class="bi bi-bug"></i>
|
<i class="bi bi-bug"></i>
|
||||||
Report a bug:
|
Report a bug:
|
||||||
<a class="text-reset" href="https://github.com/ietf-tools/datatracker/issues/new/choose">GitHub</a>
|
<a class="text-reset" target="_blank" href="https://github.com/ietf-tools/datatracker/issues/new/choose">GitHub</a>
|
||||||
{% if bugreport_email %}
|
{% if bugreport_email %}
|
||||||
<a class="text-reset" href="mailto:{{ bugreport_email }}">Email</a>
|
<a class="text-reset" href="mailto:{{ bugreport_email }}">Email</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -420,7 +420,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item text-danger {% if flavor != 'top' %}text-wrap link-primary{% endif %}"
|
<a class="dropdown-item text-danger {% if flavor != 'top' %}text-wrap link-primary{% endif %}"
|
||||||
href="https://github.com/ietf-tools/datatracker/issues/new/choose">
|
target="_blank" href="https://github.com/ietf-tools/datatracker/issues/new/choose">
|
||||||
<i class="bi bi-bug">
|
<i class="bi bi-bug">
|
||||||
</i>
|
</i>
|
||||||
Report a bug
|
Report a bug
|
||||||
|
|
|
@ -5,12 +5,18 @@
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
{% if flavor == "top" %}
|
{% if flavor == "top" %}
|
||||||
<a href="#"
|
<a href="#"
|
||||||
class="nav-link dropdown-toggle"
|
class="nav-link dropdown-toggle{% if user.person.photo_thumb %} p-0{% endif %}"
|
||||||
role="button"
|
role="button"
|
||||||
data-bs-toggle="dropdown"
|
data-bs-toggle="dropdown"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
{{ user }}
|
{% if user.person.photo_thumb %}
|
||||||
|
<img class="user-photo rounded-circle ms-1" width="40" height="40"
|
||||||
|
src="{{ user.person.photo_thumb.url }}"
|
||||||
|
alt="Photo of {{ user.person.name }}">
|
||||||
|
{% else %}
|
||||||
|
{{ user.username|split:'@'|first }}
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
User
|
User
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue