Update Bootstrap from v4 to v5
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
- append_stylesheet_pack_tag('highlight')
|
||||
|
||||
h1.d-inline-block = @exercise
|
||||
.btn-group.float-right
|
||||
.btn-group.float-end
|
||||
= render('shared/edit_button', object: @exercise)
|
||||
button.btn.btn-secondary.float-right.dropdown-toggle data-toggle='dropdown' type='button'
|
||||
ul.dropdown-menu.dropdown-menu-right role='menu'
|
||||
button.btn.btn-secondary.float-end.dropdown-toggle data-bs-toggle='dropdown' type='button'
|
||||
ul.dropdown-menu.dropdown-menu-end role='menu'
|
||||
li = link_to(t('exercises.index.implement'), implement_exercise_path(@exercise), 'data-turbolinks' => "false", class: 'dropdown-item text-dark') if policy(@exercise).implement?
|
||||
li = link_to(t('shared.statistics'), statistics_exercise_path(@exercise), 'data-turbolinks' => "false", class: 'dropdown-item text-dark') if policy(@exercise).statistics?
|
||||
li = link_to(t('activerecord.models.user_exercise_feedback.other'), feedback_exercise_path(@exercise), class: 'dropdown-item text-dark') if policy(@exercise).feedback?
|
||||
@@ -35,9 +35,10 @@ h1.d-inline-block = @exercise
|
||||
= row(label: 'exercise.uuid', value: @exercise.uuid)
|
||||
= row(label: 'exercise.tags', value: @exercise.exercise_tags.map{|et| "#{et.tag.name} (#{et.factor})"}.sort.join(", "))
|
||||
= row(label: 'exercise.embedding_parameters', class: 'mb-4') do
|
||||
= content_tag(:input, nil, class: 'form-control mb-4', readonly: true, value: @exercise.unpublished? ? t('exercises.show.is_unpublished') : embedding_parameters(@exercise))
|
||||
= content_tag(:input, nil, class: 'form-control bg-secondary mb-4', readonly: true, value: @exercise.unpublished? ? t('exercises.show.is_unpublished') : embedding_parameters(@exercise))
|
||||
|
||||
- unless @tips.blank?
|
||||
.mt-2
|
||||
= render(partial: 'tips_content')
|
||||
|
||||
h2.mt-4 = t('activerecord.attributes.exercise.files')
|
||||
@@ -46,14 +47,14 @@ ul.list-unstyled#files
|
||||
- @exercise.files.each do |file|
|
||||
li.card.mt-2
|
||||
.card-header role="tab" id="heading"
|
||||
a.file-heading.collapsed data-toggle="collapse" data-parent="#files" href=".collapse#{file.id}"
|
||||
a.file-heading.collapsed data-bs-toggle="collapse" data-bs-parent="#files" href=".collapse#{file.id}"
|
||||
div.clearfix role="button"
|
||||
i.fa-solid aria-hidden="true"
|
||||
span = file.filepath
|
||||
.card-collapse.collapse class="collapse#{file.id}" role="tabpanel"
|
||||
.card-body
|
||||
- if policy(file).destroy?
|
||||
.clearfix = link_to(t('shared.destroy'), file, class:'btn btn-warning btn-sm float-right', data: {confirm: t('shared.confirm_destroy')}, method: :delete)
|
||||
.clearfix = link_to(t('shared.destroy'), file, class:'btn btn-warning btn-sm float-end', data: {confirm: t('shared.confirm_destroy')}, method: :delete)
|
||||
= render('shared/file', file: file)
|
||||
|
||||
= render('shared/modal', id: 'export-modal', title: t('exercises.export_codeharbor.dialogtitle'), template: 'exercises/_export_dialogcontent')
|
Reference in New Issue
Block a user