Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
view.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php if ($_entity = $block->getEntity()): ?>
11 <div id="comments_block" class="edit-order-comments">
12  <div class="order-history-block">
13  <div class="admin__field field-row">
14  <label class="admin__field-label"
15  for="history_comment"><?= /* @escapeNotVerified */ __('Comment Text') ?></label>
16  <div class="admin__field-control">
17  <textarea name="comment[comment]"
18  class="admin__control-textarea"
19  rows="3"
20  cols="5"
21  id="history_comment"></textarea>
22  </div>
23  </div>
24  <div class="admin__field">
25  <div class="order-history-comments-options">
26  <?php if ($block->canSendCommentEmail()): ?>
27  <div class="admin__field admin__field-option">
28  <input name="comment[is_customer_notified]"
29  type="checkbox"
30  class="admin__control-checkbox"
31  id="history_notify"
32  value="1" />
33  <label class="admin__field-label"
34  for="history_notify"><?= /* @escapeNotVerified */ __('Notify Customer by Email') ?></label>
35  </div>
36  <?php endif; ?>
37  <div class="admin__field admin__field-option">
38  <input name="comment[is_visible_on_front]"
39  type="checkbox"
40  id="history_visible"
41  class="admin__control-checkbox"
42  value="1" />
43  <label class="admin__field-label"
44  for="history_visible"> <?= /* @escapeNotVerified */ __('Visible on Storefront') ?></label>
45  </div>
46  </div>
47  <div class="order-history-comments-actions">
48  <?= $block->getChildHtml('submit_button') ?>
49  </div>
50  </div>
51  </div>
52 
53  <ul class="note-list">
54  <?php foreach ($_entity->getCommentsCollection(true) as $_comment): ?>
55  <li>
56  <span class="note-list-date"><?= /* @noEscape */ $block->formatDate($_comment->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?></span>
57  <span class="note-list-time"><?= /* @noEscape */ $block->formatTime($_comment->getCreatedAt(), \IntlDateFormatter::MEDIUM) ?></span>
58  <span class="note-list-customer">
59  <?= /* @escapeNotVerified */ __('Customer') ?>
60  <?php if ($_comment->getIsCustomerNotified()): ?>
61  <span class="note-list-customer-notified"><?= /* @escapeNotVerified */ __('Notified') ?></span>
62  <?php else: ?>
63  <span class="note-list-customer-not-notified"><?= /* @escapeNotVerified */ __('Not Notified') ?></span>
64  <?php endif; ?>
65  </span>
66  <div class="note-list-comment"><?= $block->escapeHtml($_comment->getComment(), ['b', 'br', 'strong', 'i', 'u', 'a']) ?></div>
67  </li>
68  <?php endforeach; ?>
69  </ul>
70 </div>
71 <script>
72 require(['prototype'], function(){
73 
74 submitComment = function() {
75  submitAndReloadArea($('comments_block').parentNode, '<?= /* @escapeNotVerified */ $block->getSubmitUrl() ?>')
76 }
77 
78 if ($('submit_comment_button')) {
79  $('submit_comment_button').observe('click', submitComment);
80 }
81 
82 });
83 </script>
84 <?php endif; ?>
$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
endforeach
Definition: view.phtml:42
__()
Definition: __.php:13
$block
Definition: block.php:8
if( $block->canShowBlock())( 'Shop By') ?></strong ></div >< div classif( $block->getLayer() ->getState() ->getFilters())() ?>" class endif
Definition: view.phtml:27