- exercises = Exercise.order(:title) - users = InternalUser.order(:name) = form_for(@exercise_collection, multipart: true) do |f| = render('shared/form_errors', object: @exercise_collection) .form-group = f.label(t('activerecord.attributes.exercise_collections.name')) = f.text_field(:name, class: 'form-control', required: true) .form-group = f.label(t('activerecord.attributes.exercise_collections.use_anomaly_detection')) = f.check_box(:use_anomaly_detection, {class: 'form-control'}) .form-group = f.label(t('activerecord.attributes.exercise_collections.user')) = f.collection_select(:user_id, users, :id, :name, {}, {class: 'form-control'}) .form-group = f.label(t('activerecord.attributes.exercise_collections.exercises')) = f.collection_select(:exercise_ids, exercises, :id, :title, {}, {class: 'form-control', multiple: true}) .table-responsive#exercise-list table.table thead tr th th = t('activerecord.attributes.exercise_collection_item.exercise') th = t('activerecord.attributes.exercise.user') th colspan=2 = t('shared.actions') tbody#sortable - @exercise_collection.items.order(:position).each do |item| tr td span.fa.fa-bars td = item.exercise.title td = item.exercise.author td = link_to(t('shared.show'), item.exercise) td a.remove-exercise href="#" = t('shared.destroy') .actions = render('shared/submit_button', f: f, object: @exercise_collection)