transferred Code Ocean from original repository to GitHub
This commit is contained in:
1
app/views/shared/_edit_button.html.slim
Normal file
1
app/views/shared/_edit_button.html.slim
Normal 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')
|
10
app/views/shared/_file.html.slim
Normal file
10
app/views/shared/_file.html.slim
Normal 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))
|
6
app/views/shared/_form_errors.html.slim
Normal file
6
app/views/shared/_form_errors.html.slim
Normal 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
|
11
app/views/shared/_form_filters.html.slim
Normal file
11
app/views/shared/_form_filters.html.slim
Normal 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')
|
14
app/views/shared/_modal.html.slim
Normal file
14
app/views/shared/_modal.html.slim
Normal 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
|
4
app/views/shared/_new_button.html.slim
Normal file
4
app/views/shared/_new_button.html.slim
Normal 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)
|
1
app/views/shared/_submit_button.html.slim
Normal file
1
app/views/shared/_submit_button.html.slim
Normal 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))
|
Reference in New Issue
Block a user