summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/content_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb
index 5b672598..b3c6bad1 100644
--- a/app/helpers/content_helper.rb
+++ b/app/helpers/content_helper.rb
@@ -153,7 +153,7 @@ module ContentHelper
153 153
154 def asset_credit(asset) 154 def asset_credit(asset)
155 return nil unless asset 155 return nil unless asset
156 return nil if asset.creator.blank? && asset.source_url.blank? && asset.license_key.blank? 156 return nil unless asset.has_credit?
157 157
158 license = AssetLicense.find(asset.license_key) 158 license = AssetLicense.find(asset.license_key)
159 159
@@ -173,4 +173,8 @@ module ContentHelper
173 full = license_text ? safe_join([attribution, license_text], ", ") : attribution 173 full = license_text ? safe_join([attribution, license_text], ", ") : attribution
174 safe_join([full, "."]) 174 safe_join([full, "."])
175 end 175 end
176
177 def glightbox_data(image, title)
178 "title: #{title.to_s.tr(';', ',')};"
179 end
176end 180end