* Create DiscussionLocks
* Fix specs
* Update nullify_blank_notes_and_reason
* Update before_validation call
* Updated DiscussionLockPolicy for clarity
* Move permitted_attributes to a constant
* Update route
* Apply suggestions from code review for frontend
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Add title tags
* Wrap unlock confirm in main element
* Wrap flash messages up in div
* Actually fix title tags
* Hide comment reply button when discussion is locked
* Add E2E tests
* Try to fix E2E tests
* Cypress...you work locally but not in CI...why!?
* PR feedback
* Update E2E tests
* More E2E updates 😭
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
36 lines
1.8 KiB
Text
36 lines
1.8 KiB
Text
<footer class="comment__footer print-hidden">
|
|
<button
|
|
class="crayons-btn crayons-btn--ghost crayons-btn--icon-left crayons-btn--s mr-1 reaction-like inline-flex reaction-button"
|
|
id="button-for-comment-<%= comment.id %>"
|
|
data-comment-id="<%= comment.id %>"
|
|
title="heart">
|
|
<%= inline_svg_tag("small-heart.svg", aria: true, class: "crayons-icon reaction-icon not-reacted", title: "Favorite heart outline button") %>
|
|
<%= inline_svg_tag("small-heart-filled.svg", aria: true, class: "crayons-icon reaction-icon--like reaction-icon reacted", title: "Favorite heart outline button") %>
|
|
<span class="reactions-count">
|
|
<%= comment.public_reactions_count if comment.public_reactions_count.positive? %>
|
|
</span>
|
|
<span class="reactions-label hidden m:inline-block">
|
|
<%= like_button_text(comment).html_safe %>
|
|
</span>
|
|
</button>
|
|
|
|
<% unless @discussion_lock %>
|
|
<% if (comment.depth < 2 || is_childless) %>
|
|
<a
|
|
class="actions crayons-btn crayons-btn--ghost crayons-btn--s crayons-btn--icon-left toggle-reply-form mr-1 inline-flex"
|
|
href="#<%= commentable.path %>/comments/new/<%= comment.id_code_generated %>"
|
|
data-comment-id="<%= comment.id %>"
|
|
data-path="<%= commentable.path %>/comments/<%= comment.id_code_generated %>"
|
|
rel="nofollow">
|
|
<%= inline_svg_tag("small-comment.svg", aria: true, class: "crayons-icon reaction-icon not-reacted", title: "Comment button") %>
|
|
<span class="hidden m:inline-block">Reply</span>
|
|
</a>
|
|
<% else %>
|
|
<span class="fs-s inline-flex items-center fs-italic color-base-50 pl-1">
|
|
<%= inline_svg_tag("small-thread.svg", aria: true, class: "crayons-icon", title: "Thread") %>
|
|
Thread
|
|
</span>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
</footer>
|