Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2023-03-02 17:32:38 +01:00
97 changed files with 1412 additions and 523 deletions

View File

@ -1,11 +0,0 @@
# frozen_string_literal: true
module Admin::AnnouncementsHelper
def time_range(announcement)
if announcement.all_day?
safe_join([l(announcement.starts_at.to_date), ' - ', l(announcement.ends_at.to_date)])
else
safe_join([l(announcement.starts_at), ' - ', l(announcement.ends_at)])
end
end
end

View File

@ -41,9 +41,9 @@ module HomeHelper
def obscured_counter(count)
if count <= 0
0
'0'
elsif count == 1
1
'1'
else
'1+'
end
@ -57,14 +57,6 @@ module HomeHelper
end
end
def optional_link_to(condition, path, options = {}, &block)
if condition
link_to(path, options, &block)
else
content_tag(:div, &block)
end
end
def sign_up_message
if closed_registrations?
t('auth.registration_closed', instance: site_hostname)