From 9cdc2a7cd729b690cb928f05237359fe7ed0d9c8 Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 21 Mar 2013 17:58:55 -0700 Subject: [PATCH] fixes #1014 --- app/assets/javascripts/notes.js | 1 + .../comments/partials/show/_comment.html.erb | 23 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 3feb4f9e0..aeb9aaa70 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -237,6 +237,7 @@ Danbooru.Note = { }) } else { $note_body.click(function(e) { + Danbooru.notice("You must be logged in to edit notes"); e.stopPropagation(); }); } diff --git a/app/views/comments/partials/show/_comment.html.erb b/app/views/comments/partials/show/_comment.html.erb index 96f9801f2..be178e30e 100644 --- a/app/views/comments/partials/show/_comment.html.erb +++ b/app/views/comments/partials/show/_comment.html.erb @@ -13,17 +13,20 @@

Updated by <%= link_to comment.updater_name, user_path(comment.updater_id) %> <%= time_ago_in_words_tagged(comment.updated_at) %>

<% end %> - - <% if @post || @posts %> -
  • <%= link_to "Reply", new_comment_path(:post_id => comment.post_id), :class => "reply-link", "data-comment-id" => comment.id %>
  • - <% if comment.editable_by?(CurrentUser.user) %> -
  • <%= link_to "Delete", comment_path(comment.id), :confirm => "Do you really want to delete this comment?", :method => :delete, :remote => true %>
  • -
  • <%= link_to "Edit", edit_comment_path(comment.id) %>
  • + + <% if CurrentUser.is_member? %> + + <% if @post || @posts %> +
  • <%= link_to "Reply", new_comment_path(:post_id => comment.post_id), :class => "reply-link", "data-comment-id" => comment.id %>
  • + <% if comment.editable_by?(CurrentUser.user) %> +
  • <%= link_to "Delete", comment_path(comment.id), :confirm => "Do you really want to delete this comment?", :method => :delete, :remote => true %>
  • +
  • <%= link_to "Edit", edit_comment_path(comment.id) %>
  • + <% end %> + + <% end %> - - - <% end %> -
    +
    + <% end %>