@@ -22,13 +22,13 @@ h1 = Exercise.model_name.human(count: :other)
2222 = Exercise .human_attribute_name(' public' )
2323 - if policy(Exercise ).batch_update?
2424 br
25- span .batch = link_to(t(' shared.batch_update' ), ' #' , ' data- text' : t(' shared.update' , model: Exercise .model_name.human(count: :other )))
25+ span .batch = link_to(t(' shared.batch_update' ), ' #' , data: { text: t(' shared.update' , model: Exercise .model_name.human(count: :other ))} )
2626 th .p-1 colspan =6 = t(' shared.actions' )
2727 tbody
2828 - @exercises .each do |exercise |
2929 tr data-id =exercise.id
3030 td .p-1 .pt-2
31- = link_to_if(policy(exercise).show?, exercise.title, exercise, ' data- turbo' : ' false' )
31+ = link_to_if(policy(exercise).show?, exercise.title, exercise, data: { turbo: false } )
3232 - if exercise.internal_title.present?
3333 p .mb-0 .text-muted
3434 i .fa-solid .fa-arrow-turn-up .fa-rotate-90
@@ -41,19 +41,19 @@ h1 = Exercise.model_name.human(count: :other)
4141 td .p-1 .pt-2 .public data-value =exercise.public? = symbol_for(exercise.public?)
4242 td .p-1 .pt-2 = link_to(t(' shared.edit' ), edit_exercise_path(exercise)) if policy(exercise).edit?
4343 td .p-1 .pt-2 = link_to(t(' .implement' ), implement_exercise_path(exercise)) if policy(exercise).implement?
44- td .p-1 .pt-2 = link_to(t(' shared.statistics' ), statistics_exercise_path(exercise), ' data- turbo' : ' false' ) if policy(exercise).statistics?
44+ td .p-1 .pt-2 = link_to(t(' shared.statistics' ), statistics_exercise_path(exercise), data: { turbo: false } ) if policy(exercise).statistics?
4545
4646 td .p-1
4747 .btn-group
4848 button .btn .btn-outline-primary .btn-sm .dropdown-toggle data-bs-toggle =' dropdown' type =' button' = t(' shared.actions_button' )
4949 ul .dropdown-menu .float-end role =' menu'
50- li = link_to(t(' shared.show' ), exercise, ' data- turbo' : ' false' , class : ' dropdown-item' ) if policy(exercise).show?
50+ li = link_to(t(' shared.show' ), exercise, data: { turbo: false } , class : ' dropdown-item' ) if policy(exercise).show?
5151 li = link_to(UserExerciseFeedback .model_name.human(count: :other ), feedback_exercise_path(exercise), class : ' dropdown-item' ) if policy(exercise).feedback?
5252 li = link_to(RequestForComment .model_name.human(count: :other ), exercise_request_for_comments_path(exercise), class : ' dropdown-item' ) if policy(exercise).rfcs_for_exercise?
5353 li = link_to(ProgrammingGroup .model_name.human(count: :other ), exercise_programming_groups_path(exercise), class : ' dropdown-item' ) if policy(exercise).programming_groups_for_exercise?
5454 li = button_to(t(' shared.destroy' ), exercise, data: {confirm: t(' shared.confirm_destroy' )}, method: :delete , class : ' dropdown-item' ) if policy(exercise).destroy?
5555 li = button_to(t(' .clone' ), clone_exercise_path(exercise), data: {confirm: t(' shared.confirm_destroy' ), turbo: false }, method: :post , class : ' dropdown-item' ) if policy(exercise).clone?
56- li = link_to(t(' exercises.export_codeharbor.label' ), ' ' , class : ' dropdown-item export-start' , data: {' exercise-id ' : exercise.id, ' bs-toggle ' : ' modal' , ' bs-target ' : ' #transfer-modal' }) if policy(exercise).export_external_confirm?
56+ li = link_to(t(' exercises.export_codeharbor.label' ), ' ' , class : ' dropdown-item export-start' , data: {exercise_id : exercise.id, bs_toggle : ' modal' , bs_target : ' #transfer-modal' }) if policy(exercise).export_external_confirm?
5757 li = link_to(t(' exercises.download_proforma.label' ), download_proforma_exercise_path(exercise), class : ' dropdown-item' , target: ' _blank' , rel: ' noopener noreferrer' ) if policy(exercise).download_proforma?
5858
5959= render(' shared/pagination' , collection: @exercises )
0 commit comments