Skip to content

Commit

Permalink
Setup media/media_library, along with basic views filters. DDFFORM-71
Browse files Browse the repository at this point in the history
- Enabling media + media_library module
- Tweaking the media views, both widget and /admin/content/media-grid
- Disabling the standard /admin/content/media view, as it is
  not necessary when using Media Library views instead, and not
  something we want to continue to maintain.
  • Loading branch information
rasben committed Dec 10, 2023
1 parent e46cfdb commit 5682c84
Show file tree
Hide file tree
Showing 41 changed files with 2,699 additions and 5 deletions.
2 changes: 2 additions & 0 deletions config/sync/config_ignore.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ _core:
default_config_hash: UVH1aJ4b44UM-VdPVN7hNNuuVqfReJxwfVeDQH1Hvsk
ignored_config_entities:
- '*'
- '~*media.*'
- '~*media_library*'
- '~block.block.claro.*'
- '~block.block.novel.*'
- ~block.block.gin_breadcrumbs
Expand Down
22 changes: 22 additions & 0 deletions config/sync/core.base_field_override.media.image.status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
uuid: 8cfb031d-8593-4e3d-9b64-69ffc4b67712
langcode: en
status: true
dependencies:
config:
- media.type.image
id: media.image.status
field_name: status
entity_type: media
bundle: image
label: Published
description: ''
required: false
translatable: true
default_value:
-
value: 1
default_value_callback: ''
settings:
on_label: 'On'
off_label: 'Off'
field_type: boolean
42 changes: 42 additions & 0 deletions config/sync/core.entity_form_display.media.image.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
uuid: 617376ad-2d2f-42d5-9e7b-321efd0d211d
langcode: en
status: true
dependencies:
config:
- field.field.media.image.field_media_image
- image.style.thumbnail
- media.type.image
module:
- image
id: media.image.default
targetEntityType: media
bundle: image
mode: default
content:
field_media_image:
type: image_image
weight: 1
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
name:
type: string_textfield
weight: 0
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
hidden:
created: true
status: true
uid: true
30 changes: 30 additions & 0 deletions config/sync/core.entity_form_display.media.image.media_library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: ee251015-6d84-481a-9ac3-62b7fea4cdc1
langcode: en
status: true
dependencies:
config:
- core.entity_form_mode.media.media_library
- field.field.media.image.field_media_image
- image.style.thumbnail
- media.type.image
module:
- image
id: media.image.media_library
targetEntityType: media
bundle: image
mode: media_library
content:
field_media_image:
type: image_image
weight: -50
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
hidden:
created: true
langcode: true
name: true
status: true
uid: true
15 changes: 15 additions & 0 deletions config/sync/core.entity_form_mode.media.media_library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
uuid: 60baacca-161f-4539-90db-a58324ecf53c
langcode: en
status: true
dependencies:
module:
- media
enforced:
module:
- media_library
_core:
default_config_hash: Tdhz-aDHfDoV1Ul9umtItxGTrjkFzoNAkDw8FWXjYA0
id: media.media_library
label: 'Media library'
targetEntityType: media
cache: true
32 changes: 32 additions & 0 deletions config/sync/core.entity_view_display.media.image.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
uuid: 01903a9b-ac15-4b99-84a9-1ba7bb2318c8
langcode: en
status: true
dependencies:
config:
- field.field.media.image.field_media_image
- image.style.large
- media.type.image
module:
- image
id: media.image.default
targetEntityType: media
bundle: image
mode: default
content:
field_media_image:
type: image
label: hidden
settings:
image_link: ''
image_style: large
image_loading:
attribute: lazy
third_party_settings: { }
weight: 0
region: content
hidden:
created: true
langcode: true
name: true
thumbnail: true
uid: true
33 changes: 33 additions & 0 deletions config/sync/core.entity_view_display.media.image.media_library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
uuid: 81ada4dc-05de-4802-8644-0ad23c19eac1
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.media_library
- field.field.media.image.field_media_image
- image.style.media_library
- media.type.image
module:
- image
id: media.image.media_library
targetEntityType: media
bundle: image
mode: media_library
content:
thumbnail:
type: image
label: hidden
settings:
image_link: ''
image_style: media_library
image_loading:
attribute: lazy
third_party_settings: { }
weight: 0
region: content
hidden:
created: true
field_media_image: true
langcode: true
name: true
uid: true
12 changes: 12 additions & 0 deletions config/sync/core.entity_view_mode.media.full.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
uuid: 49469da5-76a5-4fc1-b05d-ba7dde16c668
langcode: en
status: false
dependencies:
module:
- media
_core:
default_config_hash: 6NBUEuGmlkClK8Fb76tSMMpO2eZ4LWCBdbUk4z7CuP0
id: media.full
label: 'Full content'
targetEntityType: media
cache: true
15 changes: 15 additions & 0 deletions config/sync/core.entity_view_mode.media.media_library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
uuid: 2f6db98a-6577-4509-bb09-ca21fb0a987e
langcode: en
status: true
dependencies:
module:
- media
enforced:
module:
- media_library
_core:
default_config_hash: Tdhz-aDHfDoV1Ul9umtItxGTrjkFzoNAkDw8FWXjYA0
id: media.media_library
label: 'Media library'
targetEntityType: media
cache: true
3 changes: 3 additions & 0 deletions config/sync/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ module:
link: 0
linkit: 0
locale: 0
media: 0
media_library: 0
menu_link_content: 0
metatag: 0
mysql: 0
node: 0
Expand Down
38 changes: 38 additions & 0 deletions config/sync/field.field.media.image.field_media_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
uuid: a8e64742-3e97-4938-b4d1-a8c59477d66f
langcode: en
status: true
dependencies:
config:
- field.storage.media.field_media_image
- media.type.image
module:
- image
id: media.image.field_media_image
field_name: field_media_image
entity_type: media
bundle: image
label: Image
description: ''
required: true
translatable: true
default_value: { }
default_value_callback: ''
settings:
handler: 'default:file'
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'png gif jpg jpeg'
max_filesize: ''
max_resolution: ''
min_resolution: ''
alt_field: true
alt_field_required: true
title_field: false
title_field_required: false
default_image:
uuid: null
alt: ''
title: ''
width: null
height: null
field_type: image
30 changes: 30 additions & 0 deletions config/sync/field.storage.media.field_media_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: 748bff9b-dcc8-41ab-9f2d-7969b2112e6e
langcode: en
status: true
dependencies:
module:
- file
- image
- media
id: media.field_media_image
field_name: field_media_image
entity_type: media
type: image
settings:
target_type: file
display_field: false
display_default: false
uri_scheme: public
default_image:
uuid: null
alt: ''
title: ''
width: null
height: null
module: image
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
20 changes: 20 additions & 0 deletions config/sync/image.style.media_library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: bef7f48f-780d-4676-941f-f98a54be0179
langcode: en
status: true
dependencies:
enforced:
module:
- media_library
_core:
default_config_hash: 7qJqToD1OQLAyeswpmg7M0LRxQlw1URQkJDWUJCnmR8
name: media_library
label: 'Media Library thumbnail (220×220)'
effects:
75b076a8-1234-4b42-85db-bf377c4d8d5f:
uuid: 75b076a8-1234-4b42-85db-bf377c4d8d5f
id: image_scale
weight: 0
data:
width: 220
height: 220
upscale: false
11 changes: 11 additions & 0 deletions config/sync/language.content_settings.media.image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
uuid: 9a7d7caa-ce1f-469a-bfa1-594e39de5b7f
langcode: en
status: true
dependencies:
config:
- media.type.image
id: media.image
target_entity_type_id: media
target_bundle: image
default_langcode: da
language_alterable: false
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Medie bibliotek'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Fuldt indhold'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Medie bibliotek'
1 change: 1 addition & 0 deletions config/sync/language/da/image.style.media_library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Media Library miniaturebillede (220×220)'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Slet medie'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Udgiv medie'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Gem medie'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'Afpublicér medie'
2 changes: 0 additions & 2 deletions config/sync/language/da/views.view.files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ display:
label: Ændringsdato
count:
label: 'Brugt i'
alter:
path: 'admin/content/files/usage/{{ fid }}'
pager:
options:
tags:
Expand Down
Loading

0 comments on commit 5682c84

Please sign in to comment.