From 8667215a2ada4172845e5ec9fb6f7fb888b58e2d Mon Sep 17 00:00:00 2001 From: f Date: Tue, 11 Feb 2020 14:41:57 -0300 Subject: [PATCH] dar menos opciones al crear el sitio #80 --- app/views/sites/_form.haml | 20 +++++++++++++------- app/views/sites/edit.haml | 4 ++-- app/views/sites/new.haml | 5 +++-- config/locales/es.yml | 1 + 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index 60e5a8d..18814dc 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -86,14 +86,20 @@ %hr/ - .form-group - %h2= t('.deploys.title') - %p.lead= t('.help.deploys') - + - unless site.persisted? = f.fields_for :deploys do |deploy| - = render "deploys/#{deploy.object.type.underscore}", - deploy: deploy, site: site - %hr/ + - next unless deploy.object.kind_of? DeployLocal + = deploy.hidden_field :type + + - else + .form-group + %h2= t('.deploys.title') + %p.lead= t('.help.deploys') + + = f.fields_for :deploys do |deploy| + = render "deploys/#{deploy.object.type.underscore}", + deploy: deploy, site: site + %hr/ .form-group = f.submit submit, class: 'btn btn-lg btn-block' diff --git a/app/views/sites/edit.haml b/app/views/sites/edit.haml index 7edbb05..cc5977c 100644 --- a/app/views/sites/edit.haml +++ b/app/views/sites/edit.haml @@ -1,8 +1,8 @@ = render 'layouts/breadcrumb', crumbs: [link_to(t('sites.index.title'), sites_path), t('.title', site: @site.name)] -.row - .col +.row.justify-content-center + .col-md-8 %h1= t('.title', site: @site.name) = render 'form', site: @site, submit: t('.submit') diff --git a/app/views/sites/new.haml b/app/views/sites/new.haml index f4efbea..fa72442 100644 --- a/app/views/sites/new.haml +++ b/app/views/sites/new.haml @@ -1,8 +1,9 @@ = render 'layouts/breadcrumb', crumbs: [link_to(t('sites.index.title'), sites_path), t('.title')] -.row - .col +.row.justify-content-center + .col-md-8 %h1= t('.title') + %p.lead= t('.help') = render 'form', site: @site, submit: t('.submit') diff --git a/config/locales/es.yml b/config/locales/es.yml index fd15d75..163f3f3 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -284,6 +284,7 @@ es: new: title: 'Crear un sitio' submit: 'Crear sitio' + help: 'Podrás editar estas opciones más adelante en la configuración del sitio.' edit: title: 'Editar %{site}' submit: 'Guardar cambios'