Replace manual activerecord translations with helpers

This commit is contained in:
Sebastian Serth
2024-04-14 14:00:51 +02:00
committed by Sebastian Serth
parent e551c8a699
commit f8330b39fb
72 changed files with 265 additions and 264 deletions

View File

@@ -1,14 +1,14 @@
= form_for(@exercise_collection, multipart: true) do |f|
= render('shared/form_errors', object: @exercise_collection)
.mb-3
= f.label(t('activerecord.attributes.exercise_collections.name'), class: 'form-label')
= f.label(:name, class: 'form-label')
= f.text_field(:name, class: 'form-control', required: true)
.form-check.mb-3
label.form-check-label
= f.check_box(:use_anomaly_detection, class: 'form-check-input')
= t('activerecord.attributes.exercise_collections.use_anomaly_detection')
= f.label(:use_anomaly_detection, class: 'form-label mb-0')
.mb-3
= f.label(t('activerecord.attributes.exercise_collections.user'), class: 'form-label')
= f.label(:user, class: 'form-label')
= f.collection_select(:user_id, InternalUser.order(:name), :id, :name, {}, {class: 'form-control'})
.table-responsive#exercise-list
@@ -16,7 +16,7 @@
thead
tr
th
th = t('activerecord.attributes.exercise_collection_item.exercise')
th = ExerciseCollectionItem.human_attribute_name('exercise')
th colspan=2 = t('shared.actions')
tbody#sortable
- @exercise_collection.items.order(:position).each do |item|