Commit 9f54d00d authored by xjm's avatar xjm

Revert "Issue #2775131 by chr.fritsch, marcoscano, katzilla, seanB, xjm,...

Revert "Issue #2775131 by chr.fritsch, marcoscano, katzilla, seanB, xjm, gippy, phenaproxima, alexpott, Berdir, lauriii, webflo, dawehner: Media entities should support contextual links"

This reverts commit 1da5a5cc.
parent 1da5a5cc
......@@ -26,16 +26,11 @@
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
*
* Note that we print {{ title_suffix }} even though the title is not included.
* This is intentional, once contextual links are embedded in the "title_suffix"
* variable. See #2775131 for more information on the background about this.
*
* @see template_preprocess_media()
*
* @ingroup themeable
*/
#}
<div{{ attributes }}>
{{ title_suffix }}
{{ content }}
</div>
<?php
namespace Drupal\Tests\media\Functional;
use Drupal\media\Entity\Media;
/**
* Tests views contextual links on media items.
*
* @group media
*/
class MediaContextualLinksTest extends MediaFunctionalTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
'contextual',
];
/**
* Tests contextual links.
*/
public function testMediaContextualLinks() {
// Create a media type.
$mediaType = $this->createMediaType();
// Create a media item.
$media = Media::create([
'bundle' => $mediaType->id(),
'name' => 'Unnamed',
]);
$media->save();
$user = $this->drupalCreateUser([
'administer media',
'access contextual links',
]);
$this->drupalLogin($user);
$this->drupalGet('media/' . $media->id());
$this->assertSession()->elementAttributeContains('css', 'div[data-contextual-id]', 'data-contextual-id', 'media:media=' . $media->id() . ':');
}
}
......@@ -7,10 +7,6 @@
* - name: Name of the media.
* - content: Media content.
*
* Note that we print {{ title_suffix }} even though the title is not included.
* This is intentional, once contextual links are embedded in the "title_suffix"
* variable. See #2775131 for more information on the background about this.
*
* @see template_preprocess_media()
*
* @ingroup themeable
......@@ -25,7 +21,6 @@
]
%}
<article{{ attributes.addClass(classes) }}>
{{ title_suffix }}
{% if content %}
{{ content }}
{% endif %}
......
......@@ -7,17 +7,12 @@
* - name: Name of the media.
* - content: Media content.
*
* Note that we print {{ title_suffix }} even though the title is not included.
* This is intentional, once contextual links are embedded in the "title_suffix"
* variable. See #2775131 for more information on the background about this.
*
* @see template_preprocess_media()
*
* @ingroup themeable
*/
#}
<article{{ attributes }}>
{{ title_suffix }}
{% if content %}
{{ content }}
{% endif %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment