mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
Re-arrange photos dashboard
This commit is contained in:
parent
5e67d585f9
commit
fa0ccb204e
@ -20,9 +20,7 @@ class PhotoDashboard < Administrate::BaseDashboard
|
|||||||
enabled: Field::Boolean,
|
enabled: Field::Boolean,
|
||||||
taken_at: Field::DateTime,
|
taken_at: Field::DateTime,
|
||||||
views: Field::Number,
|
views: Field::Number,
|
||||||
image_uid: Field::String,
|
image: Field::Image,
|
||||||
image_name: Field::String,
|
|
||||||
image_cloudinary_id: Field::String,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# COLLECTION_ATTRIBUTES
|
# COLLECTION_ATTRIBUTES
|
||||||
@ -31,6 +29,7 @@ class PhotoDashboard < Administrate::BaseDashboard
|
|||||||
# By default, it's limited to four items to reduce clutter on index pages.
|
# By default, it's limited to four items to reduce clutter on index pages.
|
||||||
# Feel free to add, remove, or rearrange items.
|
# Feel free to add, remove, or rearrange items.
|
||||||
COLLECTION_ATTRIBUTES = [
|
COLLECTION_ATTRIBUTES = [
|
||||||
|
:image,
|
||||||
:title,
|
:title,
|
||||||
:taken_at,
|
:taken_at,
|
||||||
:featured,
|
:featured,
|
||||||
@ -40,39 +39,37 @@ class PhotoDashboard < Administrate::BaseDashboard
|
|||||||
# SHOW_PAGE_ATTRIBUTES
|
# SHOW_PAGE_ATTRIBUTES
|
||||||
# an array of attributes that will be displayed on the model's show page.
|
# an array of attributes that will be displayed on the model's show page.
|
||||||
SHOW_PAGE_ATTRIBUTES = [
|
SHOW_PAGE_ATTRIBUTES = [
|
||||||
:categories,
|
:title,
|
||||||
|
:description,
|
||||||
|
:image,
|
||||||
:id,
|
:id,
|
||||||
:flickr_url,
|
:flickr_url,
|
||||||
:created_at,
|
:created_at,
|
||||||
:updated_at,
|
:updated_at,
|
||||||
:title,
|
:taken_at,
|
||||||
:description,
|
|
||||||
:sort,
|
:sort,
|
||||||
:featured,
|
:featured,
|
||||||
:enabled,
|
:enabled,
|
||||||
:taken_at,
|
|
||||||
:views,
|
:views,
|
||||||
:image_uid,
|
:categories,
|
||||||
:image_name,
|
|
||||||
:image_cloudinary_id,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# FORM_ATTRIBUTES
|
# FORM_ATTRIBUTES
|
||||||
# an array of attributes that will be displayed
|
# an array of attributes that will be displayed
|
||||||
# on the model's form (`new` and `edit`) pages.
|
# on the model's form (`new` and `edit`) pages.
|
||||||
FORM_ATTRIBUTES = [
|
FORM_ATTRIBUTES = [
|
||||||
:categories,
|
|
||||||
:flickr_url,
|
|
||||||
:title,
|
:title,
|
||||||
:description,
|
:description,
|
||||||
|
:image,
|
||||||
|
:flickr_url,
|
||||||
|
:created_at,
|
||||||
|
:updated_at,
|
||||||
|
:taken_at,
|
||||||
:sort,
|
:sort,
|
||||||
:featured,
|
:featured,
|
||||||
:enabled,
|
:enabled,
|
||||||
:taken_at,
|
|
||||||
:views,
|
:views,
|
||||||
:image_uid,
|
:categories,
|
||||||
:image_name,
|
|
||||||
:image_cloudinary_id,
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Overwrite this method to customize how photos are displayed
|
# Overwrite this method to customize how photos are displayed
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user