Fix rebuild link display
@@ -69,6 +69,22 @@ $(document).ready(function () {
</a>
</li>
</div>
+
+
+ {% if request.user|is_admin:project %}
+ <div data-bind="visible: finished()">
+ <form method="post" name="rebuild_commit" action="{% url "builds_project_list" project.slug %}">
+ {% csrf_token %}
+ <a href="#" onclick="document.forms['rebuild_commit'].submit();">
+ Rebuild commit
+ </a>
+ <input type="hidden" name="version_slug" value="{{ build.version.slug }}">
+ <input type="hidden" name="commit" value="{{ build.commit }}">
+ <input type="hidden" name="build_pk" value="{{ build.pk }}">
+ </form>
+ </div>
+ {% endif %}
+
</ul>
<div class="build-id">
@@ -119,21 +135,6 @@ $(document).ready(function () {
style="display: none;">
{% trans "Build failed" %}
</span>
-
- {% if request.user|is_admin:project %}
- <span>
- <div data-bind="visible: finished()">
- <form method="post" action="{% url "builds_project_list" project.slug %}">
- {% csrf_token %}
- <input type="submit" value="{% trans "Rebuild" %}">
- <input type="hidden" name="version_slug" value="{{ build.version.slug }}">
- <input type="hidden" name="commit" value="{{ build.commit }}">
- <input type="hidden" name="build_pk" value="{{ build.pk }}">
- </form>
- </div>
- </span>
- {% endif %}
-
</div>
{% if request.user|is_admin:project %}
