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