Update Bootstrap to v4.1, fix chosen.js and pagedown on multiple sites

This commit is contained in:
Sebastian Serth
2018-10-07 23:55:11 +02:00
parent 4d1cf972e4
commit 7bdb962616
99 changed files with 2758 additions and 472 deletions

View File

@ -1,41 +1,42 @@
- id = f.object.id
li.panel.panel-default
.panel-heading role="tab" id="heading"
a.file-heading data-toggle="collapse" href="#collapse#{id}"
li.card.mt-2
.card-header role="tab" id="heading"
a.file-heading.collapsed data-toggle="collapse" href="#collapse#{id}"
div.clearfix role="button"
i class="fa" aria-hidden="true"
span = f.object.name
.panel-collapse.collapse class=('in' if f.object.name.nil?) id="collapse#{id}" role="tabpanel"
.panel-body
.card-collapse.collapse class=('in' if f.object.name.nil?) id="collapse#{id}" role="tabpanel"
.card-body
- if policy(f.object).destroy?
.clearfix
.btn.btn-warning.btn-sm.pull-right.delete-file data-file-url=code_ocean_file_path(id) = t('shared.destroy')
.btn.btn-warning.btn-sm.float-right.delete-file data-file-url=code_ocean_file_path(id) = t('shared.destroy')
.form-group
= f.label(:name, t('activerecord.attributes.file.name'))
= f.text_field(:name, class: 'form-control')
.form-group
= f.label(:path, t('activerecord.attributes.file.path'))
= f.text_field(:path, class: 'form-control')
.help-block = t('.hints.path')
.help-block.form-text = t('.hints.path')
.form-group
= f.label(:file_type_id, t('activerecord.attributes.file.file_type_id'))
= f.collection_select(:file_type_id, @file_types, :id, :name, {}, class: 'form-control')
.form-group
= f.label(:role, t('activerecord.attributes.file.role'))
= f.select(:role, CodeOcean::File::TEACHER_DEFINED_ROLES.map { |role| [t("files.roles.#{role}"), role] }, {include_blank: true}, class: 'form-control')
.checkbox
label
= f.check_box(:hidden)
.form-check
label.form-check-label
= f.check_box(:hidden, class: 'form-check-input')
= t('activerecord.attributes.file.hidden')
.checkbox
label
= f.check_box(:read_only)
.form-check.mb-3
label.form-check-label
= f.check_box(:read_only, class: 'form-check-input')
= t('activerecord.attributes.file.read_only')
.test-related-fields style="display: #{f.object.teacher_defined_test? ? 'initial' : 'none'};"
.form-group
= f.label(:name, t('activerecord.attributes.file.feedback_message'))
= f.text_area(:feedback_message, class: 'form-control', maxlength: 255)
.help-block = t('.hints.feedback_message')
.help-block.form-text = t('.hints.feedback_message')
.form-group
= f.label(:role, t('activerecord.attributes.file.weight'))
= f.number_field(:weight, class: 'form-control', min: 1, step: 'any')