Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
attribute_set.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9  /* @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\AttributeSet */
10 ?>
11 <script id="product-template-selector-template" type="text/x-magento-template">
12 <% if (!data.term && data.items.length && !data.allShown()) { %>
13 <h5 class="title">Recent Items</h5>
14 <% } %>
15 <ul data-mage-init='{"menu":[]}'>
16  <% _.each(data.items, function(value) { %>
17  <li <%= data.optionData(value) %>><a href="#"><%- value.label %></a></li>
18  <% }); %>
19 </ul>
20 <% if (!data.term && data.items.length && !data.allShown()) { %>
21 <button type="button" data-mage-init='{"actionLink":{"event":"showAll"}}' class="action-show-all">
22  <span>Show all Templates...</span>
23 </button>
24 <% } %>
25 </script>
26 <script>
27  require(["jquery","mage/mage","mage/backend/suggest"],function ($) {
28  var $suggest = $('#product-template-suggest');
29  $suggest.closest('.dropdown-menu').siblings('[data-toggle=dropdown]').on('click.toggleDropdown', function () {
30  if ($(this).hasClass('active')) {
31  $suggest.click();
32  }
33  });
34  $suggest
35  .mage('suggest',<?= /* @escapeNotVerified */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getSelectorOptions()) ?>)
36  .on('suggestselect', function (e, ui) {
37  if (ui.item.id) {
38  $('[data-form=edit-product]').trigger('changeAttributeSet', ui.item);
39  $('#product-template-suggest-container .action-toggle.active ').trigger('click');
40  }
41  });
42  });
43 </script>
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
if( $form)() ?>< script > require(['jquery' mage mage
Definition: save.phtml:15
$block
Definition: block.php:8
jquery ui
Definition: tree.phtml:41