Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
1cac4b5f
Commit
1cac4b5f
authored
Nov 21, 2014
by
alexpott
Browse files
Issue
#977440
by andypost, amateescu: Clean-up comment links title attributes
parent
e6844da4
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/comment/src/CommentLinkBuilder.php
View file @
1cac4b5f
...
...
@@ -109,7 +109,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
if
(
!
empty
(
$entity
->
get
(
$field_name
)
->
comment_count
))
{
$links
[
'comment-comments'
]
=
array
(
'title'
=>
$this
->
formatPlural
(
$entity
->
get
(
$field_name
)
->
comment_count
,
'1 comment'
,
'@count comments'
),
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'Jump to the first comment
of this posting
.'
)),
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'Jump to the first comment.'
)),
'fragment'
=>
'comments'
,
'url'
=>
$entity
->
urlInfo
(),
);
...
...
@@ -119,7 +119,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
'url'
=>
Url
::
fromRoute
(
'<current>'
),
'attributes'
=>
array
(
'class'
=>
'hidden'
,
'title'
=>
$this
->
t
(
'Jump to the first new comment
of this posting
.'
),
'title'
=>
$this
->
t
(
'Jump to the first new comment.'
),
'data-history-node-last-comment-timestamp'
=>
$entity
->
get
(
$field_name
)
->
last_comment_timestamp
,
'data-history-node-field-name'
=>
$field_name
,
),
...
...
@@ -134,7 +134,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
$links
[
'comment-add'
]
=
array
(
'title'
=>
$this
->
t
(
'Add new comment'
),
'language'
=>
$entity
->
language
(),
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'
Add a new comment to this page
.'
)),
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'
Share your thoughts and opinions
.'
)),
'fragment'
=>
'comment-form'
,
);
if
(
$comment_form_location
==
CommentItemInterface
::
FORM_SEPARATE_PAGE
)
{
...
...
@@ -168,7 +168,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
if
(
$comment_form_location
==
CommentItemInterface
::
FORM_SEPARATE_PAGE
||
(
!
empty
(
$entity
->
get
(
$field_name
)
->
comment_count
)
&&
$this
->
currentUser
->
hasPermission
(
'access comments'
)))
{
$links
[
'comment-add'
]
=
array
(
'title'
=>
$this
->
t
(
'Add new comment'
),
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'Share your thoughts and opinions
related to this posting
.'
)),
'attributes'
=>
array
(
'title'
=>
$this
->
t
(
'Share your thoughts and opinions.'
)),
'fragment'
=>
'comment-form'
,
);
if
(
$comment_form_location
==
CommentItemInterface
::
FORM_SEPARATE_PAGE
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment