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) %>");
|
||||
Reference in New Issue
Block a user