1
0
Fork 0
dokkan-data-rails/app/views/admin/cards/_form.html.slim

87 lines
2.6 KiB
Text

= simple_form_for [:admin, @card] do |f|
.form-inputs
.row
.col-md-4
= f.input :gameid, label: 'Game ID Number'
.col-md-4
= f.input :title
.col-md-4
= f.association :character
.row
.col-md-4
= f.association :rarity
.col-md-4
= f.association :type
.col-md-4
= f.association :awaken_type
.row
.col-md-6
= f.association :leader_skill, label_method: :description
.col-md-6
= f.association :passive_skill
.row
.col-md-12
= f.association :super_attack, label_method: :full
.row
.col-md-6
= f.association :dokkan_card, collection: Card.includes(:character).all, label_method: :full_name
.row
.col-md-12
= f.label 'Health Points'
.row
= f.simple_fields_for :hp_stat do |h|
.col-md-3
= h.input :min
.col-md-3
= h.input :max
.col-md-3
= h.input :awaken_min
.col-md-3
= h.input :awaken_max
.row
.col-md-12
= f.label 'Attack'
.row
= f.simple_fields_for :atk_stat do |a|
.col-md-3
= a.input :min
.col-md-3
= a.input :max
.col-md-3
= a.input :awaken_min
.col-md-3
= a.input :awaken_max
.row
.col-md-12
= f.label 'Defense'
.row
= f.simple_fields_for :def_stat do |d|
.col-md-3
= d.input :min
.col-md-3
= d.input :max
.col-md-3
= d.input :awaken_min
.col-md-3
= d.input :awaken_max
.row
.col-md-12
= f.label :links
div
= f.association :links, as: :check_boxes, item_wrapper_tag: nil, item_label_class: 'checkbox-inline', label: false
.row
.col-md-12
= f.label :evidences
- unless @card.new_record?
div
span Current
= f.association :evidences, as: :check_boxes, collection: Evidence.for(@card), item_wrapper_tag: nil, item_label_class: 'checkbox-inline', label: false, label_method: lambda { |evidence| evidence_checkbox_label(evidence) }
div
span Unused
= f.association :evidences, as: :check_boxes, collection: Evidence.unused, item_wrapper_tag: nil, item_label_class: 'checkbox-inline', label: false, label_method: lambda { |evidence| evidence_checkbox_label(evidence) }
.row
.col-md-12
= f.label 'Verification'
= f.input :verified, as: :boolean, item_wrapper_tag: nil, item_label_class: 'checkbox-inline'
.form-actions
= f.button :button