separate file for editor in edit view
This commit is contained in:
@@ -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')
|
||||
@@ -31,19 +30,12 @@
|
||||
= t('activerecord.attributes.exercise.allow_file_creation')
|
||||
h2 = t('activerecord.attributes.exercise.files')
|
||||
|
||||
/hidden editor -> to be deleted
|
||||
.hide = render('ace', exercise: @exercise, file: @files.first)
|
||||
/after use $('.frame').show() in js console everything works fine, probably editors are hidden somewhere in editor.js because we get "display:none" on frames
|
||||
|
||||
ul#files.list-unstyled.panel-group
|
||||
= @exercise.files.each do |file|
|
||||
= render partial: 'file_form', locals: { file: file }
|
||||
/= f.fields_for :files do |files_form|
|
||||
/ = render('file_form', f: files_form, file: files_form.object, code: @files)
|
||||
|
||||
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 partial: 'file_form', locals: { file: CodeOcean::File.new }
|
||||
//= render('file_form', f: files_form, file: nil)
|
||||
.actions = render('shared/submit_button', f: f, object: @exercise)
|
||||
|
Reference in New Issue
Block a user