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
@@ -1,16 +1,16 @@
|
||||
- tip = exercise_tip.tip
|
||||
- index = exercise_tip_counter + 1
|
||||
.card class="#{exercise_tip.parent_exercise_tip_id? || exercise_tip.rank != 1 ? 'mt-2' : ''}"
|
||||
.card-header.p-2 id="tip-heading-#{exercise_tip.id}" role="tab"
|
||||
.card class=(exercise_tip.parent_exercise_tip_id? || exercise_tip.rank != 1 ? 'mt-2' : '')
|
||||
.card-header.p-2 id="tip-heading-#{exercise_tip.id}" role='tab'
|
||||
.card-title.mb-0
|
||||
a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded="false" data-bs-parent="#tips" data-bs-toggle="collapse" href="#tip-collapse-#{exercise_tip.id}"
|
||||
.clearfix role="button"
|
||||
i.fa-solid aria-hidden="true"
|
||||
a.collapsed aria-controls="tip-collapse-#{exercise_tip.id}" aria-expanded='false' data-bs-parent='#tips' data-bs-toggle='collapse' href="#tip-collapse-#{exercise_tip.id}"
|
||||
.clearfix role='button'
|
||||
i.fa-solid aria-hidden='true'
|
||||
span
|
||||
= t('activerecord.models.tip.one')
|
||||
=< tip_prefix + index.to_s
|
||||
= ": #{tip.title}" if tip.title?
|
||||
.card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role="tabpanel" data-exercise-tip-id=exercise_tip.id
|
||||
.card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role='tabpanel' data-exercise-tip-id=exercise_tip.id
|
||||
.card-body.p-3
|
||||
- if tip.description?
|
||||
h5
|
||||
@@ -24,4 +24,4 @@
|
||||
= tip.example
|
||||
= render(partial: 'tips/collapsed_card',
|
||||
collection: exercise_tip.children, as: :exercise_tip,
|
||||
locals: { tip_prefix: "#{tip_prefix + index.to_s}." })
|
||||
locals: {tip_prefix: "#{tip_prefix + index.to_s}."})
|
||||
|
@@ -5,17 +5,17 @@
|
||||
= f.text_field(:title, class: 'form-control', required: false)
|
||||
.mb-3
|
||||
= f.label(:description, class: 'form-label')
|
||||
= f.pagedown :description, input_html: { preview: true, rows: 5 }
|
||||
= f.pagedown :description, input_html: {preview: true, rows: 5}
|
||||
.mb-3
|
||||
= f.label(:file_type_id, t('activerecord.attributes.file.file_type_id'), class: 'form-label')
|
||||
= f.collection_select(:file_type_id, @file_types, :id, :name, {include_blank: true}, class: 'form-control')
|
||||
.mb-3
|
||||
= f.label(:example, class: 'form-label')
|
||||
= f.text_area(:example, class: 'code-field form-control', rows: 5, style: "display:none;", required: false)
|
||||
= f.text_area(:example, class: 'code-field form-control', rows: 5, style: 'display:none;', required: false)
|
||||
#editor-edit.original-input data-file-id=@tip.id
|
||||
#frames
|
||||
.edit-frame
|
||||
.editor-content.d-none
|
||||
.editor.allow_ace_tooltip
|
||||
.actions = render('shared/submit_button', f: f, object: @tip)
|
||||
.actions = render('shared/submit_button', f:, object: @tip)
|
||||
.editor
|
||||
|
@@ -4,5 +4,5 @@
|
||||
= tip.to_s
|
||||
a.fa-regular.fa-eye.ms-2 href=tip_path(tip) target='_blank'
|
||||
a.fa-solid.fa-xmark.ms-2.remove-tip href='#'
|
||||
.list-group.nested-sortable-list class="#{exercise_tip.children.present? ? 'mt-3' : ''}"
|
||||
.list-group.nested-sortable-list class=(exercise_tip.children.present? ? 'mt-3' : '')
|
||||
= render(partial: 'tips/sortable_tip', collection: exercise_tip.children, as: :exercise_tip)
|
||||
|
@@ -1,7 +1,7 @@
|
||||
h1 = Tip.model_name.human(count: 2)
|
||||
|
||||
.table-responsive
|
||||
table.table class="#{@tips.present? ? 'sortable' : ''}"
|
||||
table.table class=(@tips.present? ? 'sortable' : '')
|
||||
thead
|
||||
tr
|
||||
th = t('activerecord.attributes.tip.title')
|
||||
@@ -14,7 +14,7 @@ h1 = Tip.model_name.human(count: 2)
|
||||
td = tip.file_type ? link_to_if(policy(tip.file_type).show?, tip.file_type.name, tip.file_type) : ''
|
||||
td = link_to(t('shared.show'), tip) if policy(tip).show?
|
||||
td = link_to(t('shared.edit'), edit_tip_path(tip)) if policy(tip).edit?
|
||||
td = link_to(t('shared.destroy'), tip, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if tip.can_be_destroyed? && policy(tip).destroy?
|
||||
td = link_to(t('shared.destroy'), tip, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if tip.can_be_destroyed? && policy(tip).destroy?
|
||||
|
||||
= render('shared/pagination', collection: @tips)
|
||||
p = render('shared/new_button', model: Tip, path: new_tip_path)
|
||||
|
@@ -11,7 +11,5 @@ h1
|
||||
|
||||
= row(label: 'tip.title', value: @tip.title)
|
||||
= row(label: 'tip.description', value: render_markdown(@tip.description), class: 'm-0')
|
||||
= row(label: 'file.file_type', value: @tip.file_type_id? ? \
|
||||
link_to_if(policy(@tip.file_type).show?, @tip.file_type.name, @tip.file_type) : '')
|
||||
= row(label: 'tip.example', value: @tip.file_type_id? ? \
|
||||
code_tag(@tip.example, @tip.file_type.programming_language) : '')
|
||||
= row(label: 'file.file_type', value: @tip.file_type_id? ? link_to_if(policy(@tip.file_type).show?, @tip.file_type.name, @tip.file_type) : '')
|
||||
= row(label: 'tip.example', value: @tip.file_type_id? ? code_tag(@tip.example, @tip.file_type.programming_language) : '')
|
||||
|
Reference in New Issue
Block a user