Add key shortcut to add to favgroup
This commit is contained in:
11
app/views/favorite_groups/_add_to_favgroup_dialog.html.erb
Normal file
11
app/views/favorite_groups/_add_to_favgroup_dialog.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<p>Select a favorite group to add this post to:</p>
|
||||
|
||||
<% CurrentUser.favorite_groups.each_with_index do |favgroup, i| %>
|
||||
<div>
|
||||
<%= i + 1 %>.
|
||||
<%= link_to favgroup.name,
|
||||
add_post_favorite_group_path(favgroup, :post_id => post.id, :format => :js),
|
||||
:id => "add-to-favgroup-#{i + 1}", :class => "add-to-favgroup",
|
||||
:method => :put, :remote => true %>
|
||||
</div>
|
||||
<% end %>
|
||||
1
app/views/favorite_groups/add_post.js.erb
Normal file
1
app/views/favorite_groups/add_post.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
Danbooru.notice("Added post to favorite group <%= escape_javascript(@favorite_group.pretty_name) %>");
|
||||
@@ -133,6 +133,10 @@
|
||||
<div id="add-commentary-dialog" title="Add artist commentary" style="display: none;">
|
||||
<%= render "artist_commentaries/form", :artist_commentary => @post.artist_commentary %>
|
||||
</div>
|
||||
|
||||
<div id="add-to-favgroup-dialog" title="Add to favorite group" style="display: none;">
|
||||
<%= render "favorite_groups/add_to_favgroup_dialog", :post => @post %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<li><kbd class="key">a</kbd> Previous post</li>
|
||||
<li><kbd class="key">d</kbd> Next post</li>
|
||||
<li><kbd class="key">f</kbd> Favorite post</li>
|
||||
<li><kbd class="key">g</kbd> Add post to favorite group</li>
|
||||
<li><kbd class="key">r</kbd> Go to random post</li>
|
||||
<li><kbd class="key">v</kbd> Toggle between sample and full size</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user