5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 16:36:22 +00:00

Solo cambiar el diseño si es un skel

This commit is contained in:
f 2021-09-11 17:28:35 -03:00
parent b44e49194b
commit 827f44e2a6

View file

@ -44,36 +44,37 @@
.invalid-feedback= site.errors.messages[:description].join(', ') .invalid-feedback= site.errors.messages[:description].join(', ')
%hr/ %hr/
.form-group#design_id - if site.new_record? || site.skel?
%h2= t('.design.title') .form-group#design_id
%p.lead= t('.help.design') %h2= t('.design.title')
- if invalid? site, :design_id %p.lead= t('.help.design')
.alert.alert-info - if invalid? site, :design_id
= t('activerecord.errors.models.site.attributes.design_id.layout_incompatible.help', .alert.alert-info
layouts: site.incompatible_layouts.to_sentence) = t('activerecord.errors.models.site.attributes.design_id.layout_incompatible.help',
.row.designs layouts: site.incompatible_layouts.to_sentence)
-# Demasiado complejo para un f.collection_radio_buttons .row.designs
- Design.all.find_each do |design| -# Demasiado complejo para un f.collection_radio_buttons
.design.col-md-4.d-flex.flex-column - Design.all.find_each do |design|
.custom-control.custom-radio .design.col-md-4.d-flex.flex-column
= f.radio_button :design_id, design.id, .custom-control.custom-radio
checked: design.id == site.design_id, = f.radio_button :design_id, design.id,
disabled: design.disabled, checked: design.id == site.design_id,
required: true, class: 'custom-control-input' disabled: design.disabled,
= f.label "design_id_#{design.id}", design.name, required: true, class: 'custom-control-input'
class: 'custom-control-label' = f.label "design_id_#{design.id}", design.name,
.flex-fill class: 'custom-control-label'
= sanitize_markdown design.description, .flex-fill
tags: %w[p a strong em] = sanitize_markdown design.description,
tags: %w[p a strong em]
.btn-group{ role: 'group', 'aria-label': t('.design.actions') } .btn-group{ role: 'group', 'aria-label': t('.design.actions') }
- if design.url - if design.url
= link_to t('.design.url'), design.url, = link_to t('.design.url'), design.url,
target: '_blank', class: 'btn' target: '_blank', class: 'btn'
- if design.license - if design.license
= link_to t('.design.license'), design.license, = link_to t('.design.license'), design.license,
target: '_blank', class: 'btn' target: '_blank', class: 'btn'
%hr/ %hr/
.form-group.licenses#license_id .form-group.licenses#license_id
%h2= t('.licencia.title') %h2= t('.licencia.title')