Merge remote-tracking branch 'tootsuite/master' into glitchsoc/master

This commit is contained in:
Jenkins
2018-04-11 00:50:09 +00:00
40 changed files with 488 additions and 110 deletions

View File

@ -36,9 +36,13 @@
%th= t('admin.accounts.email')
%td
= @account.user_email
- if @account.user_confirmed?
= fa_icon('check')
= table_link_to 'edit', t('admin.accounts.change_email.label'), admin_account_change_email_path(@account.id) if can?(:change_email, @account.user)
- if @account.user_unconfirmed_email.present?
%th= t('admin.accounts.unconfirmed_email')
%td
= @account.user_unconfirmed_email
%tr
%th= t('admin.accounts.login_status')
%td

View File

@ -0,0 +1,7 @@
- content_for :page_title do
= t('admin.accounts.change_email.title', username: @account.acct)
= simple_form_for @user, url: admin_account_change_email_path(@account.id) do |f|
= f.input :email, wrapper: :with_label, disabled: true, label: t('admin.accounts.change_email.current_email')
= f.input :unconfirmed_email, wrapper: :with_label, label: t('admin.accounts.change_email.new_email')
= f.button :submit, class: "button", value: t('admin.accounts.change_email.submit')

View File

@ -1,11 +1,9 @@
%tr
%td
%p
%strong= report_note.account.acct
on
%li
%h4
= report_note.account.acct
%div{ style: 'float: right' }
%time.formatted{ datetime: report_note.created_at.iso8601, title: l(report_note.created_at) }
= l report_note.created_at
= table_link_to 'trash', t('admin.reports.notes.delete'), admin_report_note_path(report_note), method: :delete if can?(:destroy, report_note)
%br/
%br/
%div{ class: 'report-note__comment' }
= simple_format(h(report_note.content))

View File

@ -2,7 +2,7 @@
= t('admin.reports.report', id: @report.id)
%div{ style: 'overflow: hidden; margin-bottom: 20px' }
- if !@report.action_taken?
- if @report.unresolved?
%div{ style: 'float: right' }
= link_to t('admin.reports.silence_account'), admin_report_path(@report, outcome: 'silence'), method: :put, class: 'button'
= link_to t('admin.reports.suspend_account'), admin_report_path(@report, outcome: 'suspend'), method: :put, class: 'button'
@ -14,22 +14,29 @@
.table-wrapper
%table.table.inline-table
%tbody
%tr
%th= t('admin.reports.created_at')
%td{colspan: 2}
%time.formatted{ datetime: @report.created_at.iso8601 }
%tr
%th= t('admin.reports.updated_at')
%td{colspan: 2}
%time.formatted{ datetime: @report.updated_at.iso8601 }
%tr
%th= t('admin.reports.status')
%td{colspan: 2}
%td
- if @report.action_taken?
= t('admin.reports.resolved')
= table_link_to 'envelope-open', t('admin.reports.reopen'), admin_report_path(@report, outcome: 'reopen'), method: :put
- else
= t('admin.reports.unresolved')
%td{style: "text-align: right; overflow: hidden;"}
- if @report.action_taken?
= table_link_to 'envelope-open', t('admin.reports.reopen'), admin_report_path(@report, outcome: 'reopen'), method: :put
- if !@report.action_taken_by_account.nil?
%tr
%th= t('admin.reports.action_taken_by')
%td= @report.action_taken_by_account.acct
%td{colspan: 2}
= @report.action_taken_by_account.acct
- else
%tr
%th= t('admin.reports.assigned')
@ -44,6 +51,8 @@
- if !@report.assigned_account.nil?
= table_link_to 'trash', t('admin.reports.unassign'), admin_report_path(@report, outcome: 'unassign'), method: :put
%hr{ class: "section-break"}/
.report-accounts
.report-accounts__item
%h3= t('admin.reports.reported_account')
@ -85,22 +94,28 @@
= link_to admin_report_reported_status_path(@report, status), method: :delete, class: 'icon-button trash-button', title: t('admin.reports.delete'), data: { confirm: t('admin.reports.are_you_sure') }, remote: true do
= fa_icon 'trash'
%hr/
%hr{ class: "section-break"}/
%h3= t('admin.reports.notes.label')
- if @report_notes.length > 0
.table-wrapper
%table.table
%thead
%tr
%th
%tbody
= render @report_notes
%ul
= render @report_notes
= simple_form_for @report_note, url: admin_report_notes_path do |f|
%h4= t('admin.reports.notes.new_label')
= form_for @report_note, url: admin_report_notes_path, html: { class: 'report-note__form' } do |f|
= render 'shared/error_messages', object: @report_note
= f.input :content
= f.text_area :content, placeholder: t('admin.reports.notes.placeholder'), rows: 6, class: 'report-note__textarea'
= f.hidden_field :report_id
= f.button :button, t('admin.reports.notes.create'), type: :submit
= f.button :button, t('admin.reports.notes.create_and_resolve'), type: :submit, name: :create_and_resolve
%div{ class: 'report-note__buttons' }
- if @report.unresolved?
= f.submit t('admin.reports.notes.create_and_resolve'), name: :create_and_resolve, class: 'button report-note__button'
- else
= f.submit t('admin.reports.notes.create_and_unresolve'), name: :create_and_unresolve, class: 'button report-note__button'
= f.submit t('admin.reports.notes.create'), class: 'button report-note__button'
- if @report_history.length > 0
%h3= t('admin.reports.history')
%ul
= render @report_history