* Wip * Wip * Wip: History * Wip: テストコード作成 * Fix test * Wip * Wip * Wip * Fix test * Wip * Wip * Wip * Wip * なんとか完成、これから動作確認 * spell miss * Change ng rule timings * Fix test * Wip * Fix test * Wip * Fix form * 表示まわりの改善
This commit is contained in:
parent
0779c748a6
commit
7d96d5828e
56 changed files with 2062 additions and 42 deletions
42
app/views/admin/ng_rule_histories/_history.html.haml
Normal file
42
app/views/admin/ng_rule_histories/_history.html.haml
Normal file
|
@ -0,0 +1,42 @@
|
|||
.batch-table__row
|
||||
%label.batch-table__row__select.batch-checkbox
|
||||
-# = f.check_box :history_ids, { multiple: true, include_hidden: false }, history.id
|
||||
.batch-table__row__content
|
||||
- if history.hidden
|
||||
.simple_form
|
||||
%p.hint= t('admin.ng_rule_histories.hidden')
|
||||
- else
|
||||
.status__content><
|
||||
= html_aware_format(history.text, history.local)
|
||||
|
||||
.detailed-status__meta
|
||||
= t("admin.ng_rule_histories.reason_actions.#{history.reason_action}")
|
||||
- if history.data.present? && !history.hidden
|
||||
- if history.data['media_count'].present? && history.data['media_count'].positive?
|
||||
·
|
||||
= t('admin.ng_rule_histories.data.media_count', count: history.data['media_count'])
|
||||
- if history.data['poll_count'].present? && history.data['poll_count'].positive?
|
||||
·
|
||||
= t('admin.ng_rule_histories.data.poll_count', count: history.data['poll_count'])
|
||||
|
||||
%br/
|
||||
|
||||
- if history.account.present?
|
||||
- if history.hidden
|
||||
- if history.account.local?
|
||||
= t('admin.ng_rule_histories.from_local_user')
|
||||
- else
|
||||
= history.account.domain
|
||||
·
|
||||
- else
|
||||
= link_to t('admin.ng_rule_histories.moderate_account'), admin_account_path(history.account.id)
|
||||
·
|
||||
|
||||
%time.formatted{ datetime: history.created_at.iso8601, title: l(history.created_at) }= l(history.created_at)
|
||||
|
||||
- if history.uri.present? && !history.hidden
|
||||
·
|
||||
- if history.data.present? && history.data['url'].present?
|
||||
= link_to history.uri, history.data['url'] || history.uri, target: '_blank', rel: 'noopener'
|
||||
- else
|
||||
= link_to history.uri, target: '_blank', rel: 'noopener'
|
25
app/views/admin/ng_rule_histories/show.html.haml
Normal file
25
app/views/admin/ng_rule_histories/show.html.haml
Normal file
|
@ -0,0 +1,25 @@
|
|||
- content_for :page_title do
|
||||
= t('admin.ng_rule_histories.title', title: @ng_rule.title)
|
||||
|
||||
.filters
|
||||
.back-link
|
||||
= link_to edit_admin_ng_rule_path(id: @ng_rule.id) do
|
||||
= fa_icon 'chevron-left fw'
|
||||
= t('admin.ng_rule_histories.back_to_ng_rule')
|
||||
= link_to admin_ng_rules_path do
|
||||
= fa_icon 'chevron-left fw'
|
||||
= t('admin.ng_rule_histories.back_to_ng_rules')
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.batch-table
|
||||
.batch-table__toolbar
|
||||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__body
|
||||
- if @histories.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
- else
|
||||
= render partial: 'admin/ng_rule_histories/history', collection: @histories
|
||||
|
||||
= paginate @histories
|
Loading…
Add table
Add a link
Reference in a new issue