Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions app/views/comments/_comment_actions.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h5 class="landmark heading"><%= ts("Comment Actions") %></h5>
<h5 class="landmark heading"><%= t(".comment_actions") %></h5>

<ul class="actions" id="navigation_for_comment_<%= comment.id %>" <% if focused_on_comment(comment) %> style="display:none;"<% end %>>
<%# The effect is "Frozen" replaces "Reply." We can't do that in the helper
Expand All @@ -11,11 +11,12 @@
<% if can_reply_to_comment?(comment) %>
<li id="add_comment_reply_link_<%= comment.id %>"><%= add_comment_reply_link comment %></li>
<% end %>
<% unless comment.unreviewed? %>
<li><%= link_to ts("Thread"), comment %></li>
<% end %>
<% if comment.depth > 0 %>
<li><%= link_to ts("Parent Thread"), comment_path(id: comment.thread) %></li>
<li><%= link_to t(".parent"), comment_path(id: comment.commentable_id) %></li>
<li><%= link_to t(".parent_thread"), comment_path(id: comment.thread) %></li>
<% end %>
<% unless comment.unreviewed? %>
<li><%= link_to t(".thread"), comment %></li>
<% end %>
<% if can_freeze_comment?(comment) %>
<li><%= freeze_comment_button(comment) %></li>
Expand All @@ -35,7 +36,7 @@
<% end %>
<% if can_review_comment?(comment) %>
<li id="review_comment_link_<%= comment.id %>">
<%= button_to(ts("Approve"), review_comment_path(comment), method: :put) %>
<%= button_to(t(".approve"), review_comment_path(comment), method: :put) %>
</li>
<% end %>
<% if can_destroy_comment?(comment) %>
Expand Down Expand Up @@ -64,11 +65,11 @@
<%# This is where the reply-to box will be added when "Reply" is hit, if the user has JavaScript. %>
<%# If not, we will render the comment form if this is the comment we are replying to. %>
<% if focused_on_comment(comment) %>
<div id="add_comment_reply_placeholder_<%= comment.id %>" title="<%= ts("reply to this comment") %>">
<%= render 'comments/comment_form',
:comment => Comment.new,
:commentable => comment,
:button_name => ts("Comment") %>
<div id="add_comment_reply_placeholder_<%= comment.id %>" title="<%= t(".reply_to_this") %>">
<%= render "comments/comment_form",
comment: Comment.new,
commentable: comment,
button_name: t(".comment") %>
<% else %>
<div id="add_comment_reply_placeholder_<%= comment.id %>" style="display: none;">
<% end %>
Expand Down
8 changes: 8 additions & 0 deletions config/locales/views/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,14 @@ en:
tags: Tags
works: Works (%{count})
comments:
comment_actions:
approve: Approve
comment: Comment
comment_actions: Comment Actions
parent: Parent
parent_thread: Parent Thread
reply_to_this: Reply to this comment
thread: Thread
comment_form:
anonymous_creator: Anonymous Creator
anonymous_forewarning: While this work is anonymous, comments you post will also be listed anonymously.
Expand Down
14 changes: 14 additions & 0 deletions features/comments_and_kudos/add_comment.feature
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,20 @@ Scenario: Comment threading, comment editing
Then I should see "must be less than"
And I should see "Now, we can devour the gods, together!"

Scenario: I can see "Parent" and "Parent Thread" links on reply comments but not on top-level comments

Given the work "Random Work"
When I am logged in as "commenter"
And I post the comment "This is the top-level comment" on the work "Random Work"
Then I should not see "Parent"
And I should not see "Parent Thread"

When I reply to a comment with "This is the reply comment"
Then I should not see "Parent" within ".odd"
And I should not see "Parent Thread" within ".odd"
And I should see "Parent" within ".even"
And I should see "Parent Thread" within ".even"

Scenario: Don't receive comment notifications of your own comments by default

When I am logged in as "author"
Expand Down
Loading