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;
}
.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;
.username {
@ -104,9 +121,9 @@ a.file-heading {
}
.date {}
}
}
.feedback {
.feedback {
.text {
margin-bottom: 10px;
}
@ -116,4 +133,5 @@ a.file-heading {
.worktime {
font-weight: bold;
}
}
}

View File

@ -1,10 +1,14 @@
h1 = link_to(@exercise)
= row(label: 'exercise.description', value: render_markdown(@exercise.description))
h1 = link_to(@exercise, exercise_path(@exercise))
- 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')
ul.list-unstyled.panel-group
ul.list-unstyled.panel-group
- @feedbacks.each do |feedback|
li.panel.panel-default
.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
.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)