#wid-id-8.jarviswidget{"data-widget-custombutton" => "false", "data-widget-editbutton" => "false", :id => "wid-id-0", 'data-widget-colorbutton' => true} %header %span.widget-icon %i.fa.fa-edit %h2 Сериалы / widget div %div / widget edit box .jarviswidget-editbox / This area used as dropdown edit box / end widget edit box / widget content .widget-body.no-padding = nested_form_for(category, :html => {:class => 'smart-form'}) do |f| %table.table.table-bordered.margin-10.table-serials{style: 'width: 500px;'} %thead %tr %th Название сериала %th на языке %tbody - categories_with_locales.each_with_index do |arr, index| - locale = arr[0] - title = arr[1] - if index >= 2 - hide_class = "hidden-categories-inputs" %tr{class: hide_class} %td - if f.object.persisted? = text_field_tag "name[#{locale}]", f.object.name_with_locale(locale), class: 'input-xs', style: 'width: 90%;' - else = text_field_tag "name[#{locale}]", nil, class: 'input-xs', style: 'width: 90%;' %td = locale = link_to "Остальные языки для сериалов", "#", id: 'show-categories-inputs', class: 'margin-10 btn btn-for-link btn-link' = f.link_to_add 'Добавить сезон', :seasons, class: 'margin-10 btn btn-for-link btn-primary' = f.fields_for :seasons do |season_form| = season_form.hidden_field :id %table.table.table-bordered.margin-10{style: 'width: 500px;'} %thead %tr %th Название сезона %th на языке %tbody - categories_with_locales.each_with_index do |arr, index| - locale = arr[0] - title = arr[1] - if index >= 2 - hide_class = "hidden-seasons-inputs" %tr{class: hide_class} %td - if season_form.object.persisted? = text_field_tag "#{season_form.object_name}[title][#{locale}]]", season_form.object.name_with_locale(locale), class: 'input-xs', style: 'width: 90%;' - else = text_field_tag "#{season_form.object_name}[title][#{locale}]]", nil, class: 'input-xs', style: 'width: 90%;' %td = locale = link_to "Остальные языки для сезонов", "#", class: 'show-seasons-inputs margin-10 btn btn-for-link btn-link' = season_form.link_to_remove 'Удалить сезон', class: 'margin-10 btn btn-for-link btn-danger' %footer = f.submit 'Сохранить', class: 'btn btn-primary'