|
14 | 14 | <div class="checkbox"><label> |
15 | 15 | <input id="filterStable" type="checkbox" {{ 'checked' if versioned else '' }}>Only stable releases |
16 | 16 | </label></div> |
17 | | -<div id="delete-dialog" class="modal fade" tabindex="-1"> |
18 | | - <div class="modal-dialog"> |
19 | | - <div class="modal-content"> |
20 | | - <div class="modal-header"> |
21 | | - <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
22 | | - <h4 class="modal-title">Really delete {{ project.name }}?</h4> |
23 | | - </div> |
24 | | - <div class="modal-body"> |
25 | | - <p>This will delete all job logs, artifacts, and GitHub hooks but not |
26 | | - any Docker images or containers.</p> |
27 | | - </div> |
28 | | - <div class="modal-footer"> |
29 | | - <form action="{{ url_for('project_view', slug=project.slug) }}" method="POST"> |
30 | | - <input type="hidden" name="operation" value="delete" /> |
31 | | - <input type="hidden" name="auth_token" value="{{ auth_token_delete.auth_token }}" /> |
32 | | - <input type="hidden" name="expiry" value="{{ auth_token_delete.expiry }}" /> |
| 17 | +{% if current_user.is_authenticated() %} |
| 18 | + <div id="delete-dialog" class="modal fade" tabindex="-1"> |
| 19 | + <div class="modal-dialog"> |
| 20 | + <div class="modal-content"> |
| 21 | + <div class="modal-header"> |
| 22 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 23 | + <h4 class="modal-title">Really delete {{ project.name }}?</h4> |
| 24 | + </div> |
| 25 | + <div class="modal-body"> |
| 26 | + <p>This will delete all job logs, artifacts, and GitHub hooks but not |
| 27 | + any Docker images or containers.</p> |
| 28 | + </div> |
| 29 | + <div class="modal-footer"> |
| 30 | + <form action="{{ url_for('project_view', slug=project.slug) }}" method="POST"> |
| 31 | + <input type="hidden" name="operation" value="delete" /> |
| 32 | + <input type="hidden" name="auth_token" value="{{ auth_token_delete.auth_token }}" /> |
| 33 | + <input type="hidden" name="expiry" value="{{ auth_token_delete.expiry }}" /> |
33 | 34 |
|
34 | | - <button class="btn" data-dismiss="modal">Cancel</button> |
35 | | - <input type="submit" class="btn btn-danger" value="Delete" /> |
36 | | - </form> |
| 35 | + <button class="btn" data-dismiss="modal">Cancel</button> |
| 36 | + <input type="submit" class="btn btn-danger" value="Delete" /> |
| 37 | + </form> |
| 38 | + </div> |
37 | 39 | </div> |
38 | 40 | </div> |
39 | 41 | </div> |
40 | | -</div> |
| 42 | +{% endif %} |
41 | 43 | <table id="jobs-list" class="table table-striped"> |
42 | 44 | <tr><th>Created</th><th>Tag</th><th>Commit ref</th><th>Author</th><th>State</th></tr> |
43 | 45 | {% for job in jobs -%} |
|
0 commit comments