Files
codeocean/app/views/exercise_collections/index.html.slim
2024-05-21 19:42:26 +02:00

26 lines
1.2 KiB
Plaintext

h1 = ExerciseCollection.model_name.human(count: :other)
.table-responsive
table.table
thead
tr
th = ExerciseCollection.human_attribute_name('id')
th = ExerciseCollection.human_attribute_name('name')
th = ExerciseCollection.human_attribute_name('updated_at')
th = ExerciseCollection.human_attribute_name('exercises')
th colspan=4 = t('shared.actions')
tbody
- @exercise_collections.each do |collection|
tr
td = collection.id
td = link_to_if(policy(collection).show?, collection.name, collection)
td = collection.updated_at
td = collection.exercises.size
td = link_to(t('shared.show'), collection) if policy(collection).show?
td = link_to(t('shared.edit'), edit_exercise_collection_path(collection)) if policy(collection).edit?
td = link_to(t('shared.statistics'), statistics_exercise_collection_path(collection)) if policy(collection).statistics?
td = link_to(t('shared.destroy'), collection, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(collection).destroy?
= render('shared/pagination', collection: @exercise_collections)
p = render('shared/new_button', model: ExerciseCollection)