Files
codeocean/app/views/proxy_exercises/show.html.slim
2018-11-06 16:46:01 +01:00

28 lines
1.1 KiB
Plaintext

- content_for :head do
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
Otherwise, code might not be highlighted correctly (race condition)
meta name='turbolinks-visit-control' content='reload'
= javascript_include_tag(asset_path('highlight.min.js', type: :javascript))
= stylesheet_link_tag(asset_path('highlight-default.css', type: :stylesheet))
h1
= @proxy_exercise.title
- if policy(@proxy_exercise).edit?
= render('shared/edit_button', object: @proxy_exercise)
= row(label: 'exercise.title', value: @proxy_exercise.title)
= row(label: 'proxy_exercise.files_count', value: @exercises.count)
= row(label: 'exercise.description', value: @proxy_exercise.description)
= row(label: 'exercise.token', value: @proxy_exercise.token)
h3 Exercises
.table-responsive
table.table
thead
tr
th = sort_link(@search, :title, t('activerecord.attributes.submission.exercise'))
th = sort_link(@search, :created_at, t('shared.created_at'))
- @proxy_exercise.exercises.each do |exercise|
tr
td = link_to(exercise.title, exercise)
td = l(exercise.created_at, format: :short)