Replace manual activerecord translations with helpers
This commit is contained in:

committed by
Sebastian Serth

parent
e551c8a699
commit
f8330b39fb
@@ -2,20 +2,20 @@ h1
|
||||
= @exercise_collection
|
||||
= render('shared/edit_button', object: @exercise_collection)
|
||||
|
||||
= row(label: 'exercise_collections.name', value: @exercise_collection.name)
|
||||
= row(label: 'exercise_collections.user', value: link_to_if(policy(@exercise_collection.user).show?, @exercise_collection.user.displayname, @exercise_collection.user)) unless @exercise_collection.user.nil?
|
||||
= row(label: 'exercise_collections.use_anomaly_detection', value: @exercise_collection.use_anomaly_detection)
|
||||
= row(label: 'exercise_collections.updated_at', value: @exercise_collection.updated_at)
|
||||
= row(label: 'exercise_collection.name', value: @exercise_collection.name)
|
||||
= row(label: 'exercise_collection.user', value: link_to_if(policy(@exercise_collection.user).show?, @exercise_collection.user.displayname, @exercise_collection.user)) unless @exercise_collection.user.nil?
|
||||
= row(label: 'exercise_collection.use_anomaly_detection', value: @exercise_collection.use_anomaly_detection)
|
||||
= row(label: 'exercise_collection.updated_at', value: @exercise_collection.updated_at)
|
||||
|
||||
h4.mt-4 = t('activerecord.attributes.exercise_collections.exercises')
|
||||
h4.mt-4 = ExerciseCollection.human_attribute_name('exercises')
|
||||
.table-responsive#exercise-list
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th = '#'
|
||||
th = t('activerecord.attributes.exercise.title')
|
||||
th = t('activerecord.attributes.exercise.execution_environment')
|
||||
th = t('activerecord.attributes.exercise.user')
|
||||
th = Exercise.human_attribute_name('title')
|
||||
th = Exercise.human_attribute_name('execution_environment')
|
||||
th = Exercise.human_attribute_name('user')
|
||||
th = t('shared.actions')
|
||||
tbody
|
||||
- @exercise_collection.items.sort_by(&:position).each do |exercise_collection_item|
|
||||
|
Reference in New Issue
Block a user