Add Create Package button to profile page

This commit is contained in:
rubenwardy 2021-07-22 11:50:39 +01:00
parent f1597622ea
commit 54304cf3e0

@ -119,14 +119,19 @@
</div>
{% endif %}
{% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.EDITOR)) %}
<a class="float-right btn btn-sm btn-primary"
href="{{ url_for('todo.tags', author=user.username) }}">
View list of tags
</a>
{% if user.checkPerm(current_user, "CHANGE_AUTHOR") %}
<a class="float-right btn btn-sm btn-primary"
href="{{ url_for('packages.create_edit', author=user.username) }}">
<i class="fas fa-plus mr-1"></i>
Create package
</a>
{% endif %}
{% if current_user == user or (current_user.is_authenticated and current_user.rank.atLeast(current_user.rank.EDITOR)) %}
<a class="float-right btn btn-sm btn-secondary mr-2"
href="{{ url_for('todo.tags', author=user.username) }}">
View list of tags
</a>
{% endif %}
<h2 class="my-3">{{ _("Packages") }}</h2>
{% from "macros/packagegridtile.html" import render_pkggrid %}