Files
codeocean/app/views/study_groups/_form.html.slim
Sebastian Serth a99da79550 Disable sorttable on tables without rows
Otherwise, the first element of the table body is being fetched which might result in an error for empty tables.

Fixes CODEOCEAN-JZ
2023-03-14 18:27:38 +01:00

20 lines
808 B
Plaintext

= form_for(@study_group) do |f|
= render('shared/form_errors', object: @study_group)
.mb-3
= f.label(:name, class: 'form-label')
= f.text_field(:name, class: 'form-control', required: true)
h3 = t('activerecord.attributes.study_group.members')
.table-responsive
table.table class="#{@members.present? ? 'sortable' : ''}"
thead
tr
th = t('activerecord.attributes.exercise.selection')
th = t('navigation.sections.users')
= collection_check_boxes :study_group, :study_group_membership_ids, @members, :id, :id do |b|
tr
td = b.check_box class: 'form-check-input'
td = link_to_if(policy(b.object.user).show?, b.object.user.displayname, b.object.user)
.actions = render('shared/submit_button', f: f, object: @study_group)