Fix haml-lint `LineLength` cops in app/views/admin (#28680)
parent
7720c684c5
commit
f445d33fd6
|
@ -1,13 +0,0 @@
|
|||
# This configuration was generated by
|
||||
# `haml-lint --auto-gen-config`
|
||||
# on 2024-01-09 11:30:07 -0500 using Haml-Lint version 0.53.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the lints are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of Haml-Lint, may require this file to be generated again.
|
||||
|
||||
linters:
|
||||
# Offense count: 1
|
||||
LineLength:
|
||||
exclude:
|
||||
- 'app/views/admin/roles/_form.html.haml'
|
|
@ -2,29 +2,48 @@
|
|||
= t('admin.account_actions.title', acct: @account.pretty_acct)
|
||||
|
||||
= simple_form_for @account_action, url: admin_account_action_path(@account.id) do |f|
|
||||
= f.input :report_id, as: :hidden
|
||||
= f.input :report_id,
|
||||
as: :hidden
|
||||
|
||||
.fields-group
|
||||
= f.input :type, as: :radio_buttons, collection: Admin::AccountAction.types_for_account(@account), include_blank: false, wrapper: :with_block_label, label_method: ->(type) { account_action_type_label(type) }, hint: t('simple_form.hints.admin_account_action.type_html', acct: @account.pretty_acct)
|
||||
= f.input :type,
|
||||
as: :radio_buttons,
|
||||
collection: Admin::AccountAction.types_for_account(@account),
|
||||
hint: t('simple_form.hints.admin_account_action.type_html', acct: @account.pretty_acct),
|
||||
include_blank: false,
|
||||
label_method: ->(type) { account_action_type_label(type) },
|
||||
wrapper: :with_block_label
|
||||
|
||||
- if @account.local?
|
||||
%hr.spacer/
|
||||
|
||||
.fields-group
|
||||
= f.input :send_email_notification, as: :boolean, wrapper: :with_label
|
||||
= f.input :send_email_notification,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
- if params[:report_id].present?
|
||||
.fields-group
|
||||
= f.input :include_statuses, as: :boolean, wrapper: :with_label
|
||||
= f.input :include_statuses,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
- unless @warning_presets.empty?
|
||||
.fields-group
|
||||
= f.input :warning_preset_id, collection: @warning_presets, label_method: ->(warning_preset) { [warning_preset.title.presence, truncate(warning_preset.text)].compact.join(' - ') }, wrapper: :with_block_label
|
||||
= f.input :warning_preset_id,
|
||||
collection: @warning_presets,
|
||||
label_method: ->(warning_preset) { [warning_preset.title.presence, truncate(warning_preset.text)].compact.join(' - ') },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :text, as: :text, wrapper: :with_block_label, hint: t('simple_form.hints.admin_account_action.text_html', path: admin_warning_presets_path)
|
||||
= f.input :text,
|
||||
as: :text,
|
||||
hint: t('simple_form.hints.admin_account_action.text_html', path: admin_warning_presets_path),
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('admin.account_actions.action'), type: :submit
|
||||
= f.button :button,
|
||||
t('admin.account_actions.action'),
|
||||
type: :submit
|
||||
|
|
|
@ -6,19 +6,26 @@
|
|||
.filter-subset.filter-subset--with-select
|
||||
%strong= t('admin.accounts.location.title')
|
||||
.input.select.optional
|
||||
= select_tag :origin, options_for_select([[t('admin.accounts.location.local'), 'local'], [t('admin.accounts.location.remote'), 'remote']], params[:origin]), prompt: I18n.t('generic.all')
|
||||
= select_tag :origin,
|
||||
options_for_select([[t('admin.accounts.location.local'), 'local'], [t('admin.accounts.location.remote'), 'remote']], params[:origin]),
|
||||
prompt: I18n.t('generic.all')
|
||||
.filter-subset.filter-subset--with-select
|
||||
%strong= t('admin.accounts.moderation.title')
|
||||
.input.select.optional
|
||||
= select_tag :status, options_for_select(admin_accounts_moderation_options, params[:status]), prompt: I18n.t('generic.all')
|
||||
= select_tag :status,
|
||||
options_for_select(admin_accounts_moderation_options, params[:status]),
|
||||
prompt: I18n.t('generic.all')
|
||||
.filter-subset.filter-subset--with-select
|
||||
%strong= t('admin.accounts.role')
|
||||
.input.select.optional
|
||||
= select_tag :role_ids, options_from_collection_for_select(UserRole.assignable, :id, :name, params[:role_ids]), prompt: I18n.t('admin.accounts.moderation.all')
|
||||
= select_tag :role_ids,
|
||||
options_from_collection_for_select(UserRole.assignable, :id, :name, params[:role_ids]),
|
||||
prompt: I18n.t('admin.accounts.moderation.all')
|
||||
.filter-subset.filter-subset--with-select
|
||||
%strong= t 'generic.order_by'
|
||||
.input.select
|
||||
= select_tag :order, options_for_select([[t('relationships.most_recent'), 'recent'], [t('relationships.last_active'), 'active']], params[:order])
|
||||
= select_tag :order,
|
||||
options_for_select([[t('relationships.most_recent'), 'recent'], [t('relationships.last_active'), 'active']], params[:order])
|
||||
|
||||
.fields-group
|
||||
- %i(username by_domain display_name email ip).each do |key|
|
||||
|
@ -46,11 +53,23 @@
|
|||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
- if @accounts.any?(&:user_pending?)
|
||||
= f.button safe_join([fa_icon('check'), t('admin.accounts.approve')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('check'), t('admin.accounts.approve')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :approve,
|
||||
type: :submit
|
||||
|
||||
= f.button safe_join([fa_icon('times'), t('admin.accounts.reject')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.accounts.reject')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :reject,
|
||||
type: :submit
|
||||
|
||||
= f.button safe_join([fa_icon('lock'), t('admin.accounts.perform_full_suspension')]), name: :suspend, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('lock'), t('admin.accounts.perform_full_suspension')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :suspend,
|
||||
type: :submit
|
||||
- if @accounts.total_count > @accounts.size
|
||||
.batch-table__select-all
|
||||
.not-selected.active
|
||||
|
|
|
@ -5,18 +5,33 @@
|
|||
= render 'shared/error_messages', object: @announcement
|
||||
|
||||
.fields-group
|
||||
= f.input :starts_at, include_blank: true, wrapper: :with_block_label, html5: true, input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder }
|
||||
= f.input :ends_at, include_blank: true, wrapper: :with_block_label, html5: true, input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder }
|
||||
= f.input :starts_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
= f.input :ends_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :all_day, as: :boolean, wrapper: :with_label
|
||||
= f.input :all_day,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :text, wrapper: :with_block_label
|
||||
= f.input :text,
|
||||
wrapper: :with_block_label
|
||||
|
||||
- unless @announcement.published?
|
||||
.fields-group
|
||||
= f.input :scheduled_at, include_blank: true, wrapper: :with_block_label, html5: true, input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder }
|
||||
= f.input :scheduled_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -5,17 +5,34 @@
|
|||
= render 'shared/error_messages', object: @announcement
|
||||
|
||||
.fields-group
|
||||
= f.input :starts_at, include_blank: true, wrapper: :with_block_label, html5: true, input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder }
|
||||
= f.input :ends_at, include_blank: true, wrapper: :with_block_label, html5: true, input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder }
|
||||
= f.input :starts_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
= f.input :ends_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :all_day, as: :boolean, wrapper: :with_label
|
||||
= f.input :all_day,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :text, wrapper: :with_block_label
|
||||
= f.input :text,
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :scheduled_at, include_blank: true, wrapper: :with_block_label, html5: true, input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder }
|
||||
= f.input :scheduled_at,
|
||||
html5: true,
|
||||
include_blank: true,
|
||||
input_html: { pattern: datetime_pattern, placeholder: datetime_placeholder },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('.create'), type: :submit
|
||||
= f.button :button,
|
||||
t('.create'),
|
||||
type: :submit
|
||||
|
|
|
@ -68,12 +68,19 @@
|
|||
.fields-group.fields-row__column.fields-row__column-6
|
||||
.input.select.optional
|
||||
.label_input
|
||||
= f.select :category_id, options_from_collection_for_select(CustomEmojiCategory.all, 'id', 'name'), prompt: t('admin.custom_emojis.assign_category'), class: 'select optional', 'aria-label': t('admin.custom_emojis.assign_category')
|
||||
= f.select :category_id,
|
||||
options_from_collection_for_select(CustomEmojiCategory.all, 'id', 'name'),
|
||||
'aria-label': t('admin.custom_emojis.assign_category'),
|
||||
class: 'select optional',
|
||||
prompt: t('admin.custom_emojis.assign_category')
|
||||
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
.input.string.optional
|
||||
.label_input
|
||||
= f.text_field :category_name, class: 'string optional', placeholder: t('admin.custom_emojis.create_new_category'), 'aria-label': t('admin.custom_emojis.create_new_category')
|
||||
= f.text_field :category_name,
|
||||
'aria-label': t('admin.custom_emojis.create_new_category'),
|
||||
class: 'string optional',
|
||||
placeholder: t('admin.custom_emojis.create_new_category')
|
||||
|
||||
.batch-table__body
|
||||
- if @custom_emojis.empty?
|
||||
|
|
|
@ -5,9 +5,17 @@
|
|||
= render 'shared/error_messages', object: @custom_emoji
|
||||
|
||||
.fields-group
|
||||
= f.input :shortcode, wrapper: :with_label, label: t('admin.custom_emojis.shortcode'), hint: t('admin.custom_emojis.shortcode_hint')
|
||||
= f.input :shortcode,
|
||||
wrapper: :with_label,
|
||||
label: t('admin.custom_emojis.shortcode'),
|
||||
hint: t('admin.custom_emojis.shortcode_hint')
|
||||
.fields-group
|
||||
= f.input :image, wrapper: :with_label, input_html: { accept: CustomEmoji::IMAGE_MIME_TYPES.join(',') }, hint: t('admin.custom_emojis.image_hint', size: number_to_human_size(CustomEmoji::LIMIT))
|
||||
= f.input :image,
|
||||
wrapper: :with_label,
|
||||
input_html: { accept: CustomEmoji::IMAGE_MIME_TYPES.join(',') },
|
||||
hint: t('admin.custom_emojis.image_hint', size: number_to_human_size(CustomEmoji::LIMIT))
|
||||
|
||||
.actions
|
||||
= f.button :button, t('admin.custom_emojis.upload'), type: :submit
|
||||
= f.button :button,
|
||||
t('admin.custom_emojis.upload'),
|
||||
type: :submit
|
||||
|
|
|
@ -6,25 +6,58 @@
|
|||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :domain, wrapper: :with_label, label: t('admin.domain_blocks.domain'), hint: t('admin.domain_blocks.new.hint'), required: true, readonly: true, disabled: true
|
||||
= f.input :domain,
|
||||
disabled: true,
|
||||
hint: t('admin.domain_blocks.new.hint'),
|
||||
label: t('admin.domain_blocks.domain'),
|
||||
readonly: true,
|
||||
required: true,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: ->(type) { t("admin.domain_blocks.new.severity.#{type}") }, hint: t('admin.domain_blocks.new.severity.desc_html')
|
||||
= f.input :severity,
|
||||
collection: DomainBlock.severities.keys,
|
||||
hint: t('admin.domain_blocks.new.severity.desc_html'),
|
||||
include_blank: false,
|
||||
label_method: ->(type) { t("admin.domain_blocks.new.severity.#{type}") },
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint')
|
||||
= f.input :reject_media,
|
||||
as: :boolean,
|
||||
hint: I18n.t('admin.domain_blocks.reject_media_hint'),
|
||||
label: I18n.t('admin.domain_blocks.reject_media'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint')
|
||||
= f.input :reject_reports,
|
||||
as: :boolean,
|
||||
hint: I18n.t('admin.domain_blocks.reject_reports_hint'),
|
||||
label: I18n.t('admin.domain_blocks.reject_reports'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :obfuscate, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.obfuscate'), hint: I18n.t('admin.domain_blocks.obfuscate_hint')
|
||||
= f.input :obfuscate,
|
||||
as: :boolean,
|
||||
hint: I18n.t('admin.domain_blocks.obfuscate_hint'),
|
||||
label: I18n.t('admin.domain_blocks.obfuscate'),
|
||||
wrapper: :with_label
|
||||
|
||||
.field-group
|
||||
= f.input :private_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.private_comment'), hint: t('admin.domain_blocks.private_comment_hint'), as: :string
|
||||
= f.input :private_comment,
|
||||
as: :string,
|
||||
hint: t('admin.domain_blocks.private_comment_hint'),
|
||||
label: I18n.t('admin.domain_blocks.private_comment'),
|
||||
wrapper: :with_label
|
||||
|
||||
.field-group
|
||||
= f.input :public_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.public_comment'), hint: t('admin.domain_blocks.public_comment_hint'), as: :string
|
||||
= f.input :public_comment,
|
||||
as: :string,
|
||||
hint: t('admin.domain_blocks.public_comment_hint'),
|
||||
label: I18n.t('admin.domain_blocks.public_comment'),
|
||||
wrapper: :with_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
= f.button :button,
|
||||
t('generic.save_changes'),
|
||||
type: :submit
|
||||
|
|
|
@ -6,25 +6,56 @@
|
|||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :domain, wrapper: :with_label, label: t('admin.domain_blocks.domain'), hint: t('.hint'), required: true
|
||||
= f.input :domain,
|
||||
hint: t('.hint'),
|
||||
label: t('admin.domain_blocks.domain'),
|
||||
required: true,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: ->(type) { t(".severity.#{type}") }, hint: t('.severity.desc_html')
|
||||
= f.input :severity,
|
||||
collection: DomainBlock.severities.keys,
|
||||
hint: t('.severity.desc_html'),
|
||||
include_blank: false,
|
||||
label_method: ->(type) { t(".severity.#{type}") },
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint')
|
||||
= f.input :reject_media,
|
||||
as: :boolean,
|
||||
hint: I18n.t('admin.domain_blocks.reject_media_hint'),
|
||||
label: I18n.t('admin.domain_blocks.reject_media'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :reject_reports, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_reports'), hint: I18n.t('admin.domain_blocks.reject_reports_hint')
|
||||
= f.input :reject_reports,
|
||||
as: :boolean,
|
||||
hint: I18n.t('admin.domain_blocks.reject_reports_hint'),
|
||||
label: I18n.t('admin.domain_blocks.reject_reports'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :obfuscate, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.obfuscate'), hint: I18n.t('admin.domain_blocks.obfuscate_hint')
|
||||
= f.input :obfuscate,
|
||||
as: :boolean,
|
||||
hint: I18n.t('admin.domain_blocks.obfuscate_hint'),
|
||||
label: I18n.t('admin.domain_blocks.obfuscate'),
|
||||
wrapper: :with_label
|
||||
|
||||
.field-group
|
||||
= f.input :private_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.private_comment'), hint: t('admin.domain_blocks.private_comment_hint'), as: :string
|
||||
= f.input :private_comment,
|
||||
as: :string,
|
||||
hint: t('admin.domain_blocks.private_comment_hint'),
|
||||
label: I18n.t('admin.domain_blocks.private_comment'),
|
||||
wrapper: :with_label
|
||||
|
||||
.field-group
|
||||
= f.input :public_comment, wrapper: :with_label, label: I18n.t('admin.domain_blocks.public_comment'), hint: t('admin.domain_blocks.public_comment_hint'), as: :string
|
||||
= f.input :public_comment,
|
||||
as: :string,
|
||||
hint: t('admin.domain_blocks.public_comment_hint'),
|
||||
label: I18n.t('admin.domain_blocks.public_comment'),
|
||||
wrapper: :with_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('.create'), type: :submit
|
||||
= f.button :button,
|
||||
t('.create'),
|
||||
type: :submit
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
= f.button safe_join([fa_icon('times'), t('admin.email_domain_blocks.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.email_domain_blocks.delete')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :delete,
|
||||
type: :submit
|
||||
.batch-table__body
|
||||
- if @email_domain_blocks.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
|
|
|
@ -5,10 +5,16 @@
|
|||
= render 'shared/error_messages', object: @email_domain_block
|
||||
|
||||
.fields-group
|
||||
= f.input :domain, wrapper: :with_block_label, label: t('admin.email_domain_blocks.domain'), input_html: { readonly: defined?(@resolved_records) }
|
||||
= f.input :domain,
|
||||
input_html: { readonly: defined?(@resolved_records) },
|
||||
label: t('admin.email_domain_blocks.domain'),
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :allow_with_approval, wrapper: :with_label, hint: false, label: I18n.t('admin.email_domain_blocks.allow_registrations_with_approval')
|
||||
= f.input :allow_with_approval,
|
||||
hint: false,
|
||||
label: I18n.t('admin.email_domain_blocks.allow_registrations_with_approval'),
|
||||
wrapper: :with_label
|
||||
|
||||
- if defined?(@resolved_records)
|
||||
%p.hint= t('admin.email_domain_blocks.resolved_dns_records_hint_html')
|
||||
|
@ -22,7 +28,11 @@
|
|||
- @resolved_records.each do |record|
|
||||
.batch-table__row
|
||||
%label.batch-table__row__select.batch-table__row__select--aligned.batch-checkbox
|
||||
= f.input_field :other_domains, as: :boolean, checked_value: record.exchange.to_s, include_hidden: false, multiple: true
|
||||
= f.input_field :other_domains,
|
||||
as: :boolean,
|
||||
checked_value: record.exchange.to_s,
|
||||
include_hidden: false,
|
||||
multiple: true
|
||||
.batch-table__row__content.pending-account
|
||||
.pending-account__header
|
||||
%samp= record.exchange.to_s
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
= simple_form_for @import, url: import_admin_export_domain_allows_path, html: { multipart: true } do |f|
|
||||
.fields-row
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :data, wrapper: :with_block_label, hint: t('simple_form.hints.imports.data'), as: :file
|
||||
= f.input :data,
|
||||
as: :file,
|
||||
hint: t('simple_form.hints.imports.data'),
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('imports.upload'), type: :submit
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
= f.button safe_join([fa_icon('copy'), t('admin.domain_blocks.import')]), name: :save, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('copy'), t('admin.domain_blocks.import')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :save,
|
||||
type: :submit
|
||||
.batch-table__body
|
||||
- if @domain_blocks.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
= simple_form_for @import, url: import_admin_export_domain_blocks_path, html: { multipart: true } do |f|
|
||||
.fields-row
|
||||
.fields-group.fields-row__column.fields-row__column-6
|
||||
= f.input :data, wrapper: :with_block_label, hint: t('simple_form.hints.imports.data'), as: :file
|
||||
= f.input :data,
|
||||
as: :file,
|
||||
hint: t('simple_form.hints.imports.data'),
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('imports.upload'), type: :submit
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
.filter-subset.filter-subset--with-select
|
||||
%strong= t('admin.follow_recommendations.language')
|
||||
.input.select.optional
|
||||
= select_tag :language, options_for_select(Trends.available_locales.map { |key| [standard_locale_name(key), key] }, @language)
|
||||
= select_tag :language,
|
||||
options_for_select(Trends.available_locales.map { |key| [standard_locale_name(key), key] }, @language)
|
||||
.filter-subset
|
||||
%strong= t('admin.follow_recommendations.status')
|
||||
%ul
|
||||
|
@ -30,9 +31,16 @@
|
|||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
- if params[:status].blank? && can?(:suppress, :follow_recommendation)
|
||||
= f.button safe_join([fa_icon('times'), t('admin.follow_recommendations.suppress')]), name: :suppress, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.follow_recommendations.suppress')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :suppress,
|
||||
type: :submit
|
||||
- if params[:status] == 'suppressed' && can?(:unsuppress, :follow_recommendation)
|
||||
= f.button safe_join([fa_icon('plus'), t('admin.follow_recommendations.unsuppress')]), name: :unsuppress, class: 'table-action-link', type: :submit
|
||||
= f.button safe_join([fa_icon('plus'), t('admin.follow_recommendations.unsuppress')]),
|
||||
class: 'table-action-link',
|
||||
name: :unsuppress,
|
||||
type: :submit
|
||||
.batch-table__body
|
||||
- if @accounts.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
|
|
|
@ -14,7 +14,11 @@
|
|||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
- if can?(:destroy, :ip_block)
|
||||
= f.button safe_join([fa_icon('times'), t('admin.ip_blocks.delete')]), name: :delete, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.ip_blocks.delete')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :delete,
|
||||
type: :submit
|
||||
.batch-table__body
|
||||
- if @ip_blocks.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
|
|
|
@ -5,16 +5,30 @@
|
|||
= render 'shared/error_messages', object: @ip_block
|
||||
|
||||
.fields-group
|
||||
= f.input :ip, as: :string, wrapper: :with_block_label, input_html: { placeholder: '192.0.2.0/24' }
|
||||
= f.input :ip,
|
||||
as: :string,
|
||||
input_html: { placeholder: '192.0.2.0/24' },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :expires_in, wrapper: :with_block_label, collection: [1.day, 2.weeks, 1.month, 6.months, 1.year, 3.years].map(&:to_i), label_method: ->(i) { I18n.t("admin.ip_blocks.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt')
|
||||
= f.input :expires_in,
|
||||
collection: [1.day, 2.weeks, 1.month, 6.months, 1.year, 3.years].map(&:to_i),
|
||||
label_method: ->(i) { I18n.t("admin.ip_blocks.expires_in.#{i}") },
|
||||
prompt: I18n.t('invites.expires_in_prompt'),
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :severity, as: :radio_buttons, collection: IpBlock.severities.keys, include_blank: false, wrapper: :with_block_label, label_method: ->(severity) { ip_blocks_severity_label(severity) }
|
||||
= f.input :severity,
|
||||
as: :radio_buttons,
|
||||
collection: IpBlock.severities.keys,
|
||||
include_blank: false,
|
||||
label_method: ->(severity) { ip_blocks_severity_label(severity) },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :comment, as: :string, wrapper: :with_block_label
|
||||
= f.input :comment,
|
||||
as: :string,
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('admin.ip_blocks.add_new'), type: :submit
|
||||
|
|
|
@ -30,7 +30,11 @@
|
|||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
= f.button safe_join([fa_icon('lock'), t('admin.accounts.perform_full_suspension')]), name: :suspend, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('lock'), t('admin.accounts.perform_full_suspension')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :suspend,
|
||||
type: :submit
|
||||
.batch-table__body
|
||||
- if @accounts.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
%time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at)
|
||||
- if status.edited?
|
||||
·
|
||||
= link_to t('statuses.edited_at_html', date: content_tag(:time, l(status.edited_at), datetime: status.edited_at.iso8601, title: l(status.edited_at), class: 'formatted')), admin_account_status_path(status.account_id, status), class: 'detailed-status__datetime'
|
||||
= link_to t('statuses.edited_at_html', date: content_tag(:time, l(status.edited_at), datetime: status.edited_at.iso8601, title: l(status.edited_at), class: 'formatted')),
|
||||
admin_account_status_path(status.account_id, status),
|
||||
class: 'detailed-status__datetime'
|
||||
- if status.discarded?
|
||||
·
|
||||
%span.negative-hint= t('admin.statuses.deleted')
|
||||
|
|
|
@ -37,7 +37,9 @@
|
|||
%p
|
||||
= t 'admin.reports.statuses_description_html'
|
||||
—
|
||||
= link_to safe_join([fa_icon('plus'), t('admin.reports.add_to_report')]), admin_account_statuses_path(@report.target_account_id, report_id: @report.id), class: 'table-action-link'
|
||||
= link_to safe_join([fa_icon('plus'), t('admin.reports.add_to_report')]),
|
||||
admin_account_statuses_path(@report.target_account_id, report_id: @report.id),
|
||||
class: 'table-action-link'
|
||||
|
||||
= form_for(@form, url: batch_admin_account_statuses_path(@report.target_account_id, report_id: @report.id)) do |f|
|
||||
.batch-table
|
||||
|
|
|
@ -5,19 +5,25 @@
|
|||
= t('admin.roles.everyone_full_description_html')
|
||||
- else
|
||||
.fields-group
|
||||
= form.input :name, wrapper: :with_label
|
||||
= form.input :name,
|
||||
wrapper: :with_label
|
||||
|
||||
- unless current_user.role == form.object
|
||||
.fields-group
|
||||
= form.input :position, wrapper: :with_label, input_html: { max: current_user.role.position - 1 }
|
||||
= form.input :position,
|
||||
input_html: { max: current_user.role.position - 1 },
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= form.input :color, wrapper: :with_label, input_html: { placeholder: '#000000', type: 'color' }
|
||||
= form.input :color,
|
||||
input_html: { placeholder: '#000000', type: 'color' },
|
||||
wrapper: :with_label
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.fields-group
|
||||
= form.input :highlighted, wrapper: :with_label
|
||||
= form.input :highlighted,
|
||||
wrapper: :with_label
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
|
@ -31,6 +37,17 @@
|
|||
- (form.object.everyone? ? UserRole::Flags::CATEGORIES.slice(:invites) : UserRole::Flags::CATEGORIES).each do |category, permissions|
|
||||
%h4= t(category, scope: 'admin.roles.categories')
|
||||
|
||||
= form.input :permissions_as_keys, collection: permissions, wrapper: :with_block_label, include_blank: false, label_method: ->(privilege) { privilege_label(privilege) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label: false, hint: false, disabled: disable_permissions?(permissions)
|
||||
= form.input :permissions_as_keys,
|
||||
as: :check_boxes,
|
||||
collection_wrapper_tag: 'ul',
|
||||
collection: permissions,
|
||||
disabled: disable_permissions?(permissions),
|
||||
hint: false,
|
||||
include_blank: false,
|
||||
item_wrapper_tag: 'li',
|
||||
label_method: ->(privilege) { privilege_label(privilege) },
|
||||
label: false,
|
||||
required: false,
|
||||
wrapper: :with_block_label
|
||||
|
||||
%hr.spacer/
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
%p.lead= t('admin.settings.about.preamble')
|
||||
|
||||
.fields-group
|
||||
= f.input :site_extended_description, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }
|
||||
= f.input :site_extended_description,
|
||||
as: :text,
|
||||
input_html: { rows: 8 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
%p.hint
|
||||
= t 'admin.settings.about.rules_hint'
|
||||
|
@ -19,15 +22,32 @@
|
|||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :show_domain_blocks, wrapper: :with_label, collection: %i(disabled users all), label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
= f.input :show_domain_blocks,
|
||||
collection_wrapper_tag: 'ul',
|
||||
collection: %i(disabled users all),
|
||||
include_blank: false,
|
||||
item_wrapper_tag: 'li',
|
||||
label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") },
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'
|
||||
= f.input :show_domain_blocks_rationale,
|
||||
collection_wrapper_tag: 'ul',
|
||||
collection: %i(disabled users all),
|
||||
include_blank: false,
|
||||
item_wrapper_tag: 'li',
|
||||
label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") },
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :status_page_url, wrapper: :with_block_label, input_html: { placeholder: "https://status.#{Rails.configuration.x.local_domain}" }
|
||||
= f.input :status_page_url,
|
||||
input_html: { placeholder: "https://status.#{Rails.configuration.x.local_domain}" },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-group
|
||||
= f.input :site_terms, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }
|
||||
= f.input :site_terms,
|
||||
as: :text,
|
||||
input_html: { rows: 8 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -11,14 +11,23 @@
|
|||
%p.lead= t('admin.settings.appearance.preamble')
|
||||
|
||||
.fields-group
|
||||
= f.input :theme, collection: Themes.instance.names, label_method: ->(theme) { I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false
|
||||
= f.input :theme,
|
||||
collection: Themes.instance.names,
|
||||
include_blank: false,
|
||||
label_method: ->(theme) { I18n.t("themes.#{theme}", default: theme) },
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 }
|
||||
= f.input :custom_css,
|
||||
as: :text,
|
||||
input_html: { rows: 8 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :mascot, as: :file, wrapper: :with_block_label
|
||||
= f.input :mascot,
|
||||
as: :file,
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
- if @admin_settings.mascot.persisted?
|
||||
|
|
|
@ -11,20 +11,28 @@
|
|||
%p.lead= t('admin.settings.branding.preamble')
|
||||
|
||||
.fields-group
|
||||
= f.input :site_title, wrapper: :with_label
|
||||
= f.input :site_title,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :site_contact_username, wrapper: :with_label
|
||||
= f.input :site_contact_username,
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :site_contact_email, wrapper: :with_label
|
||||
= f.input :site_contact_email,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :site_short_description, wrapper: :with_block_label, as: :text, input_html: { rows: 2, maxlength: 200 }
|
||||
= f.input :site_short_description,
|
||||
as: :text,
|
||||
input_html: { rows: 2, maxlength: 200 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :thumbnail, as: :file, wrapper: :with_block_label
|
||||
= f.input :thumbnail,
|
||||
as: :file,
|
||||
wrapper: :with_block_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
- if @admin_settings.thumbnail.persisted?
|
||||
= image_tag @admin_settings.thumbnail.file.url(:'@1x'), class: 'fields-group__thumbnail'
|
||||
|
|
|
@ -11,9 +11,17 @@
|
|||
%p.lead= t('admin.settings.content_retention.preamble')
|
||||
|
||||
.fields-group
|
||||
= f.input :media_cache_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
||||
= f.input :content_cache_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }, hint: false, warning_hint: t('simple_form.hints.form_admin_settings.content_cache_retention_period')
|
||||
= f.input :backups_retention_period, wrapper: :with_block_label, input_html: { pattern: '[0-9]+' }
|
||||
= f.input :media_cache_retention_period,
|
||||
input_html: { pattern: '[0-9]+' },
|
||||
wrapper: :with_block_label
|
||||
= f.input :content_cache_retention_period,
|
||||
hint: false,
|
||||
input_html: { pattern: '[0-9]+' },
|
||||
warning_hint: t('simple_form.hints.form_admin_settings.content_cache_retention_period'),
|
||||
wrapper: :with_block_label
|
||||
= f.input :backups_retention_period,
|
||||
input_html: { pattern: '[0-9]+' },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -13,46 +13,75 @@
|
|||
%h4= t('admin.settings.discovery.trends')
|
||||
|
||||
.fields-group
|
||||
= f.input :trends, as: :boolean, wrapper: :with_label
|
||||
= f.input :trends,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :trends_as_landing_page, as: :boolean, wrapper: :with_label
|
||||
= f.input :trends_as_landing_page,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :trendable_by_default, as: :boolean, wrapper: :with_label, recommended: :not_recommended
|
||||
= f.input :trendable_by_default,
|
||||
as: :boolean,
|
||||
wrapper: :with_label,
|
||||
recommended: :not_recommended
|
||||
|
||||
%h4= t('admin.settings.discovery.public_timelines')
|
||||
|
||||
.fields-group
|
||||
= f.input :timeline_preview, as: :boolean, wrapper: :with_label
|
||||
= f.input :timeline_preview,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html')
|
||||
= f.input :noindex,
|
||||
as: :boolean,
|
||||
hint: t('admin.settings.default_noindex.desc_html'),
|
||||
label: t('admin.settings.default_noindex.title'),
|
||||
wrapper: :with_label
|
||||
|
||||
%h4= t('admin.settings.discovery.publish_statistics')
|
||||
|
||||
.fields-group
|
||||
= f.input :activity_api_enabled, as: :boolean, wrapper: :with_label, recommended: :recommended
|
||||
= f.input :activity_api_enabled,
|
||||
as: :boolean,
|
||||
wrapper: :with_label,
|
||||
recommended: :recommended
|
||||
|
||||
%h4= t('admin.settings.discovery.publish_discovered_servers')
|
||||
|
||||
.fields-group
|
||||
= f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, recommended: :recommended
|
||||
= f.input :peers_api_enabled,
|
||||
as: :boolean,
|
||||
wrapper: :with_label,
|
||||
recommended: :recommended
|
||||
|
||||
%h4= t('admin.settings.security.federation_authentication')
|
||||
|
||||
.fields-group
|
||||
= f.input :authorized_fetch, as: :boolean, wrapper: :with_label, label: t('admin.settings.security.authorized_fetch'), warning_hint: discovery_warning_hint_text, hint: discovery_hint_text, disabled: authorized_fetch_overridden?, recommended: discovery_recommended_value
|
||||
= f.input :authorized_fetch,
|
||||
as: :boolean,
|
||||
disabled: authorized_fetch_overridden?,
|
||||
hint: discovery_hint_text,
|
||||
label: t('admin.settings.security.authorized_fetch'),
|
||||
recommended: discovery_recommended_value,
|
||||
warning_hint: discovery_warning_hint_text,
|
||||
wrapper: :with_label
|
||||
|
||||
%h4= t('admin.settings.discovery.follow_recommendations')
|
||||
|
||||
.fields-group
|
||||
= f.input :bootstrap_timeline_accounts, wrapper: :with_block_label
|
||||
= f.input :bootstrap_timeline_accounts,
|
||||
wrapper: :with_block_label
|
||||
|
||||
%h4= t('admin.settings.discovery.profile_directory')
|
||||
|
||||
.fields-group
|
||||
= f.input :profile_directory, as: :boolean, wrapper: :with_label
|
||||
= f.input :profile_directory,
|
||||
as: :boolean,
|
||||
wrapper: :with_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -14,17 +14,32 @@
|
|||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :registrations_mode, collection: %w(open approved none), wrapper: :with_label, include_blank: false, label_method: ->(mode) { I18n.t("admin.settings.registrations_mode.modes.#{mode}") }, warning_hint: I18n.t('admin.settings.registrations_mode.warning_hint')
|
||||
= f.input :registrations_mode,
|
||||
collection: %w(open approved none),
|
||||
include_blank: false,
|
||||
label_method: ->(mode) { I18n.t("admin.settings.registrations_mode.modes.#{mode}") },
|
||||
warning_hint: I18n.t('admin.settings.registrations_mode.warning_hint'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :require_invite_text, as: :boolean, wrapper: :with_label, disabled: !approved_registrations?
|
||||
= f.input :require_invite_text,
|
||||
as: :boolean,
|
||||
disabled: !approved_registrations?,
|
||||
wrapper: :with_label
|
||||
|
||||
- if captcha_available?
|
||||
.fields-group
|
||||
= f.input :captcha_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.captcha_enabled.title'), hint: t('admin.settings.captcha_enabled.desc_html')
|
||||
= f.input :captcha_enabled,
|
||||
as: :boolean,
|
||||
hint: t('admin.settings.captcha_enabled.desc_html'),
|
||||
label: t('admin.settings.captcha_enabled.title'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :closed_registrations_message, as: :text, wrapper: :with_block_label, input_html: { rows: 2 }
|
||||
= f.input :closed_registrations_message,
|
||||
as: :text,
|
||||
input_html: { rows: 2 },
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
|
|
|
@ -33,7 +33,11 @@
|
|||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
- unless @statuses.empty?
|
||||
= f.button safe_join([fa_icon('flag'), t('admin.statuses.batch.report')]), name: :report, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('flag'), t('admin.statuses.batch.report')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :report,
|
||||
type: :submit
|
||||
.batch-table__body
|
||||
- if @statuses.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
.filter-subset.filter-subset--with-select
|
||||
%strong= t('admin.follow_recommendations.language')
|
||||
.input.select.optional
|
||||
= select_tag :locale, options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]), include_blank: true
|
||||
= select_tag :locale,
|
||||
options_for_select(@locales.map { |key| [standard_locale_name(key), key] }, params[:locale]),
|
||||
include_blank: true
|
||||
.filter-subset
|
||||
%strong= t('admin.trends.trending')
|
||||
%ul
|
||||
|
@ -35,10 +37,26 @@
|
|||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.links.allow')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.links.allow_provider')]), name: :approve_providers, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.links.disallow')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.links.disallow_provider')]), name: :reject_providers, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.links.allow')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :approve,
|
||||
type: :submit
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.links.allow_provider')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :approve_providers,
|
||||
type: :submit
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.links.disallow')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :reject,
|
||||
type: :submit
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.links.disallow_provider')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :reject_providers,
|
||||
type: :submit
|
||||
.batch-table__body
|
||||
- if @preview_cards.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
|
|
|
@ -31,8 +31,16 @@
|
|||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.allow')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.disallow')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.allow')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :approve,
|
||||
type: :submit
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.disallow')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :reject,
|
||||
type: :submit
|
||||
|
||||
.batch-table__body
|
||||
- if @preview_card_providers.empty?
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
= fa_icon 'link'
|
||||
= media_attachment.file_file_name
|
||||
|
||||
= t('admin.trends.statuses.shared_by', count: status.reblogs_count + status.favourites_count, friendly_count: friendly_number_to_human(status.reblogs_count + status.favourites_count))
|
||||
= t 'admin.trends.statuses.shared_by',
|
||||
count: status.reblogs_count + status.favourites_count,
|
||||
friendly_count: friendly_number_to_human(status.reblogs_count + status.favourites_count)
|
||||
|
||||
- if status.account.domain.present?
|
||||
·
|
||||
|
|
|
@ -31,10 +31,26 @@
|
|||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.statuses.allow')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.statuses.allow_account')]), name: :approve_accounts, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.statuses.disallow')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.statuses.disallow_account')]), name: :reject_accounts, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.statuses.allow')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :approve,
|
||||
type: :submit
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.statuses.allow_account')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :approve_accounts,
|
||||
type: :submit
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.statuses.disallow')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :reject,
|
||||
type: :submit
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.statuses.disallow_account')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :reject_accounts,
|
||||
type: :submit
|
||||
.batch-table__body
|
||||
- if @statuses.empty?
|
||||
= nothing_here 'nothing-here--under-tabs'
|
||||
|
|
|
@ -25,8 +25,16 @@
|
|||
%label.batch-table__toolbar__select.batch-checkbox-all
|
||||
= check_box_tag :batch_checkbox_all, nil, false
|
||||
.batch-table__toolbar__actions
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.allow')]), name: :approve, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.disallow')]), name: :reject, class: 'table-action-link', type: :submit, data: { confirm: t('admin.reports.are_you_sure') }
|
||||
= f.button safe_join([fa_icon('check'), t('admin.trends.allow')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :approve,
|
||||
type: :submit
|
||||
= f.button safe_join([fa_icon('times'), t('admin.trends.disallow')]),
|
||||
class: 'table-action-link',
|
||||
data: { confirm: t('admin.reports.are_you_sure') },
|
||||
name: :reject,
|
||||
type: :submit
|
||||
|
||||
.batch-table__body
|
||||
- if @tags.empty?
|
||||
|
|
|
@ -3,7 +3,13 @@
|
|||
|
||||
= simple_form_for @user, url: admin_user_role_path(@user) do |f|
|
||||
.fields-group
|
||||
= f.association :role, wrapper: :with_block_label, collection: UserRole.assignable, label_method: :name, include_blank: I18n.t('admin.accounts.change_role.no_role')
|
||||
= f.association :role,
|
||||
collection: UserRole.assignable,
|
||||
include_blank: I18n.t('admin.accounts.change_role.no_role'),
|
||||
label_method: :name,
|
||||
wrapper: :with_block_label
|
||||
|
||||
.actions
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
= f.button :button,
|
||||
t('generic.save_changes'),
|
||||
type: :submit
|
||||
|
|
|
@ -1,10 +1,21 @@
|
|||
= render 'shared/error_messages', object: form.object
|
||||
|
||||
.fields-group
|
||||
= form.input :url, wrapper: :with_block_label, input_html: { placeholder: 'https://' }
|
||||
= form.input :url,
|
||||
wrapper: :with_block_label,
|
||||
input_html: { placeholder: 'https://' }
|
||||
|
||||
.fields-group
|
||||
= form.input :events, collection: Webhook::EVENTS, wrapper: :with_block_label, include_blank: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', disabled: Webhook::EVENTS.filter { |event| !current_user.role.can?(Webhook.permission_for_event(event)) }
|
||||
= form.input :events,
|
||||
collection: Webhook::EVENTS,
|
||||
wrapper: :with_block_label,
|
||||
include_blank: false,
|
||||
as: :check_boxes,
|
||||
collection_wrapper_tag: 'ul',
|
||||
item_wrapper_tag: 'li',
|
||||
disabled: Webhook::EVENTS.filter { |event| !current_user.role.can?(Webhook.permission_for_event(event)) }
|
||||
|
||||
.fields-group
|
||||
= form.input :template, wrapper: :with_block_label, input_html: { placeholder: '{ "content": "Hello {{object.username}}" }' }
|
||||
= form.input :template,
|
||||
wrapper: :with_block_label,
|
||||
input_html: { placeholder: '{ "content": "Hello {{object.username}}" }' }
|
||||
|
|
|
@ -1,16 +1,37 @@
|
|||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :title, as: :string, wrapper: :with_label, hint: false
|
||||
= f.input :title,
|
||||
as: :string,
|
||||
hint: false,
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: ->(i) { I18n.t("invites.expires_in.#{i}") }, include_blank: I18n.t('invites.expires_in_prompt')
|
||||
= f.input :expires_in,
|
||||
collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i),
|
||||
include_blank: I18n.t('invites.expires_in_prompt'),
|
||||
label_method: ->(i) { I18n.t("invites.expires_in.#{i}") },
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-group
|
||||
= f.input :context, wrapper: :with_block_label, collection: CustomFilter::VALID_CONTEXTS, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label_method: ->(context) { I18n.t("filters.contexts.#{context}") }, include_blank: false
|
||||
= f.input :context,
|
||||
as: :check_boxes,
|
||||
collection_wrapper_tag: 'ul',
|
||||
collection: CustomFilter::VALID_CONTEXTS,
|
||||
include_blank: false,
|
||||
item_wrapper_tag: 'li',
|
||||
label_method: ->(context) { I18n.t("filters.contexts.#{context}") },
|
||||
wrapper: :with_block_label
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
.fields-group
|
||||
= f.input :filter_action, as: :radio_buttons, collection: %i(warn hide), include_blank: false, wrapper: :with_block_label, label_method: ->(action) { filter_action_label(action) }, hint: t('simple_form.hints.filters.action'), required: true
|
||||
= f.input :filter_action,
|
||||
as: :radio_buttons,
|
||||
collection: %i(warn hide),
|
||||
hint: t('simple_form.hints.filters.action'),
|
||||
include_blank: false,
|
||||
label_method: ->(action) { filter_action_label(action) },
|
||||
required: true,
|
||||
wrapper: :with_block_label
|
||||
|
||||
%hr.spacer/
|
||||
|
||||
|
|
|
@ -7,9 +7,19 @@
|
|||
= simple_form_for @policy, url: statuses_cleanup_path, method: :put, html: { id: 'edit_policy' } do |f|
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :enabled, as: :boolean, wrapper: :with_label, label: t('statuses_cleanup.enabled'), hint: t('statuses_cleanup.enabled_hint')
|
||||
= f.input :enabled,
|
||||
as: :boolean,
|
||||
hint: t('statuses_cleanup.enabled_hint'),
|
||||
label: t('statuses_cleanup.enabled'),
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :min_status_age, wrapper: :with_label, label: t('statuses_cleanup.min_age_label'), collection: AccountStatusesCleanupPolicy::ALLOWED_MIN_STATUS_AGE.map(&:to_i), label_method: ->(i) { t("statuses_cleanup.min_age.#{i}") }, include_blank: false, hint: false
|
||||
= f.input :min_status_age,
|
||||
collection: AccountStatusesCleanupPolicy::ALLOWED_MIN_STATUS_AGE.map(&:to_i),
|
||||
hint: false,
|
||||
include_blank: false,
|
||||
label_method: ->(i) { t("statuses_cleanup.min_age.#{i}") },
|
||||
label: t('statuses_cleanup.min_age_label'),
|
||||
wrapper: :with_label
|
||||
|
||||
.flash-message= t('statuses_cleanup.explanation')
|
||||
|
||||
|
@ -17,28 +27,54 @@
|
|||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :keep_pinned, wrapper: :with_label, label: t('statuses_cleanup.keep_pinned'), hint: t('statuses_cleanup.keep_pinned_hint')
|
||||
= f.input :keep_pinned,
|
||||
hint: t('statuses_cleanup.keep_pinned_hint'),
|
||||
label: t('statuses_cleanup.keep_pinned'),
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :keep_direct, wrapper: :with_label, label: t('statuses_cleanup.keep_direct'), hint: t('statuses_cleanup.keep_direct_hint')
|
||||
= f.input :keep_direct,
|
||||
hint: t('statuses_cleanup.keep_direct_hint'),
|
||||
label: t('statuses_cleanup.keep_direct'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :keep_self_fav, wrapper: :with_label, label: t('statuses_cleanup.keep_self_fav'), hint: t('statuses_cleanup.keep_self_fav_hint')
|
||||
= f.input :keep_self_fav,
|
||||
hint: t('statuses_cleanup.keep_self_fav_hint'),
|
||||
label: t('statuses_cleanup.keep_self_fav'),
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :keep_self_bookmark, wrapper: :with_label, label: t('statuses_cleanup.keep_self_bookmark'), hint: t('statuses_cleanup.keep_self_bookmark_hint')
|
||||
= f.input :keep_self_bookmark,
|
||||
hint: t('statuses_cleanup.keep_self_bookmark_hint'),
|
||||
label: t('statuses_cleanup.keep_self_bookmark'),
|
||||
wrapper: :with_label
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :keep_polls, wrapper: :with_label, label: t('statuses_cleanup.keep_polls'), hint: t('statuses_cleanup.keep_polls_hint')
|
||||
= f.input :keep_polls,
|
||||
hint: t('statuses_cleanup.keep_polls_hint'),
|
||||
label: t('statuses_cleanup.keep_polls'),
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :keep_media, wrapper: :with_label, label: t('statuses_cleanup.keep_media'), hint: t('statuses_cleanup.keep_media_hint')
|
||||
= f.input :keep_media,
|
||||
hint: t('statuses_cleanup.keep_media_hint'),
|
||||
label: t('statuses_cleanup.keep_media'),
|
||||
wrapper: :with_label
|
||||
|
||||
%h4= t('statuses_cleanup.interaction_exceptions')
|
||||
|
||||
.fields-row
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :min_favs, wrapper: :with_label, label: t('statuses_cleanup.min_favs'), hint: t('statuses_cleanup.min_favs_hint'), input_html: { min: 1, placeholder: t('statuses_cleanup.ignore_favs') }
|
||||
= f.input :min_favs,
|
||||
hint: t('statuses_cleanup.min_favs_hint'),
|
||||
input_html: { min: 1, placeholder: t('statuses_cleanup.ignore_favs') },
|
||||
label: t('statuses_cleanup.min_favs'),
|
||||
wrapper: :with_label
|
||||
.fields-row__column.fields-row__column-6.fields-group
|
||||
= f.input :min_reblogs, wrapper: :with_label, label: t('statuses_cleanup.min_reblogs'), hint: t('statuses_cleanup.min_reblogs_hint'), input_html: { min: 1, placeholder: t('statuses_cleanup.ignore_reblogs') }
|
||||
= f.input :min_reblogs,
|
||||
hint: t('statuses_cleanup.min_reblogs_hint'),
|
||||
input_html: { min: 1, placeholder: t('statuses_cleanup.ignore_reblogs') },
|
||||
label: t('statuses_cleanup.min_reblogs'),
|
||||
wrapper: :with_label
|
||||
|
||||
.flash-message= t('statuses_cleanup.interaction_exceptions_explanation')
|
||||
|
|
Loading…
Reference in New Issue