Advertisement
another_nickname

gridview.php

Feb 3rd, 2012
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.49 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Grid view template.  This file loads the TEC month view, specifically the
  4.  * month view navigation.  The actual rendering if the calendar happens in the
  5.  * table.php template.
  6.  *
  7.  * You can customize this view by putting a replacement file of the same name (gridview.php) in the events/ directory of your theme.
  8.  */
  9.  
  10. // Don't load directly
  11. if ( !defined('ABSPATH') ) { die('-1'); }
  12. $tribe_ecp = TribeEvents::instance();
  13.  
  14. echo '<h2>Agenda</h2>';
  15.  
  16. // Listing categories above calendar
  17. $terms = get_terms("tribe_events_cat");
  18. $count = count($terms);
  19. if ( $count > 0 ){
  20.     echo '<ul class="events-cat-menu">';
  21.     foreach ( $terms as $term ) {
  22.             echo '<li class="cat_'. $term->slug .'"><a href="'. get_term_link($term->slug, 'tribe_events_cat') .'">' . $term->name . '</a></li>';
  23.     }
  24.     echo '</ul>';
  25. }
  26. ?>
  27.     <div id="tribe-events-content" class="grid">
  28.       <!-- This title is here for ajax loading - do not remove if you wish to use ajax switching between month views -->
  29.       <title><?php wp_title() ?></title>
  30.         <div id='tribe-events-calendar-header' class="clearfix">
  31.             <span class='tribe-events-month-nav'>
  32.                 <span class='tribe-events-prev-month'>
  33.                     <a href='<?php echo tribe_get_previous_month_link(); ?>'>
  34.                     &#x2190; <?php echo tribe_get_previous_month_text(); ?>
  35.                     </a>
  36.                 </span>
  37.  
  38.                 <?php tribe_month_year_dropdowns( "tribe-events-" ); ?>
  39.    
  40.                 <span class='tribe-events-next-month'>
  41.                     <a href='<?php echo tribe_get_next_month_link(); ?>'>              
  42.                     <?php echo tribe_get_next_month_text(); ?> &#x2192;
  43.                     </a>
  44.                <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="ajax-loading" alt="" style='display: none'/>
  45.                 </span>
  46.             </span>
  47.  
  48.             <span class='tribe-events-calendar-buttons'>
  49.                 <a class='tribe-events-button-off' href='<?php echo tribe_get_listview_link(); ?>'><?php _e('Event List', 'tribe-events-calendar')?></a>
  50.                 <a class='tribe-events-button-on' href='<?php echo tribe_get_gridview_link(); ?>'><?php _e('Calendar', 'tribe-events-calendar')?></a>
  51.             </span>
  52.         </div><!-- tribe-events-calendar-header -->
  53.         <?php tribe_calendar_grid(); // See the views/table.php template for customization ?>
  54.       <?php if( function_exists( 'tribe_get_ical_link' ) ): ?>
  55.          <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>
  56.       <?php endif; ?>
  57.     </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement