|
297 | 297 | <% unless post.locked? %> |
298 | 298 | <% if !post.deleted %> |
299 | 299 | <%= link_to delete_post_path(post), method: :post, |
300 | | - data: { confirm: 'Are you sure you want to delete this post?' }, class: "tools--item is-danger", |
| 300 | + data: { confirm: 'Are you sure you want to delete this post?' }, |
| 301 | + class: "tools--item is-danger", |
301 | 302 | role: 'button', 'aria-label': 'Delete this post' do %> |
302 | 303 | <i class="fa fa-trash"></i> |
303 | 304 | Delete |
304 | 305 | <% end %> |
305 | 306 | <% else %> |
306 | 307 | <%= link_to restore_post_path(post), method: :post, |
307 | | - data: { confirm: 'Restore this post, making it visible to regular users?' }, class: "tools--item is-danger is-filled", |
| 308 | + data: { confirm: 'Restore this post, making it visible to regular users?' }, |
| 309 | + class: "tools--item is-danger is-filled", |
308 | 310 | role: 'button', 'aria-label': 'Restore this post' do %> |
309 | 311 | <i class="fa fa-undo"></i> |
310 | 312 | Restore |
|
313 | 315 | <% end %> |
314 | 316 | <% end %> |
315 | 317 | <% if check_your_privilege('flag_curate') %> |
316 | | - <a href="javascript:void(0);" data-modal="#mod-tools-<%= post.id %>" class="tools--item" role="button" aria-label="Open Moderator Tools"> |
| 318 | + <a href="javascript:void(0)" |
| 319 | + data-modal="#mod-tools-<%= post.id %>" |
| 320 | + class="tools--item" |
| 321 | + role="button" |
| 322 | + aria-label="Open Moderator Tools"> |
317 | 323 | <i class="fa fa-wrench"></i> |
318 | 324 | Tools |
319 | 325 | </a> |
|
429 | 435 | <input class="form-element js-flag-comment" id="flag-post-<%= post.id %>"> |
430 | 436 | </div> |
431 | 437 | <div class="widget--footer"> |
432 | | - <button class="flag-link button is-filled is-muted" data-post-type="<%= is_question ? 'Question' : 'Answer' %>" data-post-id="<%= post.id %>"> |
| 438 | + <button class="flag-link button is-filled is-muted" |
| 439 | + data-post-type="<%= is_question ? 'Question' : 'Answer' %>" |
| 440 | + data-post-id="<%= post.id %>"> |
433 | 441 | Flag for attention |
434 | 442 | </button> |
435 | 443 | </div> |
|
501 | 509 |
|
502 | 510 | <% if is_top_level && post.children.undeleted.length >= SiteSetting["TableOfContentsThreshold"] && SiteSetting["TableOfContentsThreshold"] != -1 %> |
503 | 511 | <div class="toc has-margin-left-4" id="toc-toggle"> |
504 | | - <button class="toc--header" data-toggle="#toc-toggle" data-toggle-property="class" data-toggle-value="is-active">Table of Contents</button> |
| 512 | + <button class="toc--header" |
| 513 | + data-toggle="#toc-toggle" |
| 514 | + data-toggle-property="class" |
| 515 | + data-toggle-value="is-active">Table of Contents</button> |
505 | 516 | <% sorted_answers = post.children.sort_by { |answer| answer.score }.reverse! %> |
506 | 517 | <% sorted_answers.each do |answer| %> |
507 | 518 | <% next if answer.deleted? && !at_least_moderator? %> |
|
532 | 543 | <%= pluralize(public_count, 'comment thread') %> |
533 | 544 | </h4> |
534 | 545 | <% if user_signed_in? %> |
535 | | - <% if post.followed_by?(current_user) %> |
536 | | - <%= link_to unfollow_post_comments_path(post_id: post.id), method: :post, |
537 | | - class: "button is-muted is-outlined is-small", |
538 | | - title: 'Don\'t follow new comment threads on this post', |
539 | | - role: 'button', |
540 | | - 'aria-label': 'Unfollow new comment threads on this post' do %> |
541 | | - <i class="fas fa-fw fa-bell-slash"></i> Unfollow new |
542 | | - <% end %> |
543 | | - <% else %> |
544 | | - <%= link_to follow_post_comments_path(post_id: post.id), method: :post, |
545 | | - class: "button is-muted is-outlined is-small", |
546 | | - title: 'Follow all new comment threads on this post', |
547 | | - role: 'button', |
548 | | - 'aria-label': 'Follow all new comment threads on this post' do %> |
549 | | - <i class="fas fa-fw fa-bell"></i> Follow new |
550 | | - <% end %> |
551 | | - <% end %> |
| 546 | + <%= render 'posts/follow_comments_link', post: post, user: current_user %> |
552 | 547 | <% end %> |
553 | 548 | </div> |
554 | 549 | <div class="post--comments-container" role="list"> |
|
558 | 553 | </div> |
559 | 554 | <div class="post--comments-links has-margin-top-1"> |
560 | 555 | <% if available_count > [comment_threads.count, 5].min %> |
561 | | - <a href="#" class="js-more-comments button is-muted is-small" data-post-id="<%= post.id %>" role="button" aria-label="Show more comment threads"> |
| 556 | + <a href="#" class="js-more-comments button is-muted is-small" |
| 557 | + data-post-id="<%= post.id %>" |
| 558 | + role="button" |
| 559 | + aria-label="Show more comment threads"> |
562 | 560 | Show more |
563 | 561 | </a> |
564 | 562 | <% end %> |
|
0 commit comments