Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
translate_inline.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 <link rel="stylesheet" type="text/css" href="<?= $block->escapeUrl($block->getViewFileUrl('prototype/windows/themes/default.css')) ?>"/>
12 <link rel="stylesheet" type="text/css" href="<?= $block->escapeUrl($block->getViewFileUrl('mage/translate-inline.css')) ?>"/>
13 
14 <script id="translate-inline-icon" type="text/x-magento-template">
15  <img src="<%- data.img %>" height="16" width="16" class="translate-edit-icon">
16 </script>
17 <script id="translate-form-template" type="text/x-magento-template">
18  <form id="<%- data.id %>">
19  <% _.each(data.items, function(item, i) { %>
20  <div class="translate-table-container">
21  <table class="table">
22  <% _.each(item, function(value, index) { %>
23  <tr>
24  <th class="label" style="text-transform: capitalize;"><%- index %>:</th>
25  <td class="value"><%- value %></td>
26  </tr>
27  <% }); %>
28  <tr>
29  <th class="label">
30  <label for="perstore_<%- i %>">Store View Specific:</label>
31  </th>
32  <td class="value">
33  <input id="perstore_<%- i %>" name="translate[<%- i %>][perstore]" type="checkbox" value="1"/>
34  </td>
35  </tr>
36  <tr>
37  <th class="label">
38  <label for="custom_<%- i %>">Custom:</label>
39  </th>
40  <td class="value">
41  <input name="translate[<%- i %>][original]" type="hidden" value="<%- item.original %>"/>
42  <input id="custom_<%- i %>"
43  name="translate[<%- i %>][custom]"
44  class="input-text"
45  value="<%- item.translated %>" />
46  </td>
47  </tr>
48  </table></div>
49  <% }); %>
50  </form>
51  <% if (data.message) { %>
52  <p class="a-center accent"><%- data.message %></p>
53  <% } %>
54 </script>
55 
56 <div data-role="translate-dialog" data-mage-init='{"translateInline":{"ajaxUrl":"<?= $block->escapeJs($block->escapeUrl($block->getAjaxUrl())) ?>"},"loader":{}}'></div>
57 <script>
58 require([
59  "jquery",
60  "mage/edit-trigger",
61  "mage/translate-inline"
62 ], function($){
63  $('body').editTrigger(
64  {
65  img: '<?= $block->escapeJs($block->escapeUrl($block->getViewFileUrl('Magento_Theme::fam_book_open.png'))) ?>',
66  alwaysShown: true,
67  singleElement: false
68  }
69  );
70 
71  $('body').addClass('trnslate-inline-area');
72 });
73 </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
jquery extjs ext tree mage adminhtml form
Definition: tree.phtml:41
if($block->getLink()) line height
Definition: email.phtml:11