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:
evazion
2022-02-18 15:44:12 -06:00
parent fc5aec7de0
commit a1d2572bad
5 changed files with 5 additions and 5 deletions

View File

@@ -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('-')