diff --git a/app/views/moderation/_moderationbox.haml b/app/views/moderation/_moderationbox.haml index d92f4e02..aab36fe3 100644 --- a/app/views/moderation/_moderationbox.haml +++ b/app/views/moderation/_moderationbox.haml @@ -2,21 +2,21 @@ .card.moderationbox{ data: { id: report.id } } .card-header %img.avatar-sm{ src: report.user.profile_picture.url(:medium) } - = t('.reported_html', + = t(".reported_html", user: user_screen_name(report.user), - content: report.type.sub('Reports::', ''), + content: report.type.sub("Reports::", ""), time: time_tooltip(report)) .card-body %p - - if report.type == 'Reports::User' + - if report.type == "Reports::User" = user_screen_name report.target - else = report.target.content %p - %b= t('.reason.heading') + %b= t(".reason.heading") %br - if report.reason.nil? || report.reason.strip.blank? - = t('.reason.none') + = t(".reason.none") - else - report.reason.lines.each do |reason| - next if reason.strip.blank? @@ -24,10 +24,10 @@ .row .col-md-8.col-sm-8.col-xs-8.text-left %a.btn.btn-primary{ href: content_url(report) } - = t('.view', content: report.type.sub('Reports::', '')) + = t(".view", content: report.type.sub("Reports::", "")) - if report.target.respond_to?(:user) && report.target.user %a.btn.btn-primary{ href: user_path(report.target.user) } - = t('.view', content: t('activerecord.models.user.one')) + = t(".view", content: t("activerecord.models.user.one")) .col-md-4.col-sm-4.col-xs-4.text-right - %button.btn.btn-default.btn-sm{ type: :button, name: 'mod-delete-report', data: { id: report.id } } + %button.btn.btn-default.btn-sm{ type: :button, name: "mod-delete-report", data: { id: report.id } } %i.fa.fa-trash-o diff --git a/app/views/moderation/index.haml b/app/views/moderation/index.haml index 0b73d230..0bcb623a 100644 --- a/app/views/moderation/index.haml +++ b/app/views/moderation/index.haml @@ -1,11 +1,11 @@ #reports - @reports.each do |r| - = render 'moderation/moderationbox', report: r + = render "moderation/moderationbox", report: r - unless @reports.count.zero? - = render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @reports_last_id, permitted_params: %i[type] + = render "shared/cursored_pagination_dummy", more_data_available: @more_data_available, last_id: @reports_last_id, permitted_params: %i[type] - if @more_data_available .d-flex.justify-content-center.justify-content-sm-start %button.btn.btn-light#load-more-btn{ type: :button, data: { last_id: @reports_last_id } } - = t 'views.actions.load' + = t("voc.load") diff --git a/app/views/tabs/_moderation.haml b/app/views/tabs/_moderation.haml index 4b7c8f43..5b2ccb89 100644 --- a/app/views/tabs/_moderation.haml +++ b/app/views/tabs/_moderation.haml @@ -1,9 +1,9 @@ .card .list-group - = list_group_item t('.all'), moderation_path - = list_group_item t('.answers'), moderation_path('answer') - = list_group_item t('.comments'), moderation_path('comment') - = list_group_item t('.users'), moderation_path('user') - = list_group_item t('.questions'), moderation_path('question') + = list_group_item t(".all"), moderation_path + = list_group_item t(".answers"), moderation_path("answer") + = list_group_item t(".comments"), moderation_path("comment") + = list_group_item t(".users"), moderation_path("user") + = list_group_item t(".questions"), moderation_path("question") -.d-none.d-sm-block= render 'shared/links' +.d-none.d-sm-block= render "shared/links"