Skip to content

Commit 2c262af

Browse files
authored
Merge pull request #246 from Xpirix/move_login_button
Move login button and highlight no login required for download
2 parents 117244b + 02b6116 commit 2c262af

File tree

2 files changed

+28
-32
lines changed

2 files changed

+28
-32
lines changed

qgis-app/templates/layouts/header.html

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -80,40 +80,36 @@
8080
{% endif %}
8181
{% endif %}
8282
{% endfor %}
83+
{% if user.is_authenticated %}
84+
<div class="navbar-item has-dropdown is-hoverable p-0">
85+
<a href="#" class="navbar-link has-text-weight-semibold is-size-7">
86+
<i class="fas fa-user mr-3"></i>
87+
{{ user.get_full_name|default:user.username }}
88+
</a>
89+
<div class="navbar-dropdown">
90+
<a href='{% url "logout" %}' class="navbar-item has-text-weight-semibold is-size-7">
91+
{% trans "Logout" %}
92+
</a>
93+
</div>
94+
</div>
95+
{% else %}
96+
<a class="navbar-item has-text-weight-semibold is-size-7" href="/accounts/login/">
97+
<span class="mr-2">
98+
<i class="fas fa-sign-in-alt"></i>
99+
</span>
100+
<span>
101+
{% trans "Login" %}
102+
</span>
103+
</a>
104+
{% endif %}
83105

84106
</div>
85107
<div class="navbar-end">
86-
<div>
87-
<div class="control has-icons-right search-control">
88-
<form action="{% url "haystack_search" %}" method="get" style="margin:0;">
89-
<input class="input is-small" id="id_q" name="q" type="text" placeholder="Search">
90-
<span class="icon is-right"><i class="fa-solid fa-magnifying-glass"></i></span>
91-
</form>
92-
</div>
93-
</div>
94-
<div class="navbar-item p-0 ml-1">
95-
{% if user.is_authenticated %}
96-
<div class="navbar-item has-dropdown is-hoverable p-0">
97-
<a href="#" class="navbar-link has-text-weight-semibold is-size-7">
98-
<i class="fas fa-user mr-3"></i>
99-
{{ user.get_full_name|default:user.username }}
100-
</a>
101-
<div class="navbar-dropdown">
102-
<a href='{% url "logout" %}' class="navbar-item has-text-weight-semibold is-size-7">{% trans "Logout" %}</a>
103-
</div>
104-
</div>
105-
{% else %}
106-
<a class="button is-info is-small" href="{% url "login" %}">
107-
<span class="mr-2">
108-
<i class="fas fa-sign-in-alt"></i>
109-
</span>
110-
<span>
111-
{% trans "Login" %}
112-
</span>
113-
</a>
114-
{% endif %}
115-
{% block navigation_extra %}
116-
{% endblock %}
108+
<div class="control has-icons-right search-control">
109+
<form action="{% url "haystack_search" %}" method="get" style="margin:0;">
110+
<input class="input is-small" id="id_q" name="q" type="text" placeholder="Search">
111+
<span class="icon is-right"><i class="fa-solid fa-magnifying-glass"></i></span>
112+
</form>
117113
</div>
118114
</div>
119115
</div>

qgis-app/templates/registration/login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="has-text-centered">
1111
<h3 class="title">{% trans "Login using your OSGEO id." %}</h3>
1212
<hr class="login-hr" />
13-
<p class="subtitle">
13+
<p class="subtitle has-text-danger has-text-weight-bold">
1414
{% trans "Please note that you do not need a login to download a plugin." %}
1515
</p>
1616
<p class="subtitle">

0 commit comments

Comments
 (0)