mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(fastapi): hide keywords when there are none or they can't be edited
Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
363afff332
commit
20f5519b99
1 changed files with 29 additions and 27 deletions
|
@ -33,34 +33,36 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
{% if pkgbase.keywords.count() or request.user.has_credential("CRED_PKGBASE_SET_KEYWORDS", approved=[pkgbase.Maintainer]) %}
|
||||||
<th>{{ "Keywords" | tr }}:</th>
|
<tr>
|
||||||
{% if request.user.has_credential("CRED_PKGBASE_SET_KEYWORDS", approved=[pkgbase.Maintainer]) %}
|
<th>{{ "Keywords" | tr }}:</th>
|
||||||
<td>
|
{% if request.user.has_credential("CRED_PKGBASE_SET_KEYWORDS", approved=[pkgbase.Maintainer]) %}
|
||||||
<form method="post"
|
<td>
|
||||||
action="/pkgbase/{{ pkgbase.Name }}/keywords"
|
<form method="post"
|
||||||
>
|
action="/pkgbase/{{ pkgbase.Name }}/keywords"
|
||||||
<div>
|
|
||||||
<input type="text"
|
|
||||||
name="keywords"
|
|
||||||
value="{{ pkgbase.keywords | join(' ', attribute='Keyword') }}"
|
|
||||||
/>
|
|
||||||
<input type="submit" value="{{ 'Update' | tr }}"/>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</td>
|
|
||||||
{% else %}
|
|
||||||
<td>
|
|
||||||
{% for keyword in pkgbase.keywords.all() %}
|
|
||||||
<a class="keyword"
|
|
||||||
href="/packages/?K={{ keyword.Keyword }}&SB=p"
|
|
||||||
>
|
>
|
||||||
{{ keyword.Keyword }}
|
<div>
|
||||||
</a>
|
<input type="text"
|
||||||
{% endfor %}
|
name="keywords"
|
||||||
</td>
|
value="{{ pkgbase.keywords | join(' ', attribute='Keyword') }}"
|
||||||
{% endif %}
|
/>
|
||||||
</tr>
|
<input type="submit" value="{{ 'Update' | tr }}"/>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
{% else %}
|
||||||
|
<td>
|
||||||
|
{% for keyword in pkgbase.keywords.all() %}
|
||||||
|
<a class="keyword"
|
||||||
|
href="/packages/?K={{ keyword.Keyword }}&SB=p"
|
||||||
|
>
|
||||||
|
{{ keyword.Keyword }}
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
{% endif %}
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% if licenses and licenses.count() and show_package_details %}
|
{% if licenses and licenses.count() and show_package_details %}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ "Licenses" | tr }}:</th>
|
<th>{{ "Licenses" | tr }}:</th>
|
||||||
|
|
Loading…
Add table
Reference in a new issue