Fix styling and link to exercise

This commit is contained in:
Maximilian Grundke
2017-11-22 13:22:10 +01:00
parent 4d8cee6fcb
commit 34b2bf9eb1
2 changed files with 54 additions and 32 deletions

View File

@ -95,7 +95,24 @@ a.file-heading {
left: 0; left: 0;
} }
.feedback-header { .feedback-page {
.header {
font-weight: bold;
margin-bottom: 10px;
}
.value {
border: 1px solid grey;
padding: 10px;
margin-bottom: 10px;
}
.no-feedback {
font-weight: bold;
margin-top: 50px;
}
.feedback-header {
display: flex; display: flex;
.username { .username {
@ -104,9 +121,9 @@ a.file-heading {
} }
.date {} .date {}
} }
.feedback { .feedback {
.text { .text {
margin-bottom: 10px; margin-bottom: 10px;
} }
@ -116,4 +133,5 @@ a.file-heading {
.worktime { .worktime {
font-weight: bold; font-weight: bold;
} }
}
} }

View File

@ -1,10 +1,14 @@
h1 = link_to(@exercise) h1 = link_to(@exercise, exercise_path(@exercise))
= row(label: 'exercise.description', value: render_markdown(@exercise.description))
- if @feedbacks.nil? or @feedbacks.size == 0 .feedback-page
.header = t('activerecord.attributes.exercise.description')
.value = render_markdown(@exercise.description)
.header = t('activerecord.models.user_exercise_feedback.other')
- if @feedbacks.nil? or @feedbacks.size == 0
.no-feedback = t('user_exercise_feedback.no_feedback') .no-feedback = t('user_exercise_feedback.no_feedback')
ul.list-unstyled.panel-group ul.list-unstyled.panel-group
- @feedbacks.each do |feedback| - @feedbacks.each do |feedback|
li.panel.panel-default li.panel.panel-default
.panel-heading role="tab" id="heading" .panel-heading role="tab" id="heading"
@ -17,4 +21,4 @@ ul.list-unstyled.panel-group
.difficulty = "#{t('user_exercise_feedback.difficulty')} #{feedback.difficulty}" if feedback.difficulty .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 .worktime = "#{t('user_exercise_feedback.working_time')} #{feedback.user_estimated_worktime}" if feedback.user_estimated_worktime
= render('shared/pagination', collection: @feedbacks) = render('shared/pagination', collection: @feedbacks)