Show list of feedback messages for specific exercises
This commit is contained in:
15
app/views/exercises/feedback.html.slim
Normal file
15
app/views/exercises/feedback.html.slim
Normal file
@@ -0,0 +1,15 @@
|
||||
h1 = @exercise
|
||||
|
||||
ul.list-unstyled.panel-group#files
|
||||
- @feedbacks.each do |feedback|
|
||||
li.panel.panel-default
|
||||
.panel-heading role="tab" id="heading"
|
||||
div.clearfix
|
||||
span = feedback.user.name
|
||||
.panel-collapse role="tabpanel"
|
||||
.panel-body.feedback
|
||||
.text = feedback.feedback_text
|
||||
.difficulty = "#{t('user_exercise_feedback.difficulty')} #{feedback.difficulty}" if feedback.difficulty
|
||||
.worktime = "#{t('user_exercise_feedback.working_time')} #{feedback.user_estimated_worktime}" if feedback.user_estimated_worktime
|
||||
|
||||
= render('shared/pagination', collection: @feedbacks)
|
@@ -47,6 +47,7 @@ h1 = Exercise.model_name.human(count: 2)
|
||||
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('activerecord.models.user_exercise_feedback.other'), feedback_exercise_path(exercise)) if policy(exercise).feedback?
|
||||
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?
|
||||
|
||||
|
Reference in New Issue
Block a user