Merge branch 'pu_package_keywords_fix' into pu

This commit is contained in:
Kevin Morris 2021-10-15 20:08:31 -07:00
commit 50634d30b3
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -33,36 +33,34 @@
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% if pkgbase.keywords.scalar() %} <tr>
<tr> <th>{{ "Keywords" | tr }}:</th>
<th>{{ "Keywords" | tr }}:</th> {% if request.user.has_credential("CRED_PKGBASE_SET_KEYWORDS", approved=[pkgbase.Maintainer]) %}
{% if is_maintainer %} <td>
<td> <form method="update"
<form method="update" action="/pkgbase/{{ pkgbase.Name }}/keywords/"
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 %}
<a class="keyword"
href="/packages/?K={{ keyword.Keyword }}&amp;SB=p"
> >
<div> {{ keyword.Keyword }}
<input type="text" </a>
name="keywords" {% endfor %}
value="{{ pkgbase.keywords | join(' ', attribute='Keyword') }}" </td>
/> {% endif %}
<input type="submit" value="{{ 'Update' | tr }}"/> </tr>
</div>
</form>
</td>
{% else %}
<td>
{% for keyword in pkgbase.keywords %}
<a class="keyword"
href="/packages/?K={{ keyword.Keyword }}&amp;SB=p"
>
{{ keyword.Keyword }}
</a>
{% endfor %}
</td>
{% endif %}
</tr>
{% endif %}
{% if licenses and licenses.scalar() and show_package_details %} {% if licenses and licenses.scalar() and show_package_details %}
<tr> <tr>
<th>{{ "Licenses" | tr }}:</th> <th>{{ "Licenses" | tr }}:</th>