Update Bootstrap from v4 to v5

This commit is contained in:
Sebastian Serth
2022-08-11 19:10:49 +02:00
parent 6803efc023
commit 8a055a0d68
84 changed files with 559 additions and 566 deletions

View File

@@ -1,10 +1,10 @@
= form_for(@proxy_exercise, multipart: true, builder: PagedownFormBuilder) do |f|
= render('shared/form_errors', object: @proxy_exercise)
.form-group
= f.label(:title)
.mb-3
= f.label(:title, class: 'form-label')
= f.text_field(:title, class: 'form-control', required: true)
.form-group
= f.label(:description)
.mb-3
= f.label(:description, class: 'form-label')
= f.pagedown :description, input_html: { preview: true, rows: 10 }
.form-check.mb-3
label.form-check-label
@@ -21,7 +21,7 @@
th = sort_link(@search, :created_at, t('shared.created_at'))
= collection_check_boxes :proxy_exercise, :exercise_ids, @exercises, :id, :title do |b|
tr
td = b.check_box
td = b.check_box class: 'form-check-input'
td = link_to_if(policy(b.object).show?, b.object, b.object)
td = l(b.object.created_at, format: :short)

View File

@@ -1,10 +1,9 @@
h1 = ProxyExercise.model_name.human(count: 2)
= render(layout: 'shared/form_filters') do |f|
.row.px-3
.form-group
= f.label(:title_cont, t('activerecord.attributes.proxy_exercise.title'), class: 'sr-only')
= f.search_field(:title_cont, class: 'form-control', placeholder: t('activerecord.attributes.proxy_exercise.title'))
.col-auto
= f.label(:title_cont, t('activerecord.attributes.proxy_exercise.title'), class: 'visually-hidden form-label')
= f.search_field(:title_cont, class: 'form-control', placeholder: t('activerecord.attributes.proxy_exercise.title'))
.table-responsive
table.table.mt-4
@@ -28,10 +27,10 @@ h1 = ProxyExercise.model_name.human(count: 2)
td.p-1
.btn-group
button.btn.btn-outline-primary.btn-sm.dropdown-toggle data-toggle="dropdown" type="button" = t('shared.actions_button')
button.btn.btn-outline-primary.btn-sm.dropdown-toggle data-bs-toggle="dropdown" type="button" = t('shared.actions_button')
span.caret
span.sr-only Toggle Dropdown
ul.dropdown-menu.float-right role="menu"
span.visually-hidden Toggle Dropdown
ul.dropdown-menu.float-end role="menu"
li = link_to(t('shared.show'), proxy_exercise, 'data-turbolinks' => "false", class: 'dropdown-item') if policy(proxy_exercise).show?
li = link_to(t('shared.destroy'), proxy_exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete, class: 'dropdown-item') if policy(proxy_exercise).destroy?
li = link_to(t('.clone'), clone_proxy_exercise_path(proxy_exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post, class: 'dropdown-item') if policy(proxy_exercise).clone?

View File

@@ -8,7 +8,7 @@ h1
= row(label: 'exercise.public', value: @proxy_exercise.public?)
= row(label: 'exercise.description', value: @proxy_exercise.description)
= row(label: 'exercise.embedding_parameters', class: 'mb-4') do
= content_tag(:input, nil, class: 'form-control mb-4', readonly: true, value: embedding_parameters(@proxy_exercise))
= content_tag(:input, nil, class: 'form-control bg-secondary mb-4', readonly: true, value: embedding_parameters(@proxy_exercise))
h2.mt-4 Exercises
.table-responsive