diff --git a/core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php b/core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php index dd494cb..1958561 100644 --- a/core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php +++ b/core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php @@ -103,10 +103,11 @@ public function render(ResultRow $values) { '#access' => ($mark == MARK_NEW || $mark == MARK_UPDATED), '#cache' => array( 'contexts' => array( - 'user.permissions' + 'user.permissions', ), ), ); + return $this->renderLink(\Drupal::service('renderer')->render($build), $values); } } diff --git a/core/modules/node/src/NodeListBuilder.php b/core/modules/node/src/NodeListBuilder.php index 4a8bc9b..bf20af8 100644 --- a/core/modules/node/src/NodeListBuilder.php +++ b/core/modules/node/src/NodeListBuilder.php @@ -103,10 +103,11 @@ public function buildHeader() { */ public function buildRow(EntityInterface $entity) { /** @var \Drupal\node\NodeInterface $entity */ + $node_mark = node_mark($entity->id(), $entity->getChangedTime()); $mark = array( '#theme' => 'mark', - '#status' => node_mark($entity->id(), $entity->getChangedTime()), - '#access' => (\Drupal::currentUser()->isAuthenticated() && ($mark == MARK_NEW || $mark == MARK_UPDATED)), + '#status' => $node_mark, + '#access' => (\Drupal::currentUser()->isAuthenticated() && ($node_mark == MARK_NEW || $node_mark == MARK_UPDATED)), ); $langcode = $entity->language()->getId(); $uri = $entity->urlInfo(); diff --git a/core/themes/stable/templates/content/mark.html.twig b/core/themes/stable/templates/content/mark.html.twig index abaf984..757f7bb 100644 --- a/core/themes/stable/templates/content/mark.html.twig +++ b/core/themes/stable/templates/content/mark.html.twig @@ -13,10 +13,10 @@ #} {% if logged_in %} {% if status is constant('MARK_NEW') %} - {{ 'New'|t }} + {{ 'New'|t }} {% elseif status is constant('MARK_UPDATED') %} - {{ 'Updated'|t }} + {{ 'Updated'|t }} {% elseif status is constant('MARK_READ') %} - {{ 'Read'|t }} + {{ 'Read'|t }} {% endif %} {% endif %}