Count events and use datatables, put all tables into wells

This commit is contained in:
Henne Vogelsang 2013-05-07 15:09:13 +02:00 committed by Henne Vogelsang
parent 3022e8b8e6
commit 39ca877e5e
4 changed files with 144 additions and 125 deletions

View file

@ -2,31 +2,34 @@
People
- if @people
= "(#{@people.length})"
%table.table.table-striped.table-bordered.table-hover#people
%thead
%th
%b Email
%th
%b Last Name
%th
%b First Name
%th
%b Public Name
%th
%b # of Conference Registrations
%th
- @people.each do |person|
%tr
%td= person.email
%td= person.last_name
%td= person.first_name
%td= person.public_name
%td= person.registrations.count
%td= link_to "View", admin_person_path(person)
.well
%table.table.table-striped.table-bordered.table-hover#people
%thead
%th
%b Email
%th
%b Last Name
%th
%b First Name
%th
%b Public Name
%th
%b # of Conference Registrations
%th
- @people.each do |person|
%tr
%td= person.email
%td= person.last_name
%td= person.first_name
%td= person.public_name
%td= person.registrations.count
%td= link_to "View", admin_person_path(person)
:javascript
$(document).ready(function() {
$('#people').dataTable( {
sPaginationType: "full_numbers"
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": "200px"
} );
} );