Removed files that are not used
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= form_tag(search_questions_admin_poll_path(@poll), method: :get, remote: true) do |f| %>
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :search,
|
||||
@search,
|
||||
placeholder: t("admin.shared.poll_questions_search.placeholder"), id: "search-questions" %>
|
||||
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t("admin.shared.poll_questions_search.button"), class: "button" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="search-questions-results"></div>
|
||||
@@ -1,33 +0,0 @@
|
||||
<% if @questions.blank? %>
|
||||
<div class="callout alert margin-bottom">
|
||||
<%= t('admin.shared.no_search_results') %>
|
||||
</div>
|
||||
<% else %>
|
||||
<h3><%= t('admin.shared.search_results') %></h3>
|
||||
<% end %>
|
||||
|
||||
<% if @questions.any? %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.polls.show.table_name") %></th>
|
||||
<th class="text-center"><%= t("admin.polls.show.table_assignment") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @questions.each do |question| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= question.title %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= 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" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
@@ -1 +0,0 @@
|
||||
$("#search-questions-results").html("<%= j render 'search_questions_results' %>");
|
||||
Reference in New Issue
Block a user