5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 04:11:41 +00:00
panel/app/views/sites/_form.haml

60 lines
2 KiB
Text
Raw Normal View History

2019-07-17 22:18:48 +00:00
= form_for site do |f|
2019-07-13 00:20:36 +00:00
.form-group
2019-07-17 22:18:48 +00:00
%h2= f.label :name
%p.lead= t('.help.name')
2019-07-13 00:20:36 +00:00
= f.text_field :name, class: 'form-control'
2019-07-17 22:18:48 +00:00
.form-group
%h2= t('.design.title')
%p.lead= t('.help.design')
.row
-# Demasiado complejo para un f.collection_radio_buttons
- Design.all.each do |design|
.col
%h3
= f.radio_button :design_id, design.id,
checked: design.id == site.design_id,
disabled: design.disabled
= f.label "design_id_#{design.id}", design.name
= sanitize_markdown design.description,
tags: %w[p a strong em]
.btn-group{ role: 'group', 'aria-label': t('.design.actions') }
- if design.url
= link_to t('.design.url'), design.url,
target: '_blank', class: 'btn btn-info'
- if design.license
= link_to t('.design.license'), design.license,
target: '_blank', class: 'btn btn-info'
2019-07-20 00:33:10 +00:00
.form-group
%h2= t('.licencia.title')
%p.lead= t('.help.licencia')
- Licencia.all.each do |licencia|
.row
.col
%h3
= f.radio_button :licencia_id, licencia.id,
checked: licencia.id == site.licencia_id
= f.label "licencia_id_#{licencia.id}" do
= image_tag licencia.icons, alt: licencia.name
= licencia.name
= sanitize_markdown licencia.description,
tags: %w[p a strong em ul ol li h1 h2 h3 h4 h5 h6]
.btn-group{ role: 'group', 'aria-label': t('.licencia.actions') }
= link_to t('.licencia.url'), licencia.url,
target: '_blank', class: 'btn btn-info'
%hr/
.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/
2019-07-13 00:20:36 +00:00
.form-group
= f.submit submit, class: 'btn btn-success'