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

23 lines
1.1 KiB
Plaintext

h1 = ErrorTemplate.model_name.human(count: :other)
.table-responsive
table.table class=(@error_templates.present? ? 'sortable' : '')
thead
tr
th = ErrorTemplate.human_attribute_name('name')
th = ErrorTemplate.human_attribute_name('description')
th = Exercise.human_attribute_name('execution_environment')
th colspan=3 = t('shared.actions')
tbody
- @error_templates.each do |error_template|
tr
td = link_to_if(policy(error_template).show?, error_template.name, error_template)
td = error_template.description
td = link_to(error_template.execution_environment)
td = link_to(t('shared.show'), error_template) if policy(error_template).show?
td = link_to(t('shared.edit'), edit_error_template_path(error_template)) if policy(error_template).edit?
td = link_to(t('shared.destroy'), error_template, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(error_template).destroy?
= render('shared/pagination', collection: @error_templates)
p = render('shared/new_button', model: ErrorTemplate)