User Story
As a content author
I want to be able to tag media items (documents, images etc)
So that I could easily search for items by tags
Description
Several projects has shown that they are using media tags - a dedicated vocabulary for media items. This allows the content authors to perform more efficient media management, including searching within a media library.
Acceptance Criteria
AC1 - Media tags vocabulary
GIVEN I’m a Content author
WHEN I navigate to Media tags vocabulary (civictheme_media_tags)
THEN I can create/edit/delete tags
AC2 - Tagging media items with Media tags
GIVEN I’m a Content author
WHEN I create any of the media items
THEN I can specify one or more media tags
AND I can create new media tags (in the same UI)
AC3 - Searching through Media Library using Media tags
GIVEN I’m a Content author
WHEN I go to Content → Media page
AND I specify one or more media tags parts (comma delimited) in the search filter
THEN I can filter media items by the specified media tags
Solution Direction
-
Create
Media tags(civictheme_media_tags) vocabulary -
Add permissions for the Content author and Site administrator roles to perform CRUD operations on terms (but not the vocabulary).
-
Add Behat tests for permissions
-
Add entity reference
Media tags(field_m_media_tags) field to each media entity:-
Set it to allow creating new tags.
-
Use autocomplete widget
-
-
Update existing Behat tests for fields on media entities
-
Create a clone of vanilla Drupal
Mediaview and store it as optional config in theme (leave the name as-is). Adjust filters to show the `Media tags` filter and allow to match on partial tag matches. -
Implement an additional settings provisioning option to replace
Mediaview with the one shipped in CT configuration. -
Add a Behat test that would be checking that a Content->Media page has the required filters and can be searched through.
-
Create a clone of vanilla Drupal
Media libraryview and store it as optional config in theme (leave the name as-is). Adjust filters to show the `Media tags` filter and allow to match on partial tag matches. -
Implement an additional settings provisioning option to replace Media library using the one shipped with configuration.
-
Add a Behat test that would be checking that a media library has the required filters and can be searched through.
Testing Notes
| Comment | File | Size | Author |
|---|
Comments
Comment #2
alex.skrypnykComment #3
fionamorrison23 commentedComment #4
fionamorrison23 commentedComment #5
joshua1234511PR raised: https://github.com/civictheme/monorepo-drupal/pull/1206
Implemented:
Not Implemented/ Questions
Comment #7
alex.skrypnykComment #9
alex.skrypnykTested and implemented. Will be released in 1.7