add unpublished to views
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
= f.pagedown :description, input_html: { preview: true, rows: 10 }
|
||||
.form-group
|
||||
= f.label(:execution_environment_id)
|
||||
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {}, class: 'form-control')
|
||||
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {include_blank: 'None'}, class: 'form-control')
|
||||
/.form-group
|
||||
= f.label(:instructions)
|
||||
= f.hidden_field(:instructions)
|
||||
@ -20,6 +20,10 @@
|
||||
label.form-check-label
|
||||
= f.check_box(:public, class: 'form-check-input')
|
||||
= t('activerecord.attributes.exercise.public')
|
||||
.form-check
|
||||
label.form-check-label
|
||||
= f.check_box(:unpublished, class: 'form-check-input')
|
||||
= t('activerecord.attributes.exercise.unpublished')
|
||||
.form-check
|
||||
label.form-check-label
|
||||
= f.check_box(:hide_file_tree, class: 'form-check-input')
|
||||
@ -66,4 +70,4 @@
|
||||
ul#dummies.d-none = 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)
|
||||
|
@ -16,6 +16,7 @@ h1
|
||||
/= row(label: 'exercise.instructions', value: render_markdown(@exercise.instructions))
|
||||
= row(label: 'exercise.maximum_score', value: @exercise.maximum_score)
|
||||
= row(label: 'exercise.public', value: @exercise.public?)
|
||||
= row(label: 'exercise.unpublished', value: @exercise.unpublished?)
|
||||
= row(label: 'exercise.hide_file_tree', value: @exercise.hide_file_tree?)
|
||||
= row(label: 'exercise.allow_file_creation', value: @exercise.allow_file_creation?)
|
||||
= row(label: 'exercise.allow_auto_completion', value: @exercise.allow_auto_completion?)
|
||||
@ -23,7 +24,7 @@ h1
|
||||
= row(label: 'exercise.uuid', value: @exercise.uuid)
|
||||
= row(label: 'exercise.tags', value: @exercise.exercise_tags.map{|et| "#{et.tag.name} (#{et.factor})"}.sort.join(", "))
|
||||
= row(label: 'exercise.embedding_parameters', class: 'mb-4') do
|
||||
= content_tag(:input, nil, class: 'form-control mb-4', readonly: true, value: embedding_parameters(@exercise))
|
||||
= content_tag(:input, nil, class: 'form-control mb-4', readonly: true, value: @exercise.unpublished? ? 'Exercise is unpublished' : embedding_parameters(@exercise))
|
||||
|
||||
h2.mt-4 = t('activerecord.attributes.exercise.files')
|
||||
|
||||
|
Reference in New Issue
Block a user