improved search bar and search button.
added button to collapsed sidebar
This commit is contained in:
@@ -640,6 +640,8 @@ configureEditors: function () {
|
||||
var search = $('#search-modal').val();
|
||||
window.open(`https://open.hpi.de/courses/javaeinstieg2017/pinboard?query=${search}`, '_blank');
|
||||
})
|
||||
|
||||
$('#sidebar-search-collapsed').on('click',this.handleSideBarToggle.bind(this));
|
||||
},
|
||||
|
||||
|
||||
|
@@ -6,6 +6,7 @@ div id='sidebar-collapsed' class=(@exercise.hide_file_tree ? '' : 'hidden')
|
||||
|
||||
= render('editor_button', classes: 'btn-block btn-primary btn-sm enforce-top-margin', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-download', id: 'download-collapsed', label:'', title: t('exercises.editor.download'))
|
||||
= render('editor_button', classes: 'btn-block btn-primary btn-sm enforce-top-margin', data: {:'data-message-confirm' => t('exercises.editor.confirm_start_over'), :'data-url' => reload_exercise_path(@exercise), :'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-history', id: 'start-over-collapsed', label:'', title: t('exercises.editor.start_over'))
|
||||
= render('editor_button', classes: 'btn-block btn-primary btn-sm enforce-top-margin', data: {:'data-toggle' => 'tooltip', :'data-placement' => 'right'}, icon: 'fa fa-search', id: 'sidebar-search-collapsed', label: '', title:'Suche im Forum')
|
||||
|
||||
div id='sidebar-uncollapsed' class=(@exercise.hide_file_tree ? 'hidden' : '')
|
||||
= render('editor_button', classes: 'btn-block btn-primary btn-sm', icon: 'fa fa-minus-square', id: 'sidebar-collapse', label: t('exercises.editor.collapse_action_sidebar'))
|
||||
@@ -23,15 +24,16 @@ div id='sidebar-uncollapsed' class=(@exercise.hide_file_tree ? 'hidden' : '')
|
||||
|
||||
= render('editor_button', classes: 'btn-block btn-primary btn-sm enforce-top-margin', icon: 'fa fa-download', id: 'download', label: t('exercises.editor.download'))
|
||||
= 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'))
|
||||
div.enforce-top-margin
|
||||
= form_for(@search, multipart: true, target: "_blank") do |f|
|
||||
.form-group
|
||||
= f.hidden_field :exercise_id
|
||||
|
||||
= 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: "Probleme? Suche hier im Forum")
|
||||
.actions
|
||||
= button_tag(class: 'btn btn-block btn-primary btn-sm', id: 'btn-search-col', model: @search.class.model_name.human) do
|
||||
.input-group-btn
|
||||
= button_tag(class: 'btn btn-primary', id: 'btn-search-col', model: @search.class.model_name.human) do
|
||||
i.fa.fa-search
|
||||
= 'Suche im Forum'
|
||||
|
||||
|
||||
- if @exercise.allow_file_creation?
|
||||
= render('shared/modal', id: 'modal-file', template: 'code_ocean/files/_form', title: t('exercises.editor.create_file'))
|
@@ -1,10 +1,10 @@
|
||||
p = "Benutz doch einfach die Forensuche! Du kannst auch jederzeit in der linken Spalte die Suche nutzen. Alternativ kannst du auch nach Kommentaren zu deinem Programm anfordern."
|
||||
= form_for(@search, multipart: true, target: "_blank") do |f|
|
||||
.form-group
|
||||
= f.text_field(:search, class: 'form-control', id: 'search-modal', required: true, placeholder: "Probleme? Suche hier im Forum",)
|
||||
.input-group.enforce-top-margin
|
||||
= f.hidden_field :exercise_id
|
||||
.enforce-right-margin
|
||||
= f.text_field(:search, class: 'form-control', id: 'search-modal', required: true, placeholder: "Probleme? Suche hier im Forum",)
|
||||
.input-group-btn
|
||||
= button_tag(class: 'btn btn-block btn-primary', id: 'btn-search-modal', model: @search.class.model_name.human) do
|
||||
i.fa.fa-search
|
||||
|
||||
.actions
|
||||
= button_tag(class: 'btn btn-block btn-primary btn-sm', id: 'btn-search-modal', model: @search.class.model_name.human) do
|
||||
i.fa.fa-search
|
||||
= 'Suche im Forum'
|
Reference in New Issue
Block a user