Lint Slim files and fix offenses
The fixing was partially done manually and partially automatically.
This commit is contained in:

committed by
Dominic Sauer

parent
ddfa06ffaa
commit
9a9efd5caa
@@ -1,9 +1,9 @@
|
||||
hr
|
||||
h5.mt-4 Admin Menu
|
||||
ul.text
|
||||
li = link_to "Clear question text (in case of explicit text)", clear_question_request_for_comment_path(id: @request_for_comment.id), method: :post if policy(@request_for_comment).clear_question?
|
||||
li = link_to 'Clear question text (in case of explicit text)', clear_question_request_for_comment_path(id: @request_for_comment.id), method: :post if policy(@request_for_comment).clear_question?
|
||||
li = link_to "User's current status of this exercise", statistics_external_user_exercise_path(id: @request_for_comment.exercise_id, external_user_id: @request_for_comment.user_id) if policy(@request_for_comment.exercise).statistics?
|
||||
li = link_to "All exercises of this user", statistics_external_user_path(id: @request_for_comment.user_id) if policy(@request_for_comment.user).statistics?
|
||||
li = link_to 'All exercises of this user', statistics_external_user_path(id: @request_for_comment.user_id) if policy(@request_for_comment.user).statistics?
|
||||
ul.text
|
||||
li = link_to "Implement the exercise yourself", implement_exercise_path(id: @request_for_comment.exercise_id) if policy(@request_for_comment.exercise).implement?
|
||||
li = link_to "Show the exercise", exercise_path(id: @request_for_comment.exercise_id) if policy(@request_for_comment.exercise).show?
|
||||
li = link_to 'Implement the exercise yourself', implement_exercise_path(id: @request_for_comment.exercise_id) if policy(@request_for_comment.exercise).implement?
|
||||
li = link_to 'Show the exercise', exercise_path(id: @request_for_comment.exercise_id) if policy(@request_for_comment.exercise).show?
|
||||
|
@@ -1,9 +1,9 @@
|
||||
tr.table-row-clickable data-id=request_for_comment.id data-href=request_for_comment_path(request_for_comment)
|
||||
td.p-2
|
||||
- if request_for_comment.solved?
|
||||
span.fa-solid.fa-check.fa-2x.text-success aria-hidden="true"
|
||||
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 style="color: var(--bs-secondary-text-emphasis);" aria-hidden="true"
|
||||
span.fa-solid.fa-check.fa-2x.text-secondary-emphasis aria-hidden='true'
|
||||
- else
|
||||
= ''
|
||||
td.text-center = request_for_comment.comments.size
|
||||
|
@@ -8,25 +8,25 @@ h1 = RequestForComment.model_name.human(count: 2)
|
||||
= f.label(:exercise_title_cont, t('activerecord.attributes.request_for_comments.exercise'), class: 'visually-hidden form-label')
|
||||
= 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.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]])
|
||||
- unless current_user.consumer.rfc_visibility_study_group?
|
||||
.row
|
||||
.col
|
||||
= f.label(:submission_study_group_id_eq, t('request_for_comments.index.study_groups.placeholder'), class: 'visually-hidden form-label')
|
||||
= f.label(:submission_study_group_id_eq, t('request_for_comments.index.study_groups.placeholder'), class: 'visually-hidden form-label')
|
||||
= f.grouped_collection_select(:submission_study_group_id_in, @study_groups_grouping, :second, :first, :id, :to_s, {},
|
||||
{ class: 'form-control', multiple: true, "data-placeholder": t('request_for_comments.index.study_groups.placeholder') })
|
||||
{class: 'form-control', multiple: true, 'data-placeholder': t('request_for_comments.index.study_groups.placeholder')})
|
||||
|
||||
.table-responsive
|
||||
table.table.mt-4 class="#{@request_for_comments.present? ? 'sortable' : ''}"
|
||||
table.table.mt-4 class=(@request_for_comments.present? ? 'sortable' : '')
|
||||
thead
|
||||
tr
|
||||
th
|
||||
i class="fa-regular fa-lightbulb" aria-hidden="true" title = t('request_for_comments.solved') align="right"
|
||||
th.sorttable_nosort = sort_link(@search, :title, t('activerecord.attributes.request_for_comments.exercise'))
|
||||
i.fa-regular.fa-lightbulb aria-hidden='true' title = t('request_for_comments.solved') align='right'
|
||||
th.sorttable_nosort = sort_link(@search, :title, t('activerecord.attributes.request_for_comments.exercise'))
|
||||
th = t('activerecord.attributes.request_for_comments.question')
|
||||
th
|
||||
i class="fa-solid fa-comment" aria-hidden="true" title = t('request_for_comments.comments') align="center"
|
||||
i.fa-solid.fa-comment aria-hidden='true' title = t('request_for_comments.comments') align='center'
|
||||
th = t('activerecord.attributes.request_for_comments.username')
|
||||
th = t('activerecord.attributes.request_for_comments.requested_at')
|
||||
th = t('activerecord.attributes.request_for_comments.last_update')
|
||||
@@ -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 class="fa-solid fa-check" aria-hidden="true"
|
||||
span.fa-solid.fa-check aria-hidden='true'
|
||||
- elsif request_for_comment.full_score_reached
|
||||
td
|
||||
span class="fa-solid fa-check" style="color: var(--bs-secondary-text-emphasis);" aria-hidden="true"
|
||||
span.fa-solid.fa-check.text-secondary-emphasis aria-hidden='true'
|
||||
- else
|
||||
td = ''
|
||||
td = link_to_if(policy(request_for_comment).show?, request_for_comment.submission.exercise.title, request_for_comment)
|
||||
|
@@ -1,12 +1,12 @@
|
||||
.list-group
|
||||
h4#exercise_caption.list-group-item-heading data-exercise-id="#{@request_for_comment.exercise.id}" data-rfc-id="#{@request_for_comment.id}"
|
||||
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.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
|
||||
- submission = @request_for_comment.submission
|
||||
- testruns = Testrun.where(:submission_id => @request_for_comment.submission)
|
||||
- submission = @request_for_comment.submission
|
||||
- testruns = Testrun.where(submission_id: @request_for_comment.submission)
|
||||
= link_to_if(policy(user).show?, user.displayname, user)
|
||||
| | #{@request_for_comment.created_at.localtime}
|
||||
- if @request_for_comment.submission.study_group.present? && policy(@request_for_comment.submission).show_study_group?
|
||||
@@ -25,33 +25,33 @@
|
||||
= t('activerecord.attributes.request_for_comments.question')
|
||||
.text
|
||||
- question = @request_for_comment.question
|
||||
= question.blank? ? t('request_for_comments.no_question') : question
|
||||
= question.presence || t('request_for_comments.no_question')
|
||||
|
||||
- if policy(@request_for_comment).mark_as_solved? and not @request_for_comment.solved?
|
||||
- if policy(@request_for_comment).mark_as_solved? && !@request_for_comment.solved?
|
||||
= render('mark_as_solved')
|
||||
|
||||
- if testruns.size > 0
|
||||
- if testruns.size.positive?
|
||||
.testruns
|
||||
- output_runs = testruns.select {|run| run.cause == 'run'}
|
||||
- if output_runs.size > 0
|
||||
h5.mt-4= t('request_for_comments.runtime_output')
|
||||
- output_runs = testruns.select {|run| run.cause == 'run' }
|
||||
- if output_runs.size.positive?
|
||||
h5.mt-4 = t('request_for_comments.runtime_output')
|
||||
.collapsed.testrun-output.text
|
||||
span.fa-solid.fa-chevron-down.collapse-button
|
||||
- output_runs.each do |testrun|
|
||||
pre= testrun.log or t('request_for_comments.no_output')
|
||||
pre = testrun.log || t('request_for_comments.no_output')
|
||||
|
||||
- assess_runs = testruns.select {|run| run.cause == 'assess' }
|
||||
- unless current_user.admin?
|
||||
- assess_runs = assess_runs.select {|run| run.file.present? ? !run.file.hidden_feedback?: true }
|
||||
- if assess_runs.size > 0
|
||||
h5.mt-4= t('request_for_comments.test_results')
|
||||
- assess_runs = assess_runs.select {|run| run.file.present? ? !run.file.hidden_feedback? : true }
|
||||
- if assess_runs.size.positive?
|
||||
h5.mt-4 = t('request_for_comments.test_results')
|
||||
.testrun-assess-results
|
||||
- assess_runs.each do |testrun|
|
||||
.testrun-container
|
||||
div class=("result #{testrun.passed ? 'passed' : 'failed'}")
|
||||
div class="result #{testrun.passed ? 'passed' : 'failed'}"
|
||||
.collapsed.testrun-output.text
|
||||
span.fa-solid.fa-chevron-down.collapse-button
|
||||
pre= testrun.log or t('request_for_comments.no_output')
|
||||
pre = testrun.log || t('request_for_comments.no_output')
|
||||
|
||||
- if current_user.admin? && user.is_a?(ExternalUser)
|
||||
= render('admin_menu')
|
||||
@@ -69,12 +69,12 @@
|
||||
| do not put a carriage return in the line below. it will be present in the presentation of the source code, otherwise.
|
||||
| also, all settings from the rails model needed for the editor configuration in the JavaScript are attached to the editor as data attributes here.
|
||||
- submission.files.each do |file|
|
||||
= (file.path or "") + "/" + file.name + file.file_type.file_extension
|
||||
= "#{file.path || ''}/#{file.name}#{file.file_type.file_extension}"
|
||||
br
|
||||
|
|
||||
i.fa-solid.fa-arrow-down aria-hidden="true"
|
||||
i.fa-solid.fa-arrow-down aria-hidden='true'
|
||||
= t('request_for_comments.click_here')
|
||||
#commentitor.editor data-file-id="#{file.id}" data-mode="#{file.file_type.editor_mode}" data-read-only="true"
|
||||
#commentitor.editor data-file-id=file.id data-mode=file.file_type.editor_mode data-read-only='true'
|
||||
= file.content
|
||||
|
||||
= render('shared/modal', id: 'comment-modal', title: t('exercises.implement.comment.dialogtitle'), template: 'exercises/_comment_dialogcontent')
|
||||
|
Reference in New Issue
Block a user