Lint Slim files and fix offenses
The fixing was partially done manually and partially automatically.
This commit is contained in:

committed by
Dominic Sauer

parent
ddfa06ffaa
commit
9a9efd5caa
@ -5,7 +5,7 @@
|
||||
= f.text_field(:name, class: 'form-control', required: true)
|
||||
.mb-3
|
||||
= f.label(:execution_environment_id, class: 'form-label')
|
||||
= f.collection_select(:execution_environment_id, ExecutionEnvironment.all.order(:name), :id, :name, {include_blank: false}, class: 'form-control')
|
||||
= f.collection_select(:execution_environment_id, ExecutionEnvironment.order(:name), :id, :name, {include_blank: false}, class: 'form-control')
|
||||
.mb-3
|
||||
= f.label(:signature, class: 'form-label')
|
||||
= f.text_field(:signature, class: 'form-control')
|
||||
@ -17,4 +17,4 @@
|
||||
= f.label(:hint, class: 'form-label')
|
||||
= f.text_field(:hint, class: 'form-control')
|
||||
.help-block.form-text == t('error_templates.hints.hint_templates')
|
||||
.actions = render('shared/submit_button', f: f, object: @error_template)
|
||||
.actions = render('shared/submit_button', f:, object: @error_template)
|
||||
|
@ -1,7 +1,7 @@
|
||||
h1 = ErrorTemplate.model_name.human(count: 2)
|
||||
|
||||
.table-responsive
|
||||
table.table class="#{@error_templates.present? ? 'sortable' : ''}"
|
||||
table.table class=(@error_templates.present? ? 'sortable' : '')
|
||||
thead
|
||||
tr
|
||||
th = t('activerecord.attributes.error_template.name')
|
||||
|
@ -4,16 +4,16 @@ h1
|
||||
|
||||
= row(label: 'error_template.name', value: @error_template.name)
|
||||
= row(label: 'exercise.execution_environment', value: link_to_if(policy(@error_template.execution_environment).show?, @error_template.execution_environment))
|
||||
= row(label: "error_template.signature") do
|
||||
= row(label: 'error_template.signature') do
|
||||
code = @error_template.signature
|
||||
- [:description, :hint].each do |attribute|
|
||||
- %i[description hint].each do |attribute|
|
||||
= row(label: "error_template.#{attribute}", value: @error_template.send(attribute))
|
||||
|
||||
h2.mt-4
|
||||
= t 'error_templates.attributes'
|
||||
|
||||
.table-responsive
|
||||
table.table class="#{@error_template.error_template_attributes.present? ? 'sortable' : ''}"
|
||||
table.table class=(@error_template.error_template_attributes.present? ? 'sortable' : '')
|
||||
thead
|
||||
tr
|
||||
th
|
||||
@ -26,16 +26,16 @@ h2.mt-4
|
||||
tr
|
||||
td
|
||||
- if attribute.important
|
||||
span class="fa-solid fa-star" aria-hidden="true"
|
||||
span.fa-solid.fa-star aria-hidden='true'
|
||||
- else
|
||||
span class="fa-regular fa-star" aria-hidden="true"
|
||||
span.fa-regular.fa-star aria-hidden='true'
|
||||
td = link_to_if(policy(attribute).show?, attribute.key, attribute)
|
||||
td = attribute.description
|
||||
td
|
||||
code = attribute.regex
|
||||
td = link_to(t('shared.show'), attribute) if policy(attribute).show?
|
||||
td = link_to(t('shared.edit'), edit_error_template_attribute_path(attribute)) if policy(attribute).edit?
|
||||
td = link_to(t('shared.destroy'), attribute_error_template_url(:error_template_attribute_id => attribute.id), :method => :delete) if policy(attribute).destroy?
|
||||
td = link_to(t('shared.destroy'), attribute_error_template_url(error_template_attribute_id: attribute.id), method: :delete) if policy(attribute).destroy?
|
||||
|
||||
#add-attribute
|
||||
= collection_select({}, :error_template_attribute_id,
|
||||
|
Reference in New Issue
Block a user