summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-23 18:04:37 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-23 18:04:37 +0200
commit6424e10be5a89f175a74c71c55660412a169b8b8 (patch)
treeae8c8111bd1e8c6e82c0a5f9a2c4b088c92bafe5 /app/helpers
parent375ed745052148faeb34763087fe04214105f1b8 (diff)
Update deployed state to what's currently running
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/admin_helper.rb4
-rw-r--r--app/helpers/content_helper.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb
index 232862b..389f6dc 100644
--- a/app/helpers/admin_helper.rb
+++ b/app/helpers/admin_helper.rb
@@ -3,9 +3,9 @@ module AdminHelper
3 def language_selector 3 def language_selector
4 case I18n.locale 4 case I18n.locale
5 when :de 5 when :de
6 link_to 'English (Aktiv: Deutsch)', url_for(:overwrite_params => {:locale => :en}) 6 link_to raw('<span class="inactive">English</span>'), url_for(:overwrite_params => {:locale => :en})
7 when :en 7 when :en
8 link_to 'Deutsch (Active: English)', url_for(:overwrite_params => {:locale => :de}) 8 link_to raw('<span class="inactive">Deutsch</span>'), url_for(:overwrite_params => {:locale => :de})
9 end 9 end
10 end 10 end
11end 11end
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb
index 7286976..17364f8 100644
--- a/app/helpers/content_helper.rb
+++ b/app/helpers/content_helper.rb
@@ -43,7 +43,7 @@ module ContentHelper
43 # Returns the published_at attribute of a page if it is not nil, otherwise 43 # Returns the published_at attribute of a page if it is not nil, otherwise
44 # it returns the auto-filled value of the created_at attribute 44 # it returns the auto-filled value of the created_at attribute
45 def date_for_page page 45 def date_for_page page
46 page.published_at.to_s(:db) rescue page.created_at.to_s(:db) 46 I18n.l(page.published_at, :format => :ccc) rescue I18n.l(page.created_at, :format => :ccc)
47 end 47 end
48 48
49 def author_for_page page 49 def author_for_page page
@@ -80,10 +80,10 @@ module ContentHelper
80 begin 80 begin
81 if content =~ /<aggregate([^<>]*)>/ 81 if content =~ /<aggregate([^<>]*)>/
82 tag = $~.to_s 82 tag = $~.to_s
83 matched_data = $1.scan(/\w+\=\"[a-zA-Z\s\/_\d,]*\"/) 83 matched_data = $1.scan(/\w+\=\"[a-zA-Z\s\/_\d,.=]*\"/)
84 84
85 matched_data.each do |data| 85 matched_data.each do |data|
86 splitted_data = data.split("=") 86 splitted_data = data.split("=", 2)
87 options[splitted_data[0].to_sym] = splitted_data[1].gsub(/\"/, "") 87 options[splitted_data[0].to_sym] = splitted_data[1].gsub(/\"/, "")
88 end 88 end
89 89