diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2017-07-22 18:29:13 +0200 |
---|---|---|
committer | Jelle van der Waa <jelle@vdwaa.nl> | 2017-07-22 18:29:13 +0200 |
commit | a6c4162f7398985753602a095207af8827f35914 (patch) | |
tree | 0c79617a21ffb408fab73f70c44f3fc80e8f56a5 | |
parent | 5945f159882343316e5d871500247464786d0bc6 (diff) | |
download | archweb-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
-rw-r--r-- | templates/packages/package_details.html | 2 |
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> |