Merge pull request #159 from kmycode/upstream-20231021
Upstream 20231021
This commit is contained in:
commit
551a9e8216
133 changed files with 1159 additions and 817 deletions
19
app/helpers/admin/disputes_helper.rb
Normal file
19
app/helpers/admin/disputes_helper.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
# 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
|
|
@ -9,6 +9,10 @@ module FormattingHelper
|
|||
TextFormatter.new(text, options).to_s
|
||||
end
|
||||
|
||||
def url_for_preview_card(preview_card)
|
||||
preview_card.url
|
||||
end
|
||||
|
||||
def extract_status_plain_text(status)
|
||||
PlainTextFormatter.new(status.text, status.local?).to_s
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue