mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(FastAPI): use elif statements where appropriate
Signed-off-by: Steven Guikal <void@fluix.one>
This commit is contained in:
parent
927f5e8567
commit
db67e83bb8
3 changed files with 16 additions and 23 deletions
|
@ -16,17 +16,16 @@
|
|||
| safe
|
||||
}}
|
||||
</p>
|
||||
{% elif request.user.is_authenticated() %}
|
||||
<p>
|
||||
{{ "Logged-in as: %s"
|
||||
| tr
|
||||
| format("<b>%s</b>" | format(request.user.Username))
|
||||
| safe
|
||||
}}
|
||||
<a href="/logout/?next={{ next }}">[{% trans %}Logout{% endtrans %}]</a>
|
||||
</p>
|
||||
{% else %}
|
||||
{% if request.user.is_authenticated() %}
|
||||
<p>
|
||||
{{ "Logged-in as: %s"
|
||||
| tr
|
||||
| format("<b>%s</b>" | format(request.user.Username))
|
||||
| safe
|
||||
}}
|
||||
<a href="/logout/?next={{ next }}">[{% trans %}Logout{% endtrans %}]</a>
|
||||
</p>
|
||||
{% else %}
|
||||
<form method="post" action="/login?next={{ next }}">
|
||||
<fieldset>
|
||||
<legend>{% trans %}Enter login credentials{% endtrans %}</legend>
|
||||
|
@ -81,9 +80,7 @@
|
|||
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -128,14 +128,12 @@
|
|||
/>
|
||||
</form>
|
||||
</li>
|
||||
{% else %}
|
||||
{% if request.user.has_credential("CRED_PKGBASE_DISOWN", approved=[pkgbase.Maintainer]) %}
|
||||
<li>
|
||||
<a href="/pkgbase/{{ pkgbase.Name }}/disown/">
|
||||
{{ "Disown Package" | tr }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% elif request.user.has_credential("CRED_PKGBASE_DISOWN", approved=[pkgbase.Maintainer]) %}
|
||||
<li>
|
||||
<a href="/pkgbase/{{ pkgbase.Name }}/disown/">
|
||||
{{ "Disown Package" | tr }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -82,8 +82,7 @@
|
|||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if request.user.has_credential("CRED_COMMENT_UNDELETE", approved=[comment.User]) %}
|
||||
{% elif request.user.has_credential("CRED_COMMENT_UNDELETE", approved=[comment.User]) %}
|
||||
<form class="undelete-comment-form"
|
||||
method="post"
|
||||
action="/pkgbase/{{ pkgbase.Name }}/comments/{{ comment.ID }}/undelete"
|
||||
|
@ -97,7 +96,6 @@
|
|||
name="submit" value="1" width="11" height="11" />
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</h4>
|
||||
<div id="comment-{{ comment.ID }}-content" class="{{ article_cls }}">
|
||||
|
|
Loading…
Add table
Reference in a new issue