make travis green again

This commit is contained in:
yqbk
2016-10-08 20:37:20 +02:00
parent ea745cbb5b
commit 44aca293e9
41 changed files with 322 additions and 225 deletions

View File

@@ -8,7 +8,7 @@
- if current_user.admin?
li = link_to(t('breadcrumbs.dashboard.show'), admin_dashboard_path)
li.divider
- models = [ExecutionEnvironment, Exercise, Consumer, CodeHarborLink, ExternalUser, FileType, FileTemplate, InternalUser, Submission].sort_by { |model| model.model_name.human(count: 2) }
- models = [ExecutionEnvironment, Exercise, Consumer, CodeHarborLink, ExternalUser, FileType, FileTemplate, InternalUser].sort_by { |model| model.model_name.human(count: 2) }
- models.each do |model|
- if policy(model).index?
li = link_to(model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))

View File

@@ -2,5 +2,5 @@
= form.label(attribute, label)
|  
a.toggle-input data={text_initial: t('shared.upload_file'), text_toggled: t('shared.back')} href='#' = t('shared.upload_file')
= form.text_area(attribute, class: 'code-field form-control original-input', rows: 16)
= form.text_area(attribute, class: 'code-field form-control original-input', rows: 16, style: "display:none;")
= form.file_field(attribute, class: 'alternative-input form-control', disabled: true)

View File

@@ -1,9 +1,9 @@
h5 =t('exercises.implement.comment.others')
pre#other-comments
h5 =t('exercises.implement.comment.addyours')
textarea.form-control(style='resize:none;')
#otherComments
h5 =t('exercises.implement.comment.others')
pre#otherCommentsTextfield
p = ''
button#addCommentButton.btn.btn-block.btn-primary(type='button') =t('exercises.implement.comment.addComment')
button#removeAllButton.btn.btn-block.btn-warning(type='button') =t('exercises.implement.comment.removeAllOnLine')

View File

@@ -0,0 +1,5 @@
#editor-edit.panel-group.row data-exercise-id=@exercise.id
#frames
.frame
.editor-content.hidden
.editor

View File

@@ -1,4 +1,5 @@
- id = f.object.id
li.panel.panel-default
.panel-heading role="tab" id="heading"
a.file-heading data-toggle="collapse" data-parent="#files" href="#collapse#{id}"
@@ -37,3 +38,4 @@ li.panel.panel-default
= f.label(:role, t('activerecord.attributes.file.weight'))
= f.number_field(:weight, class: 'form-control', min: 1, step: 'any')
= render('code_field', attribute: :content, form: f, label: t('activerecord.attributes.file.content'))
= render partial: 'editor_edit', locals: { exercise: @exercise }

View File

@@ -8,8 +8,7 @@
= f.text_field(:title, class: 'form-control', required: true)
.form-group
= f.label(:description)
= f.hidden_field(:description)
.form-control.markdown
= f.pagedown_editor :description
.form-group
= f.label(:execution_environment_id)
= f.collection_select(:execution_environment_id, @execution_environments, :id, :name, {}, class: 'form-control')
@@ -33,7 +32,9 @@
ul#files.list-unstyled.panel-group
= f.fields_for :files do |files_form|
= render('file_form', f: files_form)
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('file_form', f: files_form)
.actions = render('shared/submit_button', f: f, object: @exercise)
.actions = render('shared/submit_button', f: f, object: @exercise)

View File

@@ -38,7 +38,7 @@
/ #output-col1.col-sm-12
#output-col1
// todo set to full width if turtle isnt used
#prompt.input-group.hidden
#prompt.input-group.hidden.col-lg-7.col-md-7.two-column
span.input-group-addon data-prompt=t('exercises.editor.input') = t('exercises.editor.input')
input#prompt-input.form-control type='text'
span.input-group-btn

View File

@@ -23,10 +23,6 @@
<%= f.label :file_id %><br>
<%= f.number_field :file_id %>
</div>
<div class="field">
<%= f.label :requested_at %><br>
<%= f.datetime_select :requested_at %>
</div>
<div class="field">
<%= f.label :user_type %><br>
<%= f.text_field :user_type %>

View File

@@ -1,4 +1,4 @@
json.array!(@request_for_comments) do |request_for_comment|
json.extract! request_for_comment, :id, :user_id, :exercise_id, :file_id, :requested_at, :user_type
json.extract! request_for_comment, :id, :user_id, :exercise_id, :file_id, :user_type
json.url request_for_comment_url(request_for_comment, format: :json)
end

View File

@@ -8,7 +8,7 @@
<%= user.displayname %> | <%= @request_for_comment.created_at.localtime %>
</p>
<h5>
<u><%= t('activerecord.attributes.exercise.description') %>:</u> "<%= render_markdown(@request_for_comment.exercise.description) %>"
<u><%= t('activerecord.attributes.exercise.description') %>:</u> <%= render_markdown(@request_for_comment.exercise.description) %>
</h5>
<h5>
@@ -162,9 +162,10 @@ also, all settings from the rails model needed for the editor configuration in t
if (hasCommentsInRow(editor, row)) {
var rowComments = getCommentsForRow(editor, row);
var comments = _.pluck(rowComments, 'text').join('\n');
commentModal.find('#other-comments').text(comments);
commentModal.find('#otherComments').show();
commentModal.find('#otherCommentsTextfield').text(comments);
} else {
commentModal.find('#other-comments').text('none');
commentModal.find('#otherComments').hide();
}
commentModal.find('#addCommentButton').off('click');

View File

@@ -1 +1 @@
json.extract! @request_for_comment, :id, :user_id, :exercise_id, :file_id, :requested_at, :created_at, :updated_at, :user_type, :solved
json.extract! @request_for_comment, :id, :user_id, :exercise_id, :file_id, :created_at, :updated_at, :user_type, :solved