Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't display the build suggestions div if there are no suggestions #3389

Merged
merged 1 commit into from
Dec 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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