mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 11:41:35 +01:00
19 lines
497 B
Ruby
19 lines
497 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Admin
|
|
module DisputesHelper
|
|
def strike_action_label(appeal)
|
|
t(key_for_action(appeal),
|
|
scope: 'admin.strikes.actions',
|
|
name: content_tag(:span, appeal.strike.account.username, class: 'username'),
|
|
target: content_tag(:span, appeal.account.username, class: 'target'))
|
|
.html_safe
|
|
end
|
|
|
|
private
|
|
|
|
def key_for_action(appeal)
|
|
AccountWarning.actions.slice(appeal.strike.action).keys.first
|
|
end
|
|
end
|
|
end
|