From d89f324f8fafd43fcad3c6072e5fd6f0a732e70d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sun, 24 Jun 2018 13:55:37 +0100 Subject: Add a couple of buttons to speed up service selection --- app/views/mini_environments/services.html.erb | 119 ++++++++++++++++---------- 1 file changed, 72 insertions(+), 47 deletions(-) diff --git a/app/views/mini_environments/services.html.erb b/app/views/mini_environments/services.html.erb index 89c3f7c..7c6fb51 100644 --- a/app/views/mini_environments/services.html.erb +++ b/app/views/mini_environments/services.html.erb @@ -117,55 +117,68 @@ License along with the GOV.UK Mini Environment Admin. If not, see - <% ( - @mini_environment.govuk_guix_revision.available_services || [] - ).each do |group| %> -

<%= group["name"] %>

-

<%= group["description"] %>

- - - - - - - - - - - <% group["services"].each do |service| %> + + +

Services

+ +
+ <% ( + @mini_environment.govuk_guix_revision.available_services || [] + ).each do |group| %> +

<%= group["name"] %>

+

<%= group["description"] %>

+ +
Select?ServicePackage
+ - - - - - <% package = service["package"] %> - - - + + + - <% end %> - -
- -selected" - <%= 'checked' if MiniEnvironmentsController::DEFAULT_SERVICES.include? service["name"] %>> - - <%= service["name"] %> -
- <%= service["description"] %> -
- -revision" - class="form-control" - placeholder="<%= package["version"] %>" - value="<%= package["version"] %>"> - - "> - [homepage] - - Select?ServicePackage
- <% end %> + + + <% group["services"].each do |service| %> + <% default = MiniEnvironmentsController::DEFAULT_SERVICES.include? service["name"] %> + + + -selected" + <%= 'data-default' if default %> + <%= 'checked' if default %>> + + + + <%= service["name"] %> +
+ <%= service["description"] %> + + + <% package = service["package"] %> + + -revision" + class="form-control" + placeholder="<%= package["version"] %>" + value="<%= package["version"] %>"> + + + + "> + [homepage] + + + + <% end %> + + + <% end %> +
@@ -175,3 +188,15 @@ License along with the GOV.UK Mini Environment Admin. If not, see
<% end %> + + -- cgit v1.2.3