Skip to content

Commit

Permalink
Fix: Setting on Instance contorlloer
Browse files Browse the repository at this point in the history
  • Loading branch information
atsu1125 committed Jan 5, 2023
1 parent 71d0cbe commit ffacbc6
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions app/views/admin/instances/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,25 @@

%div.action-buttons
%div
- if can?(:destroy, :instance)
- if @instance.domain_allow
- if @instance.domain_allow
- if can?(:destroy, :instance)
= 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 }
- elsif @instance.domain_block
- elsif @instance.domain_block
- if can?(:destroy, :instance)
= 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'
- else
- else
- if can?(:destroy, :instance)
= link_to t('admin.domain_blocks.add_new'), new_admin_domain_block_path(_domain: @instance.domain), class: 'button'
- if @instance.delivery_failure_tracker.available?
- unless @exhausted_deliveries_days.empty?
- if @instance.delivery_failure_tracker.available?
- unless @exhausted_deliveries_days.empty?
-if can?(:clear_delivery_errors, :delivery)
= link_to t('admin.instances.delivery.clear'), clear_delivery_errors_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }, class: 'button'
-if can?(:stop_delivery, :delivery)
= link_to t('admin.instances.delivery.stop'), stop_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }, class: 'button'
- else
- else
-if can?(:restart_delivery, :delivery)
= link_to t('admin.instances.delivery.restart'), restart_delivery_admin_instance_path(@instance), data: { confirm: t('admin.accounts.are_you_sure'), method: :post }, class: 'button'
- unless @instance.delivery_failure_tracker.available? && @instance.accounts_count > 0
- unless @instance.delivery_failure_tracker.available? && @instance.accounts_count > 0
-if can?(:destroy, :instance)
= link_to t('admin.instances.purge'), admin_instance_path(@instance), data: { confirm: t('admin.instances.confirm_purge'), method: :delete }, class: 'button'

0 comments on commit ffacbc6

Please sign in to comment.