From 3621edd357c197518d93617cc93f092cde164036 Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 5 Mar 2013 17:53:59 -0500 Subject: [PATCH] fixes #715 --- app/assets/javascripts/notes.js | 6 ++++-- app/views/posts/partials/show/_edit.html.erb | 2 +- app/views/posts/partials/show/_options.html.erb | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 000a312e3..2c30f693c 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -467,8 +467,10 @@ Danbooru.Note = { $(function() { if ($("#c-posts").length && $("#a-show").length && $("#image").length) { - $("#translate").one("click", Danbooru.Note.TranslationMode.start); - $(document).bind("keydown.n", Danbooru.Note.TranslationMode.start); + if ($("#note-locked-notice").length == 0) { + $("#translate").one("click", Danbooru.Note.TranslationMode.start); + $(document).bind("keydown.n", Danbooru.Note.TranslationMode.start); + } Danbooru.Note.load_all(); $("#image").click(Danbooru.Note.Box.toggle_all); } diff --git a/app/views/posts/partials/show/_edit.html.erb b/app/views/posts/partials/show/_edit.html.erb index 7501451ff..9d0cc5e86 100644 --- a/app/views/posts/partials/show/_edit.html.erb +++ b/app/views/posts/partials/show/_edit.html.erb @@ -26,7 +26,7 @@ <% end %> - <% if CurrentUser.is_janitor? %> + <% if CurrentUser.is_builder? %>
<%= f.label :blank, "Lock" %> diff --git a/app/views/posts/partials/show/_options.html.erb b/app/views/posts/partials/show/_options.html.erb index f44583706..85249a032 100644 --- a/app/views/posts/partials/show/_options.html.erb +++ b/app/views/posts/partials/show/_options.html.erb @@ -4,7 +4,11 @@
  • <%= link_to "Favorite", favorites_path(:post_id => post.id), :remote => true, :method => :post, :id => "add-to-favorites" %>
  • <%= link_to "Unfavorite", favorite_path(post), :remote => true, :method => :delete, :id => "remove-from-favorites" %>
  • <%= link_to "Add to pool", "#", :id => "pool" %>
  • -
  • <%= link_to "Add note", "#", :id => "translate", :title => "Shortcut is CTRL+N" %>
  • + <% if post.is_note_locked? %> +
  • Note locked
  • + <% else %> +
  • <%= link_to "Add note", "#", :id => "translate", :title => "Shortcut is CTRL+N" %>
  • + <% end %>
  • <%= link_to "Find similar", "http://danbooru.iqdb.org/db-search.php?url=http://#{Danbooru.config.hostname}#{post.preview_file_url}" %>
  • <% unless post.is_status_locked? %>