diff --git a/app/controllers/admin/poll/polls_controller.rb b/app/controllers/admin/poll/polls_controller.rb index 3b3c4f7bd..fb4b4d127 100644 --- a/app/controllers/admin/poll/polls_controller.rb +++ b/app/controllers/admin/poll/polls_controller.rb @@ -1,7 +1,7 @@ class Admin::Poll::PollsController < Admin::Poll::BaseController load_and_authorize_resource - before_action :load_search, only: [:search_booths, :search_questions, :search_officers] + before_action :load_search, only: [:search_booths, :search_officers] before_action :load_geozones, only: [:new, :create, :edit, :update] def index @@ -47,13 +47,6 @@ class Admin::Poll::PollsController < Admin::Poll::BaseController redirect_to admin_poll_path(@poll), notice: notice end - def search_questions - @questions = ::Poll::Question.where("poll_id IS ? OR poll_id != ?", nil, @poll.id).search(search: @search).order(title: :asc) - respond_to do |format| - format.js - end - end - private def load_geozones diff --git a/app/views/admin/poll/polls/_search_questions.html.erb b/app/views/admin/poll/polls/_search_questions.html.erb deleted file mode 100644 index 659cdcd37..000000000 --- a/app/views/admin/poll/polls/_search_questions.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -
-
- <%= form_tag(search_questions_admin_poll_path(@poll), method: :get, remote: true) do |f| %> -
- <%= text_field_tag :search, - @search, - placeholder: t("admin.shared.poll_questions_search.placeholder"), id: "search-questions" %> - -
- <%= submit_tag t("admin.shared.poll_questions_search.button"), class: "button" %> -
-
- <% end %> -
-
- -
diff --git a/app/views/admin/poll/polls/_search_questions_results.html.erb b/app/views/admin/poll/polls/_search_questions_results.html.erb deleted file mode 100644 index f6f11e1f1..000000000 --- a/app/views/admin/poll/polls/_search_questions_results.html.erb +++ /dev/null @@ -1,33 +0,0 @@ -<% if @questions.blank? %> -
- <%= t('admin.shared.no_search_results') %> -
-<% else %> -

<%= t('admin.shared.search_results') %>

-<% end %> - -<% if @questions.any? %> - - - - - - - - - <% @questions.each do |question| %> - - - - - <% end %> - -
<%= t("admin.polls.show.table_name") %><%= t("admin.polls.show.table_assignment") %>
- <%= question.title %> - - <%= link_to t("admin.polls.show.add_question"), - add_question_admin_poll_path(poll_id: @poll.id, question_id: question.id), - method: :patch, - class: "button hollow" %> -
-<% end %> diff --git a/app/views/admin/poll/polls/search_questions.js.erb b/app/views/admin/poll/polls/search_questions.js.erb deleted file mode 100644 index 05f5c5167..000000000 --- a/app/views/admin/poll/polls/search_questions.js.erb +++ /dev/null @@ -1 +0,0 @@ -$("#search-questions-results").html("<%= j render 'search_questions_results' %>"); \ No newline at end of file