From 58fc40ebd16cd1102770da6a243f508db85ca018 Mon Sep 17 00:00:00 2001 From: Aadarsh Nagrath Date: Sun, 19 Mar 2023 22:23:55 +0530 Subject: [PATCH] Added a Missing HTML id for the comments section --- news/72.bugfix.rst | 8 ++++++++ plone/app/discussion/browser/comments.pt | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 news/72.bugfix.rst diff --git a/news/72.bugfix.rst b/news/72.bugfix.rst new file mode 100644 index 00000000..3e990702 --- /dev/null +++ b/news/72.bugfix.rst @@ -0,0 +1,8 @@ +4.0.1 (2023-03-19) +------------------ + +Bug fixes: + + +- Added a Missing HTML id for the comments section [Coder-aadarsh] (#72) +//id attribute with the value "comments" to the div tag will make it possible to directly link to the comments section of a Plone document using the URL of the document followed by "#comments". \ No newline at end of file diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt index ab5c9e2c..bcc409cd 100644 --- a/plone/app/discussion/browser/comments.pt +++ b/plone/app/discussion/browser/comments.pt @@ -43,7 +43,9 @@ colorclass python:lambda x: 'state-private' if x=='rejected' else ('state-internal' if x=='spam' else 'state-'+x);" tal:attributes="class python:'comment level-{depth} {state}'.format(depth= depth, state=colorclass(review_state)); id comment_id" - tal:condition="python:canReview or review_state == 'published'"> + tal:condition="python:canReview or review_state == 'published'or has_replies" + tal:attributes-missing="skip" + id="comments">