uploads: add data attributes to thumbnail html.
Add data attributes to thumbnails on the /uploads, /upload_media_assets, and /media_assets pages. Add a `data-is-posted` attribute for styling thumbnails based on whether they've already been posted.
This commit is contained in:
@@ -317,7 +317,7 @@ module ApplicationHelper
|
||||
end
|
||||
end
|
||||
|
||||
def data_attributes_for(record, prefix, attributes)
|
||||
def data_attributes_for(record, prefix = "data", attributes = record.html_data_attributes)
|
||||
attributes.map do |attr|
|
||||
if attr.is_a?(Array)
|
||||
name = attr.map {|sym| sym.to_s.dasherize.delete("?")}.join('-')
|
||||
|
||||
Reference in New Issue
Block a user