diff --git a/app/models/pool.rb b/app/models/pool.rb index b55c074a9..f862d753c 100644 --- a/app/models/pool.rb +++ b/app/models/pool.rb @@ -1,5 +1,6 @@ class Pool < ApplicationRecord class RevertError < Exception ; end + POOL_ORDER_LIMIT = 100 array_attribute :post_ids, parse: /\d+/, cast: :to_i belongs_to_creator diff --git a/app/views/pool_orders/edit.html.erb b/app/views/pool_orders/edit.html.erb index 936a4d2ef..b31be6a06 100644 --- a/app/views/pool_orders/edit.html.erb +++ b/app/views/pool_orders/edit.html.erb @@ -1,20 +1,27 @@
Drag and drop the list below to determine ordering.
- <%= render "posts/partials/common/inline_blacklist" %> + <%= simple_form_for(@pool, format: :js, html: { id: "ordering-form" }) do |f| %> + <% if @pool.post_count <= Pool::POOL_ORDER_LIMIT %> +Drag and drop the list below to determine ordering.
-Reorder the post IDs in the text box below to reorder the pool.
+ + <%= f.input :post_ids_string, as: :text, label: "Posts" %> <% end %> -