summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2017-07-22 18:29:13 +0200
committerJelle van der Waa <jelle@vdwaa.nl>2017-07-22 18:29:13 +0200
commita6c4162f7398985753602a095207af8827f35914 (patch)
tree0c79617a21ffb408fab73f70c44f3fc80e8f56a5 /templates
parent5945f159882343316e5d871500247464786d0bc6 (diff)
downloadarchweb-a6c4162f7398985753602a095207af8827f35914.tar.gz
archweb-a6c4162f7398985753602a095207af8827f35914.zip
Hide adopt button if user can not adopt it
Hide the adopt button when the user is unable to adopt the packages since it's not in his allowed repos
Diffstat (limited to 'templates')
-rw-r--r--templates/packages/package_details.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/packages/package_details.html b/templates/packages/package_details.html
index d7c142e1..3516005b 100644
--- a/templates/packages/package_details.html
+++ b/templates/packages/package_details.html
@@ -42,7 +42,7 @@
<div><input type="hidden" name="pkgid" value="{{ pkg.id }}" /></div>
<p>{% if user in pkg.maintainers %}
<input title="Orphan this package" type="submit" name="disown" value="Disown"/>
- {% else %}
+ {% elif pkg.repo in user.userprofile.allowed_repos.all %}
<input title="Adopt this package" type="submit" name="adopt" value="Adopt"/>
{% endif %}</p>
</form>