Add div wrappers to templates

This commit is contained in:
Brian Miyaji
2014-08-23 21:53:02 +10:00
parent 091c2a33ff
commit 8a4c8d8039
16 changed files with 491 additions and 451 deletions

View File

@@ -28,6 +28,7 @@ extract( $defaults, EXTR_SKIP );
if ( ! isset( $post ) ) return;
?>
<div class="sp-template sp-template-countdown">
<div id="sp-countdown-wrapper">
<h3 class="event-name"><a href="<?php echo get_permalink( $post->ID ); ?>"><?php echo $post->post_title; ?></a></h3>
<?php
@@ -68,3 +69,4 @@ if ( ! isset( $post ) ) return;
<span><?php echo sprintf( '%02s', $s ); ?> <small><?php _e( 'secs', 'sportspress' ); ?></small></span>
</time></p>
</div>
</div>

View File

@@ -37,6 +37,7 @@ $usecolumns = $calendar->columns;
if ( isset( $columns ) )
$usecolumns = $columns;
?>
<div class="sp-template sp-template-event-blocks">
<div class="sp-table-wrapper">
<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 ?>
@@ -103,6 +104,7 @@ if ( isset( $columns ) )
</tbody>
</table>
</div>
</div>
<?php
if ( $id && $show_all_events_link )
echo '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a>';

View File

@@ -209,5 +209,7 @@ $calendar_output .= "\n\t</tr>\n\t</tbody>\n\t</table>\n\t</div>";
if ( $id && $show_all_events_link )
$calendar_output .= '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a>';
echo apply_filters( 'sportspress_event_calendar', $calendar_output );
?>
<div class="sp-template sp-template-event-calendar">
<?php echo $calendar_output; ?>
</div>

View File

@@ -30,6 +30,7 @@ if ( $seasons ):
$data[ __( 'Season', 'sportspress' ) ] = $season->name;
endif;
?>
<div class="sp-template sp-template-event-details">
<h4 class="sp-table-caption"><?php _e( 'Details', 'sportspress' ); ?></h4>
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
<table class="sp-event-details sp-data-table">
@@ -49,3 +50,4 @@ endif;
</tbody>
</table>
</div>
</div>

View File

@@ -47,6 +47,7 @@ if ( isset( $columns ) ):
$usecolumns = explode( ',', $columns );
endif;
?>
<div class="sp-template sp-template-event-list">
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
<table class="sp-event-list sp-data-table<?php if ( $responsive ) { ?> sp-responsive-table<?php } if ( $paginated ) { ?> sp-paginated-table<?php } ?>" data-sp-rows="<?php echo $rows; ?>">
<thead>
@@ -188,6 +189,7 @@ endif;
</tbody>
</table>
</div>
</div>
<?php
if ( $id && $show_all_events_link )
echo '<a class="sp-calendar-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all events', 'sportspress' ) . '</a>';

View File

@@ -59,6 +59,7 @@ if ( is_array( $teams ) ):
$data = sp_array_combine( $players, sp_array_value( $performance, $team_id, array() ) );
?>
<div class="sp-template sp-template-event-performance">
<h4 class="sp-table-caption"><?php echo get_the_title( $team_id ); ?></h4>
<?php
if ( get_option( 'sportspress_event_show_staff', 'yes' ) == 'yes' ):
@@ -212,6 +213,7 @@ if ( is_array( $teams ) ):
<?php endif; ?>
</table>
</div>
</div>
<?php
endforeach;
endif;

View File

@@ -100,5 +100,7 @@ else:
$output .= '</tbody>' . '</table>' . '</div>';
endif;
echo $output;
?>
<div class="sp-template sp-template-event-results">
<?php echo $output; ?>
</div>

View File

@@ -32,6 +32,7 @@ foreach( $venues as $venue ):
$latitude = sp_array_value( $meta, 'sp_latitude', 0 );
$longitude = sp_array_value( $meta, 'sp_longitude', 0 );
?>
<div class="sp-template sp-template-event-venue">
<h4 class="sp-table-caption"><?php _e( 'Venue', 'sportspress' ); ?></h4>
<table class="sp-data-table sp-event-venue">
<thead>
@@ -52,5 +53,6 @@ foreach( $venues as $venue ):
</tbody>
<?php endif; ?>
</table>
</div>
<?php
endforeach;

View File

@@ -14,6 +14,12 @@ if ( ! isset( $id ) )
$video_url = get_post_meta( $id, 'sp_video', true );
if ( $video_url ):
?>
<div class="sp-event-video">
<?php
global $wp_embed;
echo $wp_embed->autoembed( $video_url );
?>
</div>
<?php
endif;

View File

@@ -153,4 +153,7 @@ $output .= '</div>';
if ( $show_full_table_link )
$output .= '<a class="sp-league-table-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View full table', 'sportspress' ) . '</a>';
echo $output;
?>
<div class="sp-template sp-template-league-table">
<?php echo $output; ?>
</div>

View File

@@ -63,5 +63,5 @@ foreach( $data as $label => $value ):
endforeach;
$output .= '</dl></div>';
echo apply_filters( 'sportspress_player_details', $output );
?>
<?php echo $output; ?>

View File

@@ -91,8 +91,11 @@ if ( apply_filters( 'use_default_gallery_style', true ) )
</style>";
$size_class = sanitize_html_class( $size );
$gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );
echo apply_filters( 'gallery_style', $gallery_style . "\n\t\t" );
?>
<div class="sp-template sp-template-player-gallery">
<?php echo $gallery_div; ?>
<?php
if ( intval( $number ) > 0 )
$limit = $number;
@@ -144,3 +147,5 @@ echo "</div>\n";
if ( $show_all_players_link )
echo '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a>';
?>
</div>

View File

@@ -162,5 +162,7 @@ endforeach;
if ( $show_all_players_link )
$output .= '<a class="sp-player-list-link sp-view-all-link" href="' . get_permalink( $id ) . '">' . __( 'View all players', 'sportspress' ) . '</a>';
echo apply_filters( 'sportspress_player_list', $output );
?>
<div class="sp-template sp-template-player-list">
<?php echo $output; ?>
</div>

View File

@@ -60,7 +60,10 @@ if ( is_array( $leagues ) ):
endforeach;
$output .= '</tbody>' . '</table>' . '</div>';
echo apply_filters( 'sportspress_player_statistics', $output );
?>
<div class="sp-template sp-template-player-statistics">
<?php echo $output; ?>
</div>
<?php
endforeach;
endif;

View File

@@ -53,5 +53,7 @@ foreach( $data as $label => $value ):
endforeach;
$output .= '</dl></div>';
echo apply_filters( 'sportspress_staff_details', $output );
?>
<div class="sp-template sp-template-staff-details">
<?php echo $output; ?>
</div>

View File

@@ -67,4 +67,7 @@ foreach ( $leagues as $league ):
endforeach;
echo apply_filters( 'sportspress_team_columns', $output );
?>
<div class="sp-template sp-template-team-columns">
<?php echo $output; ?>
</div>