Merge branch 'master' into editor-frontend-refactor
Conflicts: app/assets/javascripts/editor.js.erb app/views/exercises/implement.html.slim
This commit is contained in:
@ -2,5 +2,5 @@
|
||||
= form.label(attribute, label)
|
||||
|
|
||||
a.toggle-input data={text_initial: t('shared.upload_file'), text_toggled: t('shared.back')} href='#' = t('shared.upload_file')
|
||||
= form.text_area(attribute, class: 'code-field form-control original-input', rows: 16)
|
||||
= form.text_area(attribute, class: 'code-field form-control original-input', rows: 16, style: "display:none;")
|
||||
= form.file_field(attribute, class: 'alternative-input form-control', disabled: true)
|
||||
|
5
app/views/exercises/_editor_edit.html.slim
Normal file
5
app/views/exercises/_editor_edit.html.slim
Normal file
@ -0,0 +1,5 @@
|
||||
#editor-edit.panel-group.row data-exercise-id=@exercise.id
|
||||
#frames
|
||||
.frame
|
||||
.editor-content.hidden
|
||||
.editor
|
@ -1,4 +1,5 @@
|
||||
- id = f.object.id
|
||||
|
||||
li.panel.panel-default
|
||||
.panel-heading role="tab" id="heading"
|
||||
a.file-heading data-toggle="collapse" data-parent="#files" href="#collapse#{id}"
|
||||
@ -37,3 +38,4 @@ li.panel.panel-default
|
||||
= f.label(:role, t('activerecord.attributes.file.weight'))
|
||||
= f.number_field(:weight, class: 'form-control', min: 1, step: 'any')
|
||||
= render('code_field', attribute: :content, form: f, label: t('activerecord.attributes.file.content'))
|
||||
= render partial: 'editor_edit', locals: { exercise: @exercise }
|
@ -9,7 +9,6 @@
|
||||
.form-group
|
||||
= f.label(:description)
|
||||
= f.pagedown_editor :description
|
||||
|
||||
.form-group
|
||||
= f.label(:execution_environment_id)
|
||||
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {}, class: 'form-control')
|
||||
@ -33,7 +32,9 @@
|
||||
ul#files.list-unstyled.panel-group
|
||||
= f.fields_for :files do |files_form|
|
||||
= render('file_form', f: files_form)
|
||||
|
||||
a#add-file.btn.btn-default.btn-sm.pull-right href='#' = t('.add_file')
|
||||
ul#dummies.hidden = f.fields_for(:files, CodeOcean::File.new, child_index: 'index') do |files_form|
|
||||
= render('file_form', f: files_form)
|
||||
.actions = render('shared/submit_button', f: f, object: @exercise)
|
||||
|
||||
.actions = render('shared/submit_button', f: f, object: @exercise)
|
Reference in New Issue
Block a user