Problem/Motivation

When I try to add new Media entity, I need to do that by typing /media/add in address bar.
There is no link in admin menu or none of the pages for adding new Media entity. Also, there is no link and page when media entities are listed.

Proposed resolution

It will be good to create page with table list of Media entities with links view/edit/delete. Local task can be created under the /config/content menu item with path /admin/content/media.
Add media link also can be placed on that page like local action.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

euphoric_mv created an issue. See original summary.

woprrr’s picture

Hi @euphoric_mv

I work actualy in this issue, @see PR correspond : https://github.com/drupal-media/media_entity/pull/58

This is the patch ATM he doesn't work fine with MediaTestUi Test coverage. Why ? Views need a schema to declare added fields for "name" field. ATM I don't really understand why when we add an media views in config/optional this test crash ... (Probably it's an other bug).

I investigate !!

woprrr’s picture

Category: Bug report » Feature request
Status: Active » Needs work
slashrsm’s picture

Main focus of this issue is to put link to /media/add somewhere in the admin section of the side. Pull request in #2 is also adding a listing view. I am thinking that we should probably split that and stick to the main focus of this issue. we can add a listing page in a separate issue.

If we take this approach we have to decide where to put that link. Since there is no media listing page at the moment we have to find some other place. I was thinking that we could add another action to either content listing (next to "Add content" action) or to the file listing page.

mbovan’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
35.1 KB
357 bytes

I added an Add media button to /admin/content. Wanted to add tests, but as there are some test methods commented-out, I didn't find the right place for it...

Add media button

Lukas von Blarer’s picture

The button looks good to me.

Which tests are you talking about? Maybe we should test whether the button is present? But since we are going to move that to the file listing anyhow... Should we add tests for this in that separate issue?

slashrsm’s picture

Committed. Thanks!

Created listing follow-up #2626064: Consider adding default media listing view.

  • slashrsm committed 4b99484 on 8.x-1.x authored by mbovan
    Issue #2622190 by mbovan, woprrr: Menu link for adding new Media entity...
slashrsm’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.