about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-03-05 20:37:42 +0100
committerGitHub <noreply@github.com>2023-03-05 20:37:42 +0100
commitbcbc2a43d4a8913475d47d77cfb5d54b15bfe5cc (patch)
treeae50a1c4344476421eb36fc254ec9bbcfcfc6f8a /app/helpers
parent6a4be4e96677eb3e1303ddcab8f8b4bea7298453 (diff)
parent0e476f3c4fbbcab9b4895b8abff93075dfd2bf0c (diff)
Merge pull request #2121 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/admin/announcements_helper.rb11
-rw-r--r--app/helpers/home_helper.rb12
2 files changed, 2 insertions, 21 deletions
diff --git a/app/helpers/admin/announcements_helper.rb b/app/helpers/admin/announcements_helper.rb
deleted file mode 100644
index 0c053ddec..000000000
--- a/app/helpers/admin/announcements_helper.rb
+++ /dev/null
@@ -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
diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb
index f41104709..ea2196086 100644
--- a/app/helpers/home_helper.rb
+++ b/app/helpers/home_helper.rb
@@ -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)