Skip to content

Commit

Permalink
Don't display the build suggestions div if there are no suggestions
Browse files Browse the repository at this point in the history
This added extraneous spacing to the build page.
  • Loading branch information
agjohnson committed Dec 14, 2017
1 parent 1a053bd commit f028e2e
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions readthedocs/templates/builds/build_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,27 @@
</span>
</div>

<div class="build-ideas">
{% if not build.success and build.commands.count < 4 %}
<p>

{% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %}
{% blocktrans %}
Having trouble with your build environment?
Try <a href="{{ wipe_url }}">reseting it</a>.
{% endblocktrans %}
</p>
{% endif %}

{% if not build.success and "setup.py install" in build.commands.last.output %}
<p>
{% url 'projects_advanced' build.version.project.slug as advanced_url %}
{% blocktrans %}
Don't want <em>setup.py install</em> called?
Change the <strong>Install Project</strong> setting in your <a href="{{ advanced_url }}">advanced settings</a>.
{% endblocktrans %}
</p>
<div class="build-ideas">
<p>
{% url 'wipe_version' build.version.project.slug build.version.slug as wipe_url %}
{% blocktrans %}
Having trouble with your build environment?
Try <a href="{{ wipe_url }}">reseting it</a>.
{% endblocktrans %}
</p>
</div>
{% elif not build.success and "setup.py install" in build.commands.last.output %}
<div class="build-ideas">
<p>
{% url 'projects_advanced' build.version.project.slug as advanced_url %}
{% blocktrans %}
Don't want <em>setup.py install</em> called?
Change the <strong>Install Project</strong> setting in your <a href="{{ advanced_url }}">advanced settings</a>.
{% endblocktrans %}
</p>
</div>
{% endif %}
</div>

{% if build.output %}
{# If we have build output, this is an old build #}
Expand Down

0 comments on commit f028e2e

Please sign in to comment.