RfCs: Allow filtering for any states

We want to differentiate between those RfCs explicitly marked as solved, those potentially solved since the author reached the maximum score, and those being unsolved where the author has not yet reached the full score yet.
This commit is contained in:
Sebastian Serth
2024-04-18 10:00:19 +02:00
committed by Dominic Sauer
parent d72139cf04
commit 7cc4fb00c6
6 changed files with 51 additions and 8 deletions

View File

@ -9,7 +9,7 @@ h1 = RequestForComment.model_name.human(count: 2)
= f.search_field(:exercise_title_cont, class: 'form-control', placeholder: t('activerecord.attributes.request_for_comments.exercise'))
.col-auto.mt-3.mt-md-0
= f.label(:title_cont, t('request_for_comments.solved'), class: 'visually-hidden form-label')
= f.select(:solved_not_eq, [[t('request_for_comments.show_all'), 2], [t('request_for_comments.show_unsolved'), 1], [t('request_for_comments.show_solved'), 0]])
= f.select(:state, [[t('request_for_comments.show_all'), RequestForComment::ALL], [t('request_for_comments.show_unsolved'), RequestForComment::ONGOING], [t('request_for_comments.show_soft_solved'), RequestForComment::SOFT_SOLVED], [t('request_for_comments.show_solved'), RequestForComment::SOLVED]])
- unless current_user.consumer.rfc_visibility_study_group?
.row
.col