Paginate event blocks

This commit is contained in:
Brian Miyaji
2014-04-29 17:09:00 +10:00
parent 71b604294d
commit efb2af70a1
2 changed files with 7 additions and 1 deletions

View File

@@ -88,6 +88,9 @@
} }
/* Event Blocks */ /* Event Blocks */
.sp-event-blocks thead {
display: none;
}
.sp-event-blocks .event-date, .sp-event-blocks .event-date,
.sp-event-blocks .event-time, .sp-event-blocks .event-time,
.sp-event-blocks .event-results, .sp-event-blocks .event-results,

View File

@@ -14,6 +14,8 @@ $primary_result = get_option( 'sportspress_primary_result', null );
$defaults = array( $defaults = array(
'status' => 'default', 'status' => 'default',
'number' => -1, 'number' => -1,
'paginated' => get_option( 'sportspress_calendar_paginated', 'yes' ) == 'yes' ? true : false,
'rows' => get_option( 'sportspress_calendar_rows', 10 ),
'order' => 'default', 'order' => 'default',
'show_all_events_link' => false, 'show_all_events_link' => false,
); );
@@ -32,7 +34,8 @@ if ( isset( $columns ) )
$usecolumns = $columns; $usecolumns = $columns;
?> ?>
<div class="sp-table-wrapper"> <div class="sp-table-wrapper">
<table class="sp-event-blocks sp-data-table"> <table class="sp-event-blocks sp-data-table<?php if ( $paginated ) { ?> sp-paginated-table<?php } ?>" data-sp-rows="<?php echo $rows; ?>">
<thead><tr><th></th></tr></thead> <?php # Required for DataTables ?>
<tbody> <tbody>
<?php <?php
$i = 0; $i = 0;