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

21 lines
929 B
Plaintext

.table-responsive
table.table.mt-4
thead
tr
th = StudyGroup.human_attribute_name('name')
th = StudyGroup.human_attribute_name('external_id')
th = StudyGroup.human_attribute_name('consumer')
th = StudyGroup.human_attribute_name('member_count')
th colspan=3 = t('shared.actions')
tbody
- study_groups.each do |group|
tr
td = link_to_if(policy(group).show?, group.to_s, group)
td
code = group.external_id
td = link_to_if(policy(group.consumer).show?, group.consumer, group.consumer)
td = group.user_count
td = link_to(t('shared.show'), group) if policy(group).show?
td = link_to(t('shared.edit'), edit_study_group_path(group)) if policy(group).edit?
td = link_to(t('shared.destroy'), group, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(group).destroy?