You are here

function commons_events_views_post_execute in Drupal Commons 7.3

Implements hook_views_post_execute().

File

modules/commons/commons_events/commons_events.module, line 466

Code

function commons_events_views_post_execute(&$view) {
  if ($view->name == 'commons_events_upcoming' && $view->current_display == 'panel_pane_1') {
    $view->attachment_after = '<div class="more-link">' . commons_events_upcoming_more_link($view->args[0]) . '</div>';
  }
  if ($view->name == 'commons_events_upcoming' && $view->current_display == 'panel_pane_2') {
    $view->attachment_before = '<div class="commons-event-count">' . format_plural(count($view->result), '1 event', '@count events') . '</div>';
  }
}