Improve visual difference for solved and soft-solved RfCs

This commit is contained in:
Sebastian Serth
2024-04-18 10:03:32 +02:00
committed by Dominic Sauer
parent 7cc4fb00c6
commit dd7b09e1e3
3 changed files with 8 additions and 6 deletions

View File

@ -2,8 +2,8 @@ tr.table-row-clickable data-id=request_for_comment.id data-href=request_for_comm
td.p-2
- if request_for_comment.solved?
span.fa-solid.fa-check.fa-2x.text-success aria-hidden='true'
- elsif request_for_comment.full_score_reached
span.fa-solid.fa-check.fa-2x.text-secondary-emphasis aria-hidden='true'
- elsif request_for_comment.full_score_reached?
span.fa-solid.fa-check.fa-2x.text-body-tertiary aria-hidden='true'
- else
= ''
td.text-center = request_for_comment.comments.size

View File

@ -35,10 +35,10 @@ h1 = RequestForComment.model_name.human(count: 2)
tr data-id=request_for_comment.id
- if request_for_comment.solved?
td
span.fa-solid.fa-check aria-hidden='true'
- elsif request_for_comment.full_score_reached
span.fa-solid.fa-check.text-success aria-hidden='true'
- elsif request_for_comment.full_score_reached?
td
span.fa-solid.fa-check.text-secondary-emphasis aria-hidden='true'
span.fa-solid.fa-check.text-body-tertiary aria-hidden='true'
- else
td = ''
td = link_to_if(policy(request_for_comment).show?, request_for_comment.submission.exercise.title, request_for_comment)

View File

@ -1,7 +1,9 @@
.list-group
h4#exercise_caption.list-group-item-heading data-exercise-id=@request_for_comment.exercise.id data-rfc-id=@request_for_comment.id
- if @request_for_comment.solved?
span.fa-solid.fa-check.me-2 aria-hidden='true'
span.fa-solid.fa-check.text-success.me-2 aria-hidden='true'
- elsif @request_for_comment.full_score_reached?
span.fa-solid.fa-check.text-body-tertiary.me-2 aria-hidden='true'
= link_to_if(policy(@request_for_comment.exercise).show?, @request_for_comment.exercise.title, [:implement, @request_for_comment.exercise])
p.list-group-item-text
- user = @request_for_comment.user