aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-01-06 11:18:05 +0000
committerChristopher Baines <mail@cbaines.net>2019-01-06 11:18:05 +0000
commit1c097bf9041939b286c1d2f764f65bcf017cd117 (patch)
tree61b0cc6510503ac80948882c74a420a327dd510b /app/views
parent9d3799ccefc4c9a546132f085dd9980a2cc9b7b6 (diff)
downloadgovuk-mini-environment-admin-1c097bf9041939b286c1d2f764f65bcf017cd117.tar
govuk-mini-environment-admin-1c097bf9041939b286c1d2f764f65bcf017cd117.tar.gz
Support archiving govuk-guix revisions
Diffstat (limited to 'app/views')
-rw-r--r--app/views/govuk_guix/revisions/show.html.erb21
-rw-r--r--app/views/setup/show.html.erb1
2 files changed, 21 insertions, 1 deletions
diff --git a/app/views/govuk_guix/revisions/show.html.erb b/app/views/govuk_guix/revisions/show.html.erb
index d2ab03f..f59b343 100644
--- a/app/views/govuk_guix/revisions/show.html.erb
+++ b/app/views/govuk_guix/revisions/show.html.erb
@@ -31,7 +31,26 @@ License along with the GOV.UK Mini Environment Admin. If not, see
<div class="row">
<div class="col-md-8">
<h2>Store path</h2>
- <pre><%= @revision.store_path %></pre>
+ <% if @revision.archived? %>
+ <del>
+ <pre><%= @revision.store_path %></pre>
+ </del>
+ (Archived)
+ <% else %>
+ <pre><%= @revision.store_path %></pre>
+
+ <%= form_with(
+ url: govuk_guix_revision_path(@revision),
+ local: true,
+ method: "delete"
+ ) do %>
+ <%= submit_tag('Archive',
+ role: 'button',
+ style: 'margin-bottom: 5px;',
+ class: 'btn btn-lg btn-danger btn-block')
+ %>
+ <% end %>
+ <% end %>
</div>
</div>
diff --git a/app/views/setup/show.html.erb b/app/views/setup/show.html.erb
index 01b1f32..2eb7402 100644
--- a/app/views/setup/show.html.erb
+++ b/app/views/setup/show.html.erb
@@ -109,6 +109,7 @@ License along with the GOV.UK Mini Environment Admin. If not, see
<%= revision.commit_hash %>
</span>
+ <% if revision.archived? %>(Archived)<% end %>
<%= revision.created_at %>
</a>
<% end %>