Merged branch Overview-Results-Index into master

This commit is contained in:
Okechi Onyeje 2017-01-20 01:51:31 -05:00
commit 55b88fabe8
5 changed files with 22 additions and 0 deletions

View File

@ -36,6 +36,8 @@ gem 'bcrypt', '~> 3.1.7'
# gem 'capistrano-rails', group: :development # gem 'capistrano-rails', group: :development
# for sign in sign up # for sign in sign up
gem 'devise' gem 'devise'
#for pagination
gem 'kaminari'
group :development, :test do group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console # Call 'byebug' anywhere in the code to stop execution and get a debugger console

View File

@ -82,6 +82,18 @@ GEM
rails-dom-testing (>= 1, < 3) rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
kaminari (1.0.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.0.1)
kaminari-activerecord (= 1.0.1)
kaminari-core (= 1.0.1)
kaminari-actionview (1.0.1)
actionview
kaminari-core (= 1.0.1)
kaminari-activerecord (1.0.1)
activerecord
kaminari-core (= 1.0.1)
kaminari-core (1.0.1)
listen (3.0.8) listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4) rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7) rb-inotify (~> 0.9, >= 0.9.7)
@ -201,6 +213,7 @@ DEPENDENCIES
hirb-unicode hirb-unicode
jbuilder (~> 2.5) jbuilder (~> 2.5)
jquery-rails jquery-rails
kaminari
listen (~> 3.0.5) listen (~> 3.0.5)
mysql2 (>= 0.3.18, < 0.5) mysql2 (>= 0.3.18, < 0.5)
pry-byebug pry-byebug

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -2,6 +2,7 @@ class DashboardController < ApplicationController
before_filter :deny_to_visitors before_filter :deny_to_visitors
def index def index
@results = Result.page(params[:page]).per(5)
end end

View File

@ -143,6 +143,12 @@
<% end %> <% end %>
</tbody> </tbody>
</table> </table>
<div class="center-block">
<div class="col-sm-6 panel panel-primary" align="center">
<%= paginate @results %><br>
<%= page_entries_info @results %>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>