Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Grid view template. This file loads the TEC month view, specifically the
- * month view navigation. The actual rendering if the calendar happens in the
- * table.php template.
- *
- * You can customize this view by putting a replacement file of the same name (gridview.php) in the events/ directory of your theme.
- */
- // Don't load directly
- if ( !defined('ABSPATH') ) { die('-1'); }
- $tribe_ecp = TribeEvents::instance();
- echo '<h2>Agenda</h2>';
- // Listing categories above calendar
- $terms = get_terms("tribe_events_cat");
- $count = count($terms);
- if ( $count > 0 ){
- echo '<ul class="events-cat-menu">';
- foreach ( $terms as $term ) {
- echo '<li class="cat_'. $term->slug .'"><a href="'. get_term_link($term->slug, 'tribe_events_cat') .'">' . $term->name . '</a></li>';
- }
- echo '</ul>';
- }
- ?>
- <div id="tribe-events-content" class="grid">
- <!-- This title is here for ajax loading - do not remove if you wish to use ajax switching between month views -->
- <title><?php wp_title() ?></title>
- <div id='tribe-events-calendar-header' class="clearfix">
- <span class='tribe-events-month-nav'>
- <span class='tribe-events-prev-month'>
- <a href='<?php echo tribe_get_previous_month_link(); ?>'>
- ← <?php echo tribe_get_previous_month_text(); ?>
- </a>
- </span>
- <?php tribe_month_year_dropdowns( "tribe-events-" ); ?>
- <span class='tribe-events-next-month'>
- <a href='<?php echo tribe_get_next_month_link(); ?>'>
- <?php echo tribe_get_next_month_text(); ?> →
- </a>
- <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" style='display: none'/>
- </span>
- </span>
- <span class='tribe-events-calendar-buttons'>
- <a class='tribe-events-button-off' href='<?php echo tribe_get_listview_link(); ?>'><?php _e('Event List', 'tribe-events-calendar')?></a>
- <a class='tribe-events-button-on' href='<?php echo tribe_get_gridview_link(); ?>'><?php _e('Calendar', 'tribe-events-calendar')?></a>
- </span>
- </div><!-- tribe-events-calendar-header -->
- <?php tribe_calendar_grid(); // See the views/table.php template for customization ?>
- <?php if( function_exists( 'tribe_get_ical_link' ) ): ?>
- <a title="<?php esc_attr_e('iCal Import', 'tribe-events-calendar') ?>" class="ical" href="<?php echo tribe_get_ical_link(); ?>"><?php _e('iCal Import', 'tribe-events-calendar') ?></a>
- <?php endif; ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement