docbrown/app/views/comments/_comment_footer.html.erb
Ben Halpern 036d75aa6e
Admin-configurable display locale (#14620)
* Admin-configurable display locale

* Add i18n-js and namespacing

* Basic tests and clean up

* A few test adjustments

* Update vendor cache

* Fix a few tests

* Fix a few tests

* Update app/views/articles/_actions.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_comments_actions.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_single_story.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/articles/_single_story.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/comments/_comment_header.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/layouts/_sidebar_tags.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/views/listings/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update spec/system/homepage/user_visits_homepage_articles_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update spec/system/user/view_user_index_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Alphabetical locale page

* Add activerecord custom validation error translations

* Add i18n to webpacker

* Fix a few tests

* Adjust error messages

* Add i18n-tasks

* Adjust JS to get working with jest

* Adjust the way translations are pulled in

* Adjust jest tests

* Remove time localization

* Remove superfluous public js

* Add basic tests for i18n application controller

* Remove unnecessary content

Co-authored-by: Michael Kohl <citizen428@dev.to>
2021-09-28 11:04:35 -04:00

39 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: "Like comment:") %>
<%= inline_svg_tag("small-heart-filled.svg", aria: true, class: "crayons-icon reaction-icon--like reaction-icon reacted", title: "Like comment: ") %>
<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"><%= t("core.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>