Skip to content

Commit

Permalink
Don't show releases link if there are none
Browse files Browse the repository at this point in the history
  • Loading branch information
di committed Jan 23, 2018
1 parent 71b5e26 commit 6cc02cb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion warehouse/templates/manage/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ <h2>Settings</h2>

<h3>Delete project</h3>

<p>Deleting will irreversibly delete this project along with
<p>
{% if project.releases %}
Deleting will irreversibly delete this project along with
<a href="{{ request.route_path('manage.project.releases', project_name=project.name) }}">
{{ project.releases|length() }}
{% trans count=project.releases|length %}
Expand All @@ -31,6 +33,9 @@ <h3>Delete project</h3>
releases.
{% endtrans %}
</a>
{% else %}
Deleting will irreversibly delete this project.
{% endif %}
</p>

<a href="#delete-project-modal" class="button button--highlight">Delete</a>
Expand Down

0 comments on commit 6cc02cb

Please sign in to comment.