Lint Slim files and fix offenses

The fixing was partially done manually and partially automatically.
This commit is contained in:
Sebastian Serth
2024-04-13 20:06:03 +02:00
committed by Dominic Sauer
parent ddfa06ffaa
commit 9a9efd5caa
91 changed files with 378 additions and 392 deletions

View File

@ -8,7 +8,7 @@
.col-md-6
.input-group.mb-3
= f.text_field(:programming_partner_ids, class: 'form-control', required: true, value: (@programming_group.programming_partner_ids - [current_user.id_with_type]).join(', '))
= render('shared/submit_button', f: f, object: @programming_group)
= render('shared/submit_button', f:, object: @programming_group)
/.help-block.form-text = t('.hints.programming_partner_ids')
.col-md-6
.join_programming_pair.button.btn.btn-primary.d-none.d-md-block

View File

@ -3,7 +3,7 @@
h3 = t('activerecord.attributes.programming_group.member')
.table-responsive
table.table class="#{@members.present? ? 'sortable' : ''}"
table.table class=(@members.present? ? 'sortable' : '')
thead
tr
th = t('activerecord.attributes.exercise.selection')
@ -13,4 +13,4 @@
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: @programming_group)
.actions = render('shared/submit_button', f:, object: @programming_group)

View File

@ -14,7 +14,7 @@
h1 = "#{ProgrammingGroup.model_name.human(count: 2)} for Exercise '#{@exercise.title}'"
.table-responsive
table.table.mt-4 class="#{@programming_groups.present? ? 'sortable' : ''}"
table.table.mt-4 class=(@programming_groups.present? ? 'sortable' : '')
thead
tr
th.sortable_nosort = sort_link(@search, :id, t('activerecord.attributes.programming_group.name'))
@ -33,11 +33,11 @@
tr
td = link_to_if(policy(programming_group).show?, programming_group.displayname, programming_group)
- if params[:exercise_id].blank?
td = link_to_if(policy(programming_group.exercise).show?, programming_group.exercise.title, programming_group.exercise, 'data-turbolinks' => "false")
td == programming_group.users.map { |user| link_to_if(policy(user).show?, user.name, user) }.join(', ')
td = link_to_if(policy(programming_group.exercise).show?, programming_group.exercise.title, programming_group.exercise, 'data-turbolinks': 'false')
td == programming_group.users.map {|user| link_to_if(policy(user).show?, user.name, user) }.join(', ')
td = programming_group.users.size
td = l(programming_group.created_at, format: :short)
td = link_to(t('shared.show'), programming_group) if policy(programming_group).show?
td = link_to(t('shared.edit'), edit_programming_group_path(programming_group)) if policy(programming_group).edit?
td = link_to(t('shared.destroy'), programming_group, data: { confirm: t('shared.confirm_destroy') }, method: :delete) if policy(programming_group).destroy?
td = link_to(t('shared.destroy'), programming_group, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(programming_group).destroy?
= render('shared/pagination', collection: @programming_groups)

View File

@ -15,7 +15,6 @@ h1.d-inline-block = t('programming_groups.new.create_programming_pair')
h5 = t('programming_groups.new.work_with_a_friend')
p = t('programming_groups.new.enter_partner_id', exercise_title: @exercise.title)
=> t('programming_groups.new.own_user_id')
b = current_user.id_with_type
.d-md-none

View File

@ -10,10 +10,10 @@ h1
h2.mt-4 = t('activerecord.attributes.study_group.members')
.table-responsive
table.table class="#{@programming_group.users.present? ? 'sortable' : ''}"
table.table class=(@programming_group.users.present? ? 'sortable' : '')
thead
tr
th = t('navigation.sections.contributors')
th = t('navigation.sections.contributors')
- @programming_group.users.each do |user|
tr
td = link_to_if(policy(user).show?, user.displayname, user)