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

89 lines
2.6 KiB
Text
Raw Normal View History

2015-10-09 08:17:29 -04:00
= simple_form_for [:admin, @card] do |f|
2015-10-06 13:55:12 -04:00
.form-inputs
.row
.col-md-4
= f.input :gameid, label: 'Game ID Number'
.col-md-4
2015-10-08 12:40:31 -04:00
= f.input :title
2015-10-06 13:55:12 -04:00
.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
2015-10-08 11:00:55 -04:00
= f.association :leader_skill, label_method: :description
.row
.col-md-12
= f.association :passive_skill, label_method: :full
2015-10-06 13:55:12 -04:00
.row
.col-md-12
2015-10-08 13:02:25 -04:00
= f.association :super_attack, label_method: :full
2015-10-08 11:45:05 -04:00
.row
.col-md-6
2015-10-08 13:02:25 -04:00
= f.association :dokkan_card, collection: Card.includes(:character).all, label_method: :full_name
2015-10-20 17:39:36 -04:00
.row
.col-md-12
= f.label 'Health Points'
.row
2015-10-21 09:27:49 -04:00
= f.simple_fields_for :hp_stat do |h|
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= h.input :min
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= h.input :max
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= h.input :awaken_min
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= h.input :awaken_max
2015-10-20 17:39:36 -04:00
.row
.col-md-12
= f.label 'Attack'
.row
2015-10-21 09:27:49 -04:00
= f.simple_fields_for :atk_stat do |a|
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= a.input :min
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= a.input :max
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= a.input :awaken_min
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= a.input :awaken_max
2015-10-20 17:39:36 -04:00
.row
.col-md-12
= f.label 'Defense'
.row
2015-10-21 09:27:49 -04:00
= f.simple_fields_for :def_stat do |d|
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= d.input :min
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= d.input :max
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= d.input :awaken_min
2015-10-20 17:39:36 -04:00
.col-md-3
2015-10-21 09:27:49 -04:00
= d.input :awaken_max
2015-10-06 13:55:12 -04:00
.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
2015-10-14 11:24:15 -04:00
.row
.col-md-12
2015-10-20 17:39:36 -04:00
= 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) }
2015-10-14 11:24:15 -04:00
div
2015-10-20 17:39:36 -04:00
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) }
2015-10-14 11:20:02 -04:00
.row
.col-md-12
= f.label 'Verification'
= f.input :verified, as: :boolean, item_wrapper_tag: nil, item_label_class: 'checkbox-inline'
2015-10-06 13:55:12 -04:00
.form-actions
= f.button :button