docbrown/app/views/comments/_comment_header.html.erb
yheuhtozr a93e9f1aa7
I18nize users (non-settings) & logo designer (#15078)
* users (mostly non-settings), logo designer i18n

* remove ja.yml

* Update _profile.html.erb

* Update _metadata.html.erb

* Update _sidebar.html.erb

* Update en.yml

* Update fr.yml

* Apply suggestions from code review

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update _profile.html.erb

* Update en.yml

* Update fr.yml

* Update _logo_design.html.erb

Co-authored-by: Michael Kohl <citizen428@forem.com>
2021-10-27 17:11:28 -04:00

45 lines
3.8 KiB
Text

<div class="comment__header">
<a href="<%= URL.user(comment.user) %>" class="crayons-link crayons-link--secondary flex items-center fw-medium m:hidden">
<span class="js-comment-username"><%= comment.user.name %></span>
<% if commentable_author_is_op?(commentable, comment) %>
<span class="crayons-hover-tooltip inline-block spec-op-author -mr-2" data-tooltip="<%= get_ama_or_op_banner(commentable) %>">
<%= inline_svg_tag("small-medal.svg", aria: true, class: "crayons-icon", title: get_ama_or_op_banner(commentable)) %>
</span>
<% end %>
</a>
<div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:block">
<button id="comment-profile-preview-trigger-<%= comment.id %>" aria-controls="comment-profile-preview-content-<%= comment.id %>" class="profile-preview-card__trigger p-1 -my-1 -ml-1 crayons-btn crayons-btn--ghost" aria-label="<%= t("views.users.details", user: comment.user.name) %>">
<%= comment.user.name %>
</button>
<%= render "/shared/profile_preview_card", actor: comment.user, id: "comment-profile-preview-content-#{comment.id}" %>
<% if commentable_author_is_op?(commentable, comment) %>
<span class="crayons-hover-tooltip inline-block spec-op-author -ml-2" data-tooltip="<%= get_ama_or_op_banner(commentable) %>">
<%= inline_svg_tag("small-medal.svg", aria: true, class: "crayons-icon", title: get_ama_or_op_banner(commentable)) %>
</span>
<% end %>
</div>
<%= render "comments/comment_date", decorated_comment: decorated_comment %>
<div class="comment__dropdown">
<button id="comment-dropdown-trigger-<%= comment.id %>" aria-controls="comment-dropdown-<%= comment.id %>" aria-expanded="false" class="dropbtn comment__dropdown-trigger crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon"
aria-label="<%= t("views.comments.menu.aria_label") %>" aria-haspopup="true">
<%= inline_svg_tag("small-overflow-horizontal.svg", aria: true, class: "crayons-icon pointer-events-none", title: t("views.comments.menu.icon")) %>
</button>
<div id="comment-dropdown-<%= comment.id %>" class="crayons-dropdown right-1 s:right-0 s:left-auto fs-base dropdown">
<ul class="m-0">
<li><a href="<%= URL.comment(comment) %>" class="crayons-link crayons-link--block permalink-copybtn" aria-label="<%= t("views.comments.menu.copy.aria_label", user: comment.user.name) %>" data-no-instant><%= t("views.comments.menu.copy.text") %></a></li>
<li class="comment-actions hidden" data-user-id="<%= comment.user_id %>" data-action="settings-button" data-path="<%= URL.comment(comment) %>/settings" aria-label="<%= t("views.comments.menu.settings.aria_label", user: comment.user.name) %>"></li>
<% action = comment.hidden_by_commentable_user ? 'unhide' : 'hide' %>
<li class="comment-actions hidden" data-action="hide-button" data-commentable-user-id="<%= commentable&.user_id %>" data-user-id="<%= comment.user_id %>">
<a href="#" class="crayons-link crayons-link--block hide-comment" data-hide-type="<%= action %>" data-comment-id="<%= comment.id %>" aria-label="<%= t("views.comments.menu.action.aria_label", action: t("views.comments.menu.action.#{action}"), user: comment.user.name) %>">
<%= t("views.comments.menu.action.#{action}_text") %>
</a>
</li>
<li class="mod-actions hidden mod-actions-comment-button" data-path="<%= URL.comment(comment) %>/mod" aria-label="<%= t("views.comments.menu.moderate.aria_label", user: comment.user.name) %>"></li>
<li class="report-abuse-link-wrapper" data-path="/report-abuse?url=<%= URL.comment(comment) %>" aria-label="<%= t("views.comments.menu.report.aria_label", user: comment.user.name) %>"></li>
<li class="current-user-actions"></li>
</ul>
</div>
</div>
</div>