Merge remote-tracking branch 'origin/master' into rspec-tests-controllers
This commit is contained in:
@ -13,7 +13,6 @@ h1 = Exercise.model_name.human(count: 2)
|
|||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
th = sort_link(@search, :title, t('activerecord.attributes.exercise.title'))
|
th = sort_link(@search, :title, t('activerecord.attributes.exercise.title'))
|
||||||
th = sort_link(@search, :user_id, t('activerecord.attributes.exercise.user'))
|
|
||||||
th = sort_link(@search, :execution_environment_id, t('activerecord.attributes.exercise.execution_environment'))
|
th = sort_link(@search, :execution_environment_id, t('activerecord.attributes.exercise.execution_environment'))
|
||||||
th = t('.test_files')
|
th = t('.test_files')
|
||||||
th = t('activerecord.attributes.exercise.maximum_score')
|
th = t('activerecord.attributes.exercise.maximum_score')
|
||||||
@ -27,17 +26,23 @@ h1 = Exercise.model_name.human(count: 2)
|
|||||||
- @exercises.each do |exercise|
|
- @exercises.each do |exercise|
|
||||||
tr data-id=exercise.id
|
tr data-id=exercise.id
|
||||||
td = exercise.title
|
td = exercise.title
|
||||||
td = link_to_if(exercise.author && policy(exercise.author).show?, exercise.author, exercise.author)
|
|
||||||
td = link_to_if(exercise.execution_environment && policy(exercise.execution_environment).show?, exercise.execution_environment, exercise.execution_environment)
|
td = link_to_if(exercise.execution_environment && policy(exercise.execution_environment).show?, exercise.execution_environment, exercise.execution_environment)
|
||||||
td = exercise.files.teacher_defined_tests.count
|
td = exercise.files.teacher_defined_tests.count
|
||||||
td = exercise.maximum_score
|
td = exercise.maximum_score
|
||||||
td.public data-value=exercise.public? = symbol_for(exercise.public?)
|
td.public data-value=exercise.public? = symbol_for(exercise.public?)
|
||||||
td = link_to(t('shared.show'), exercise) if policy(exercise).show?
|
|
||||||
td = link_to(t('shared.edit'), edit_exercise_path(exercise)) if policy(exercise).edit?
|
td = link_to(t('shared.edit'), edit_exercise_path(exercise)) if policy(exercise).edit?
|
||||||
td = link_to(t('shared.destroy'), exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(exercise).destroy?
|
|
||||||
td = link_to(t('.clone'), clone_exercise_path(exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post) if policy(exercise).clone?
|
|
||||||
td = link_to(t('.implement'), implement_exercise_path(exercise)) if policy(exercise).implement?
|
td = link_to(t('.implement'), implement_exercise_path(exercise)) if policy(exercise).implement?
|
||||||
td = link_to(t('shared.statistics'), statistics_exercise_path(exercise)) if policy(exercise).statistics?
|
td = link_to(t('shared.statistics'), statistics_exercise_path(exercise)) if policy(exercise).statistics?
|
||||||
|
|
||||||
|
td
|
||||||
|
.btn-group
|
||||||
|
button.btn.btn-primary-outline.btn-xs.dropdown-toggle data-toggle="dropdown" type="button" = t('shared.actions_button')
|
||||||
|
span.caret
|
||||||
|
span.sr-only Toggle Dropdown
|
||||||
|
ul.dropdown-menu.pull-right role="menu"
|
||||||
|
li = link_to(t('shared.show'), exercise) if policy(exercise).show?
|
||||||
|
li = link_to(t('shared.destroy'), exercise, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(exercise).destroy?
|
||||||
|
li = link_to(t('.clone'), clone_exercise_path(exercise), data: {confirm: t('shared.confirm_destroy')}, method: :post) if policy(exercise).clone?
|
||||||
|
|
||||||
= render('shared/pagination', collection: @exercises)
|
= render('shared/pagination', collection: @exercises)
|
||||||
p = render('shared/new_button', model: Exercise)
|
p = render('shared/new_button', model: Exercise)
|
||||||
|
@ -402,6 +402,7 @@ de:
|
|||||||
created_at: Erstellt
|
created_at: Erstellt
|
||||||
destroy: Löschen
|
destroy: Löschen
|
||||||
edit: Bearbeiten
|
edit: Bearbeiten
|
||||||
|
actions_button: 'Andere Aktionen'
|
||||||
errors_one: 'Beim Speichern ist ein Fehler aufgetreten'
|
errors_one: 'Beim Speichern ist ein Fehler aufgetreten'
|
||||||
errors_other: 'Beim Speichern sind %{count} Fehler aufgetreten'
|
errors_other: 'Beim Speichern sind %{count} Fehler aufgetreten'
|
||||||
help:
|
help:
|
||||||
|
@ -402,6 +402,7 @@ en:
|
|||||||
created_at: Created At
|
created_at: Created At
|
||||||
destroy: Delete
|
destroy: Delete
|
||||||
edit: Edit
|
edit: Edit
|
||||||
|
actions_button: 'Other actions'
|
||||||
errors_one: 'An error prohibited this %{model} from being saved'
|
errors_one: 'An error prohibited this %{model} from being saved'
|
||||||
errors_other: '%{count} errors prohibited this %{model} from being saved'
|
errors_other: '%{count} errors prohibited this %{model} from being saved'
|
||||||
help:
|
help:
|
||||||
|
Reference in New Issue
Block a user