add unpublished to views

This commit is contained in:
Karol
2019-10-11 16:28:50 +02:00
parent 27ef0d45dd
commit 87798212ad
6 changed files with 45 additions and 5 deletions

View File

@@ -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)