mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 07:38:42 +00:00
More link/button conversion across views (#32199)
This commit is contained in:
parent
1f65a95421
commit
cf859d151b
|
@ -30,7 +30,7 @@
|
|||
= render 'admin/accounts/counters', account: @account
|
||||
|
||||
- if @account.local? && @account.user.nil?
|
||||
= link_to t('admin.accounts.unblock_email'), unblock_email_admin_account_path(@account.id), method: :post, class: 'button' if can?(:unblock_email, @account) && CanonicalEmailBlock.exists?(reference_account_id: @account.id)
|
||||
= button_to t('admin.accounts.unblock_email'), unblock_email_admin_account_path(@account.id), class: :button if can?(:unblock_email, @account) && CanonicalEmailBlock.exists?(reference_account_id: @account.id)
|
||||
- else
|
||||
.table-wrapper
|
||||
%table.table.inline-table
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
- if @instance.domain_allow
|
||||
= link_to t('admin.domain_allows.undo'), admin_domain_allow_path(@instance.domain_allow), class: 'button button--destructive', data: { confirm: t('admin.accounts.are_you_sure'), method: :delete }
|
||||
- else
|
||||
= link_to t('admin.domain_allows.add_new'), admin_domain_allows_path(domain_allow: { domain: @instance.domain }), class: 'button', method: :post
|
||||
= button_to t('admin.domain_allows.add_new'), admin_domain_allows_path(domain_allow: { domain: @instance.domain }), class: :button
|
||||
- else
|
||||
%p= t('admin.instances.content_policies.description_html')
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
%td= @instance.domain_block.policies.map { |policy| t(policy, scope: 'admin.instances.content_policies.policies') }.join(' · ')
|
||||
|
||||
= link_to t('admin.domain_blocks.edit'), edit_admin_domain_block_path(@instance.domain_block), class: 'button'
|
||||
= link_to t('admin.domain_blocks.undo'), admin_domain_block_path(@instance.domain_block), class: 'button', data: { confirm: t('admin.accounts.are_you_sure'), method: :delete }
|
||||
= button_to t('admin.domain_blocks.undo'), admin_domain_block_path(@instance.domain_block), class: :button, data: { confirm: t('admin.accounts.are_you_sure'), method: :delete }
|
||||
- else
|
||||
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @instance.domain), class: 'button'
|
||||
|
||||
|
@ -70,16 +70,16 @@
|
|||
- if @instance.unavailable?
|
||||
%span.negative-hint
|
||||
= t('admin.instances.availability.failure_threshold_reached', date: l(@instance.unavailable_domain.created_at.to_date))
|
||||
= link_to t('admin.instances.delivery.restart'), restart_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }
|
||||
= button_to t('admin.instances.delivery.restart'), restart_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
- elsif @instance.exhausted_deliveries_days.empty?
|
||||
%span.positive-hint
|
||||
= t('admin.instances.availability.no_failures_recorded')
|
||||
= link_to t('admin.instances.delivery.stop'), stop_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }
|
||||
= button_to t('admin.instances.delivery.stop'), stop_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
- else
|
||||
%span.negative-hint
|
||||
= t('admin.instances.availability.failures_recorded', count: @instance.delivery_failure_tracker.days)
|
||||
%span= link_to t('admin.instances.delivery.clear'), clear_delivery_errors_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post } unless @instance.exhausted_deliveries_days.empty?
|
||||
%span= link_to t('admin.instances.delivery.stop'), stop_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }
|
||||
%span= button_to t('admin.instances.delivery.clear'), clear_delivery_errors_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure') } unless @instance.exhausted_deliveries_days.empty?
|
||||
%span= button_to t('admin.instances.delivery.stop'), stop_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
|
||||
- if @instance.purgeable?
|
||||
%p= t('admin.instances.purge_description_html')
|
||||
|
|
|
@ -34,4 +34,4 @@
|
|||
= paginate @invites
|
||||
|
||||
- if policy(:invite).deactivate_all?
|
||||
= link_to t('admin.invites.deactivate_all'), deactivate_all_admin_invites_path, method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'
|
||||
= button_to t('admin.invites.deactivate_all'), deactivate_all_admin_invites_path, data: { confirm: t('admin.accounts.are_you_sure') }, class: :button
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.report-actions
|
||||
.report-actions__item
|
||||
.report-actions__item__button
|
||||
= link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(report), method: :post, class: 'button'
|
||||
= button_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(report), class: :button
|
||||
.report-actions__item__description
|
||||
= t('admin.reports.actions.resolve_description_html')
|
||||
- if statuses.any? { |status| (status.with_media? || status.with_preview_card?) && !status.discarded? }
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
- content_for :heading_actions do
|
||||
- if @report.unresolved?
|
||||
= link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
||||
= button_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), class: :button
|
||||
- else
|
||||
= link_to t('admin.reports.mark_as_unresolved'), reopen_admin_report_path(@report), method: :post, class: 'button'
|
||||
= button_to t('admin.reports.mark_as_unresolved'), reopen_admin_report_path(@report), class: :button
|
||||
|
||||
- unless @report.account.local? || @report.target_account.local?
|
||||
.flash-message= t('admin.reports.forwarded_replies_explanation')
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
- content_for :heading_actions do
|
||||
- if @appeal.persisted?
|
||||
= link_to t('disputes.strikes.approve_appeal'), approve_admin_disputes_appeal_path(@appeal), method: :post, class: 'button' if can?(:approve, @appeal)
|
||||
= link_to t('disputes.strikes.reject_appeal'), reject_admin_disputes_appeal_path(@appeal), method: :post, class: 'button button--destructive' if can?(:reject, @appeal)
|
||||
= button_to t('disputes.strikes.approve_appeal'), approve_admin_disputes_appeal_path(@appeal), class: :button if can?(:approve, @appeal)
|
||||
= button_to t('disputes.strikes.reject_appeal'), reject_admin_disputes_appeal_path(@appeal), class: 'button button--destructive' if can?(:reject, @appeal)
|
||||
|
||||
- if @strike.overruled?
|
||||
%p.hint
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
%p.muted-hint= t('exports.archive_takeout.hint_html')
|
||||
|
||||
- if policy(:backup).create?
|
||||
%p= link_to t('exports.archive_takeout.request'), settings_export_path, class: 'button', method: :post
|
||||
%p= button_to t('exports.archive_takeout.request'), settings_export_path, class: :button
|
||||
|
||||
- unless @backups.empty?
|
||||
%hr.spacer/
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
|
||||
%hr.spacer/
|
||||
|
||||
= link_to t('otp_authentication.setup'), settings_otp_authentication_path, data: { method: :post }, class: 'block-button'
|
||||
= button_to t('otp_authentication.setup'), settings_otp_authentication_path, class: 'block-button'
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
= t('settings.two_factor_authentication')
|
||||
|
||||
- content_for :heading_actions do
|
||||
= link_to t('two_factor_authentication.disable'), disable_settings_two_factor_authentication_methods_path, class: 'button button--destructive', method: :post
|
||||
= button_to t('two_factor_authentication.disable'), disable_settings_two_factor_authentication_methods_path, class: 'button button--destructive'
|
||||
|
||||
%p.hint
|
||||
%span.positive-hint
|
||||
|
@ -38,4 +38,4 @@
|
|||
%hr.spacer/
|
||||
|
||||
.simple_form
|
||||
= link_to t('two_factor_authentication.generate_recovery_codes'), settings_two_factor_authentication_recovery_codes_path, data: { method: :post }, class: 'block-button'
|
||||
= button_to t('two_factor_authentication.generate_recovery_codes'), settings_two_factor_authentication_recovery_codes_path, class: 'block-button'
|
||||
|
|
Loading…
Reference in a new issue