Media gallery template for image/file-heavy data.
Optimized for displaying images, videos, and files with:
- Thumbnail grid with hover preview
- Lightbox for full-size viewing
- File type icons for non-image files
- Quick actions overlay
Features
:filter- Filter by file type, date, etc.:select- Multi-select for bulk operations:bulk_actions- Bulk download, delete, move:paginate- Infinite scroll preferred:expand- Lightbox expansion
Column-Based Layout
MediaGallery uses the columns DSL to determine what to display:
- First visible column becomes the thumbnail image
- Remaining visible columns are rendered below the thumbnail in order
Use visible fn state -> state.template.name() == :media_gallery end to show columns
only in MediaGallery, or visible fn state -> state.template.name() == :table end
for Table-only columns.
Options
:columns- Number of grid columns (3, 4, 6, or 8)
Performance
Uses @static.* for columns, ui_adapter, etc. (no re-render on user interaction)
Uses @state.* for page, filter_values, etc. (re-renders when changed)
See MishkaGervaz.Table.Behaviours.Template,
MishkaGervaz.Table.Templates.Shared,
MishkaGervaz.Table.Templates.Table (sibling), and
MishkaGervaz.UIAdapters.MediaGallery (paired UI adapter).
Summary
Functions
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_template_switcher/1.
Functions
Callback implementation for MishkaGervaz.Table.Behaviours.Template.render_template_switcher/1.