From cf6ea96da04e03fb5e65150ebbc6ddd5054c0447 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Fri, 28 Mar 2014 21:35:46 +1100 Subject: [PATCH] Add margin to view all links --- assets/css/sportspress.css | 10 +++++++++- includes/sp-template-hooks.php | 2 +- templates/event-calendar.php | 2 +- templates/event-list.php | 2 +- templates/event-venue.php | 31 +++++++++++++++++++++---------- templates/league-table.php | 2 +- templates/player-gallery.php | 2 +- templates/player-list.php | 2 +- 8 files changed, 36 insertions(+), 17 deletions(-) diff --git a/assets/css/sportspress.css b/assets/css/sportspress.css index 2ddde8d4..d6df71a3 100644 --- a/assets/css/sportspress.css +++ b/assets/css/sportspress.css @@ -54,11 +54,19 @@ /* Google Maps */ .sp-google-map { height: 320px; - margin-bottom: 32px; } .sp-google-map img { max-width: none !important; } +.sp-venue-map { + margin-bottom: 4em; +} + +/* Templates */ +.sp-view-all-link { + display: block; + margin-top: 0.5em; +} @media only screen and (max-width: 40em) { .sp-responsive-table { diff --git a/includes/sp-template-hooks.php b/includes/sp-template-hooks.php index d0b2f1f4..160bd778 100644 --- a/includes/sp-template-hooks.php +++ b/includes/sp-template-hooks.php @@ -62,7 +62,7 @@ function sportspress_default_venue_content( $query ) { $longitude = sp_array_value( $venue_meta, 'sp_longitude', null ); if ( $latitude != null && $longitude != null ) - echo '
'; + echo '
'; } add_action( 'loop_start', 'sportspress_default_venue_content' ); diff --git a/templates/event-calendar.php b/templates/event-calendar.php index 8f9ed114..d924ba0b 100644 --- a/templates/event-calendar.php +++ b/templates/event-calendar.php @@ -195,6 +195,6 @@ if ( $pad != 0 && $pad != 7 ) $calendar_output .= "\n\t\n\t\n\t\n\t"; if ( $id && $show_all_events_link ) - $calendar_output .= '' . SP()->text->string('View all events', 'event') . ''; + $calendar_output .= '' . SP()->text->string('View all events', 'event') . ''; echo apply_filters( 'sportspress_event_calendar', $calendar_output ); diff --git a/templates/event-list.php b/templates/event-list.php index 804a75ec..57d23f28 100644 --- a/templates/event-list.php +++ b/templates/event-list.php @@ -134,6 +134,6 @@ extract( $defaults, EXTR_SKIP ); ' . SP()->text->string('View all events', 'event') . ''; + echo '' . SP()->text->string('View all events', 'event') . ''; ?> \ No newline at end of file diff --git a/templates/event-venue.php b/templates/event-venue.php index 2495a372..d6b811a5 100644 --- a/templates/event-venue.php +++ b/templates/event-venue.php @@ -4,25 +4,36 @@ if ( ! isset( $id ) ) $venues = get_the_terms( $id, 'sp_venue' ); -$output = ''; +$show_map = get_option( 'sportspress_event_show_map', 'yes' ) == 'yes' ? true : false; if ( ! $venues ) return $output; foreach( $venues as $venue ): - $t_id = $venue->term_id; $term_meta = get_option( "taxonomy_$t_id" ); $address = sp_array_value( $term_meta, 'sp_address', '' ); $latitude = sp_array_value( $term_meta, 'sp_latitude', 0 ); $longitude = sp_array_value( $term_meta, 'sp_longitude', 0 ); - - $output .= '

' . SP()->text->string('Venue', 'event') . '

'; - $output .= '

' . $venue->name . '
' . $address . '

'; - if ( $latitude != null && $longitude != null ) - $output .= '
'; - + ?> +

text->string('Venue', 'event'); ?>

+ + + + + + + + + + + + + + + + +
name; ?>
+ ' . ''; if ( $show_full_table_link ) - $output .= '' . SP()->text->string('View full table', 'team') . ''; + $output .= '' . SP()->text->string('View full table', 'team') . ''; $output .= ''; diff --git a/templates/player-gallery.php b/templates/player-gallery.php index b1aa9923..7800cdb0 100644 --- a/templates/player-gallery.php +++ b/templates/player-gallery.php @@ -121,6 +121,6 @@ $output .= " \n"; if ( $show_all_players_link ) - $output .= '' . SP()->text->string('View all players', 'player') . ''; + $output .= '' . SP()->text->string('View all players', 'player') . ''; echo apply_filters( 'sportspress_player_gallery', $output ); diff --git a/templates/player-list.php b/templates/player-list.php index 12fbf0ab..0cf40130 100644 --- a/templates/player-list.php +++ b/templates/player-list.php @@ -95,6 +95,6 @@ endforeach; $output .= '' . '' . ''; if ( $show_all_players_link ) - $output .= '' . SP()->text->string('View all players', 'player') . ''; + $output .= '' . SP()->text->string('View all players', 'player') . ''; echo apply_filters( 'sportspress_player_list', $output );