transferred Code Ocean from original repository to GitHub

This commit is contained in:
Hauke Klement
2015-01-22 09:51:49 +01:00
commit 4cbf9970b1
683 changed files with 11979 additions and 0 deletions

View File

@@ -0,0 +1 @@
= link_to(t('shared.edit'), local_assigns.has_key?(:path) ? path : send(:"edit_#{object.class.name.underscore}_path", object), class: 'btn btn-default pull-right')

View File

@@ -0,0 +1,10 @@
= row(label: 'file.name', value: file.name)
= row(label: 'file.path', value: file.path)
= row(label: 'file.file_type', value: link_to(file.file_type, file.file_type))
= row(label: 'file.role', value: file.role? ? t("files.roles.#{file.role}") : '')
= row(label: 'file.hidden', value: file.hidden)
= row(label: 'file.read_only', value: file.read_only)
- if file.teacher_defined_test?
= row(label: 'file.feedback_message', value: file.feedback_message)
= row(label: 'file.weight', value: file.weight)
= row(label: 'file.content', value: file.native_file? ? link_to(file.native_file.file.filename, file.native_file.url) : code_tag(file.content))

View File

@@ -0,0 +1,6 @@
- if object.errors.any?
#error_explanation.alert.alert-warning
h4 = "#{t("shared.errors_#{object.errors.count == 1 ? 'one' : 'other'}", count: object.errors.count, model: object.class.model_name.human)}:"
ul
- object.errors.full_messages.each do |message|
li = message

View File

@@ -0,0 +1,11 @@
.well
= search_form_for(@search, class: 'clearfix filter-form form-inline') do |f|
= yield(f)
.btn-group.pull-right
button.btn.btn-default.btn-sm type='submit' = t('shared.apply_filters')
button.btn.btn-default.btn-sm.dropdown-toggle data-toggle='dropdown' type='button'
span.caret
span.sr-only Toggle Dropdown
ul.dropdown-menu role='menu'
li
a href=request.path = t('shared.reset_filters')

View File

@@ -0,0 +1,14 @@
.fade.modal aria-hidden=true aria-labelledby='modal-title' id=id role='dialog' tabindex=-1
.modal-dialog class=local_assigns[:classes]
.modal-content
.modal-header
button.close data-dismiss='modal' type='button'
span aria-hidden=true ×
span.sr-only Close
h4#modal-title.modal-title = title
.modal-body
- if local_assigns.has_key?(:body)
= body
- else
= render(layout: false, locals: (local_assigns[:template_variables] || {}).merge(modal: true), template: template)
.modal-footer

View File

@@ -0,0 +1,4 @@
- if policy(model).new?
a.btn.btn-success href=(local_assigns.has_key?(:path) ? path : send(:"new_#{model.model_name.singular}_path"))
i.glyphicon.glyphicon-plus
= t('shared.new_model', model: model.model_name.human)

View File

@@ -0,0 +1 @@
= f.submit(class: 'btn btn-default', value: t(object.new_record? ? 'shared.create' : 'shared.update', model: object.class.model_name.human))