From b0ae8e66e7ffc750ef6860fe8b640fc6338806bd Mon Sep 17 00:00:00 2001 From: f Date: Tue, 31 Mar 2020 18:30:09 -0300 Subject: [PATCH] =?UTF-8?q?grilla=20de=20dise=C3=B1os=20closes=20#139?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/application.scss | 10 ++++++++++ app/views/sites/_form.haml | 18 ++++++++++-------- config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index bfe5e24c..633aa3b6 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -262,3 +262,13 @@ svg { height: 1rem; } } + +.custom-control-label { + font-weight: bold; +} + +.designs { + .design { + margin-top: 1rem; + } +} diff --git a/app/views/sites/_form.haml b/app/views/sites/_form.haml index b46f51a5..eedcd7cd 100644 --- a/app/views/sites/_form.haml +++ b/app/views/sites/_form.haml @@ -36,18 +36,20 @@ .form-group %h2= t('.design.title') %p.lead= t('.help.design') - .row + .row.designs -# Demasiado complejo para un f.collection_radio_buttons - - Design.all.each do |design| - .col-md-4 - %h3 + - Design.all.find_each do |design| + .design.col-md-4.d-flex.flex-column + .custom-control.custom-radio = f.radio_button :design_id, design.id, checked: design.id == site.design_id, disabled: design.disabled, - required: true - = f.label "design_id_#{design.id}", design.name - = sanitize_markdown design.description, - tags: %w[p a strong em] + required: true, class: 'custom-control-input' + = f.label "design_id_#{design.id}", design.name, + class: 'custom-control-label' + .flex-fill + = sanitize_markdown design.description, + tags: %w[p a strong em] .btn-group{ role: 'group', 'aria-label': t('.design.actions') } - if design.url diff --git a/config/locales/en.yml b/config/locales/en.yml index 54022396..20b6aaf6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -317,7 +317,7 @@ en: title: 'Design' actions: 'Information about this design' url: 'Demo' - licencia: 'Read the license' + licencia: 'License' licencia: title: 'License for the site and everything published on it' url: 'Read the license' diff --git a/config/locales/es.yml b/config/locales/es.yml index 816f5b0b..7b7cdace 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -325,7 +325,7 @@ es: title: 'Diseño' actions: 'Información sobre este diseño' url: 'Demostración' - license: 'Leer la licencia' + license: 'Licencia' licencia: title: 'Licencia del sitio y todo lo publicado' url: 'Leer la licencia'