app/views/backups/index.html.erb
<%= render "apps/heading", app: @app, tab: "backups" %>
<% unless @app.backups_enabled? %>
<div class="message is-warning">
<h4 class="message-header">Warning!</h4>
<p class="message-body">You currently don't have backups enabled. We strongly recommend you do so!</p>
</div>
<% end %>
<div class="columns">
<div class="column is-8">
<table class="table is-striped domains">
<thead>
<tr>
<th>Service</th>
<th>Backup date</th>
<th>Type</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
<%= render(@backups) || render("no_backups") %>
</tbody>
</table>
<%= paginate @backups %>
</div>
<div data-role="form" class="column is-4">
<div class="box">
<h3 class="title">Actions</h3>
<div class="panel-body">
<% if @app.backups_enabled? %>
<%= link_to "Run backup now", server_app_backups_path, method: :post,
class: "btn btn-success btn-block" %>
<% else %>
<%= link_to "Enable backups", enable_server_app_backups_path, method: :post,
class: "button is-primary is-fullwidth" %>
<% end %>
</div>
</div>
</div>
</div>