media assets: add thumbnail view to /media_assets page.
Add a thumbnail view to the /media_assets page. This page lets you see all images uploaded to Danbooru by all users (although you can't see who the uploader is). Also add a link to this page in the subnav bar on the upload page.
This commit is contained in:
@@ -15,6 +15,9 @@ class MediaAsset < ApplicationRecord
|
||||
has_one :post, foreign_key: :md5, primary_key: :md5
|
||||
has_one :media_metadata, dependent: :destroy
|
||||
has_one :pixiv_ugoira_frame_data, class_name: "PixivUgoiraFrameData", foreign_key: :md5, primary_key: :md5
|
||||
has_many :upload_media_assets, dependent: :destroy
|
||||
has_many :uploads, through: :upload_media_assets
|
||||
has_many :uploaders, through: :uploads, class_name: "User", foreign_key: :uploader_id
|
||||
|
||||
delegate :metadata, to: :media_metadata
|
||||
delegate :is_non_repeating_animation?, :is_greyscale?, :is_rotated?, to: :metadata
|
||||
|
||||
Reference in New Issue
Block a user