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

20 lines
792 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 = StudyGroup.human_attribute_name('members')
.table-responsive
table.table class=(@members.present? ? 'sortable' : '')
thead
tr
th = Exercise.human_attribute_name('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:, object: @study_group)