search is now saved asynchron and without a form which caused some redirection through searches_controller
added asynchronous save of search, removed searches_controller,
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
div id='sidebar-collapsed' class=(@exercise.hide_file_tree ? '' : 'hidden') data-course_token=@course_token
|
||||
div id='sidebar-collapsed' class=(@exercise.hide_file_tree ? '' : 'hidden')
|
||||
= render('editor_button', classes: 'btn-block btn-primary btn-sm', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-plus-square', id: 'sidebar-collapse-collapsed', label:'', title:t('exercises.editor.expand_action_sidebar'))
|
||||
|
||||
- if @exercise.allow_file_creation and not @exercise.hide_file_tree?
|
||||
@@ -27,15 +27,12 @@ div id='sidebar-uncollapsed' class=(@exercise.hide_file_tree ? 'hidden' : '')
|
||||
= render('editor_button', classes: 'btn-block btn-primary btn-sm', data: {:'data-message-confirm' => t('exercises.editor.confirm_start_over'), :'data-url' => reload_exercise_path(@exercise)}, icon: 'fa fa-history', id: 'start-over', label: t('exercises.editor.start_over'))
|
||||
|
||||
- if !@course_token.blank?
|
||||
= form_for(@search, multipart: true, target: "_blank") do |f|
|
||||
.input-group.enforce-top-margin
|
||||
= f.hidden_field :exercise_id
|
||||
.enforce-right-margin
|
||||
= f.text_field(:search, class: 'form-control', id: "search-col", required: true, placeholder: t('search.search_in_forum'))
|
||||
= text_field_tag 'search-input-text', nil, placeholder: t('search.search_in_forum'), class: 'form-control'
|
||||
.input-group-btn
|
||||
= button_tag(class: 'btn btn-primary', id: 'btn-search-col', model: @search.class.model_name.human) do
|
||||
= button_tag(class: 'btn btn-primary', id: 'btn-search-col') do
|
||||
i.fa.fa-search
|
||||
|
||||
|
||||
- if @exercise.allow_file_creation?
|
||||
= render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file'))
|
Reference in New Issue
Block a user