diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/info_request_batch_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/request_controller.rb | 2 | ||||
-rw-r--r-- | app/views/info_request_batch/show.html.erb | 10 |
3 files changed, 14 insertions, 2 deletions
diff --git a/app/controllers/info_request_batch_controller.rb b/app/controllers/info_request_batch_controller.rb index 1e1030b53..f76f7abc2 100644 --- a/app/controllers/info_request_batch_controller.rb +++ b/app/controllers/info_request_batch_controller.rb @@ -2,6 +2,10 @@ class InfoRequestBatchController < ApplicationController def show @info_request_batch = InfoRequestBatch.find(params[:id]) + @per_page = 25 + @page = get_search_page_from_params + @info_requests = @info_request_batch.info_requests.all(:offset => (@page - 1) * @per_page, + :limit => @per_page) end end diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index b9be333c8..e516501d4 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -226,8 +226,6 @@ class RequestController < ApplicationController return render_new_preview end - # TODO: give messages about bodies - # that are no longer requestable @info_request_batch = InfoRequestBatch.create!(:title => params[:info_request][:title], :body => params[:outgoing_message][:body], :user => authenticated_user) diff --git a/app/views/info_request_batch/show.html.erb b/app/views/info_request_batch/show.html.erb new file mode 100644 index 000000000..02583a9b5 --- /dev/null +++ b/app/views/info_request_batch/show.html.erb @@ -0,0 +1,10 @@ +<% @title = _("Batch request") %> +<h1><%= @title %></h1> +<div class="results_section"> + <div class="results_block"> + <% @info_requests.each do |info_request| %> + <%= render :partial => 'request/request_listing_via_event', :locals => { :event => info_request.last_event_forming_initial_request, :info_request => info_request } %> + <% end %> + </div> + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @info_request_batch.info_requests.count) %> +</div> |