Skip to content

Commit

Permalink
Show Rebuild button only when build status is error or fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Polcyn committed Aug 11, 2017
1 parent bd8da98 commit 72804ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mrbelvedereci/build/templates/build/detail_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
{% endblock %}

{% block layout_header_buttons %}
{% if request.user.is_staff and build.get_status != 'success' %}
{% if request.user.is_staff %}
{% if build.get_status == 'error' or build.get_status == 'fail' %}
<div class="slds-button-group" role="group">
<a href="{{ build.get_absolute_url }}/rebuild">
<button class="slds-button slds-button--neutral">
Expand All @@ -22,6 +23,7 @@
</a>
</div>
{% endif %}
{% endif %}
{% endblock %}

{% block layout_header_details %}
Expand Down

0 comments on commit 72804ab

Please sign in to comment.