You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jywarren If I understand this correctly, I have to generate a migration that loops through each image in a node that has a gallery and then prepend this code to revision.body. Something like this?
Revision.all.each do |rev|
rev.node.gallery.each do |image|
rev.body = #insert code + rev.body
end
end
2. insert the above code (but with proper substitutions not in IRB style)
We have a very old leftover feature which shows a collection of images in a "gallery" at the top of a note:
plots2/app/views/notes/show.html.erb
Line 68 in 5c0d962
Full code for the display is here; https://github.com/publiclab/plots2/blob/5c0d96274bd0be15feba69d8f30093082402ace5/app/views/notes/_gallery.html.erb
It's so simple, we could just insert the images at the top of the node body (actually the node revision body) and have it be part of the content.
We'd use this code to display each image, just like in our gallery:
revision.body
This is not a super complex change, but has a lot of moving parts. We'd love help with it, and are happy to support! Thanks!
Relates to #956 as well!
The text was updated successfully, but these errors were encountered: