You are here

function pmtimetracking_views_default_views in Drupal PM (Project Management) 7.3

Same name and namespace in other branches
  1. 8 pmtimetracking/pmtimetracking.views_default.inc \pmtimetracking_views_default_views()
  2. 7 pmtimetracking/pmtimetracking.views_default.inc \pmtimetracking_views_default_views()
  3. 7.2 pmtimetracking/pmtimetracking.views_default.inc \pmtimetracking_views_default_views()

Implements hook_views_default_views().

File

pmtimetracking/pmtimetracking.views_default.inc, line 13
Views integration default settings.

Code

function pmtimetracking_views_default_views() {
  $views = array();
  $view = new view();
  $view->name = 'pmtimetracking_list';
  $view->description = '';
  $view->tag = 'pm';
  $view->base_table = 'node';
  $view->human_name = 'PM Timetracking';
  $view->core = 7;
  $view->api_version = '3.0';
  $view->disabled = FALSE;

  /* Edit this to true to make a default view disabled initially */

  /* Display: Master */
  $handler = $view
    ->new_display('default', 'Master', 'default');
  $handler->display->display_options['title'] = 'Timetrackings';
  $handler->display->display_options['use_more_always'] = FALSE;
  $handler->display->display_options['access']['type'] = 'perm';
  $handler->display->display_options['access']['perm'] = 'Project Management Timetracking: access';
  $handler->display->display_options['cache']['type'] = 'none';
  $handler->display->display_options['query']['type'] = 'views_query';
  $handler->display->display_options['exposed_form']['type'] = 'basic';
  $handler->display->display_options['pager']['type'] = 'full';
  $handler->display->display_options['pager']['options']['items_per_page'] = '10';
  $handler->display->display_options['style_plugin'] = 'table';
  $handler->display->display_options['style_options']['columns'] = array(
    'title' => 'title',
    'title_1' => 'title_1',
    'title_2' => 'title_2',
    'pm_date' => 'pm_date',
    'pm_duration' => 'pm_duration',
    'pm_durationunit' => 'pm_durationunit',
    'pm_handler_field_operation' => 'pm_handler_field_operation',
  );
  $handler->display->display_options['style_options']['default'] = 'pm_date';
  $handler->display->display_options['style_options']['info'] = array(
    'title' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'title_1' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'title_2' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'pm_date' => array(
      'sortable' => 1,
      'default_sort_order' => 'desc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'pm_duration' => array(
      'sortable' => 1,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'pm_durationunit' => array(
      'sortable' => 0,
      'default_sort_order' => 'asc',
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
    'pm_handler_field_operation' => array(
      'align' => '',
      'separator' => '',
      'empty_column' => 0,
    ),
  );
  $handler->display->display_options['style_options']['sticky'] = TRUE;
  $handler->display->display_options['style_options']['empty_table'] = TRUE;

  /* Header: Content: PM Add Content Link */
  $handler->display->display_options['header']['pm_handler_area_addcontent']['id'] = 'pm_handler_area_addcontent';
  $handler->display->display_options['header']['pm_handler_area_addcontent']['table'] = 'node';
  $handler->display->display_options['header']['pm_handler_area_addcontent']['field'] = 'pm_handler_area_addcontent';
  $handler->display->display_options['header']['pm_handler_area_addcontent']['node_type'] = 'pmtimetracking';
  $handler->display->display_options['header']['pm_handler_area_addcontent']['redirect'] = TRUE;

  /* No results behavior: Global: Text area */
  $handler->display->display_options['empty']['area']['id'] = 'area';
  $handler->display->display_options['empty']['area']['table'] = 'views';
  $handler->display->display_options['empty']['area']['field'] = 'area';
  $handler->display->display_options['empty']['area']['empty'] = TRUE;
  $handler->display->display_options['empty']['area']['content'] = 'No Timetrackings results match your search.';
  $handler->display->display_options['empty']['area']['format'] = 'filtered_html';

  /* Relationship: Content: Author */
  $handler->display->display_options['relationships']['uid']['id'] = 'uid';
  $handler->display->display_options['relationships']['uid']['table'] = 'node';
  $handler->display->display_options['relationships']['uid']['field'] = 'uid';

  /* Relationship: Drupal PM: PM Organization */
  $handler->display->display_options['relationships']['pmorganization_nid']['id'] = 'pmorganization_nid';
  $handler->display->display_options['relationships']['pmorganization_nid']['table'] = 'pmorganization_index';
  $handler->display->display_options['relationships']['pmorganization_nid']['field'] = 'pmorganization_nid';

  /* Relationship: Drupal PM: PM Project */
  $handler->display->display_options['relationships']['pmproject_nid']['id'] = 'pmproject_nid';
  $handler->display->display_options['relationships']['pmproject_nid']['table'] = 'pmproject_index';
  $handler->display->display_options['relationships']['pmproject_nid']['field'] = 'pmproject_nid';

  /* Field: Content: Title */
  $handler->display->display_options['fields']['title']['id'] = 'title';
  $handler->display->display_options['fields']['title']['table'] = 'node';
  $handler->display->display_options['fields']['title']['field'] = 'title';
  $handler->display->display_options['fields']['title']['label'] = 'Timetracking';
  $handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
  $handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;

  /* Field: Content: Title */
  $handler->display->display_options['fields']['title_1']['id'] = 'title_1';
  $handler->display->display_options['fields']['title_1']['table'] = 'node';
  $handler->display->display_options['fields']['title_1']['field'] = 'title';
  $handler->display->display_options['fields']['title_1']['relationship'] = 'pmorganization_nid';
  $handler->display->display_options['fields']['title_1']['label'] = 'Organization';

  /* Field: Content: Title */
  $handler->display->display_options['fields']['title_2']['id'] = 'title_2';
  $handler->display->display_options['fields']['title_2']['table'] = 'node';
  $handler->display->display_options['fields']['title_2']['field'] = 'title';
  $handler->display->display_options['fields']['title_2']['relationship'] = 'pmproject_nid';
  $handler->display->display_options['fields']['title_2']['label'] = 'Project';

  /* Field: Content: Date */
  $handler->display->display_options['fields']['pm_date']['id'] = 'pm_date';
  $handler->display->display_options['fields']['pm_date']['table'] = 'field_data_pm_date';
  $handler->display->display_options['fields']['pm_date']['field'] = 'pm_date';
  $handler->display->display_options['fields']['pm_date']['settings'] = array(
    'format_type' => 'medium',
    'fromto' => 'value',
    'multiple_number' => '',
    'multiple_from' => '',
    'multiple_to' => '',
  );

  /* Field: Content: Duration */
  $handler->display->display_options['fields']['pm_duration']['id'] = 'pm_duration';
  $handler->display->display_options['fields']['pm_duration']['table'] = 'field_data_pm_duration';
  $handler->display->display_options['fields']['pm_duration']['field'] = 'pm_duration';
  $handler->display->display_options['fields']['pm_duration']['hide_empty'] = TRUE;

  /* Field: Content: Duration unit */
  $handler->display->display_options['fields']['pm_durationunit']['id'] = 'pm_durationunit';
  $handler->display->display_options['fields']['pm_durationunit']['table'] = 'field_data_pm_durationunit';
  $handler->display->display_options['fields']['pm_durationunit']['field'] = 'pm_durationunit';

  /* Field: Content: PM Operations */
  $handler->display->display_options['fields']['pm_handler_field_operation']['id'] = 'pm_handler_field_operation';
  $handler->display->display_options['fields']['pm_handler_field_operation']['table'] = 'node';
  $handler->display->display_options['fields']['pm_handler_field_operation']['field'] = 'pm_handler_field_operation';
  $handler->display->display_options['fields']['pm_handler_field_operation']['label'] = 'Operations';
  $handler->display->display_options['fields']['pm_handler_field_operation']['display_add_icon'] = 1;
  $handler->display->display_options['fields']['pm_handler_field_operation']['display_icons'] = 1;

  /* Filter criterion: Content: Published */
  $handler->display->display_options['filters']['status']['id'] = 'status';
  $handler->display->display_options['filters']['status']['table'] = 'node';
  $handler->display->display_options['filters']['status']['field'] = 'status';
  $handler->display->display_options['filters']['status']['value'] = 1;
  $handler->display->display_options['filters']['status']['group'] = 1;
  $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;

  /* Filter criterion: Content: Type */
  $handler->display->display_options['filters']['type']['id'] = 'type';
  $handler->display->display_options['filters']['type']['table'] = 'node';
  $handler->display->display_options['filters']['type']['field'] = 'type';
  $handler->display->display_options['filters']['type']['value'] = array(
    'pmtimetracking' => 'pmtimetracking',
  );
  $handler->display->display_options['filters']['type']['group'] = 1;

  /* Filter criterion: Content: Title */
  $handler->display->display_options['filters']['title']['id'] = 'title';
  $handler->display->display_options['filters']['title']['table'] = 'node';
  $handler->display->display_options['filters']['title']['field'] = 'title';
  $handler->display->display_options['filters']['title']['operator'] = 'contains';
  $handler->display->display_options['filters']['title']['group'] = 1;
  $handler->display->display_options['filters']['title']['exposed'] = TRUE;
  $handler->display->display_options['filters']['title']['expose']['operator_id'] = 'title_op';
  $handler->display->display_options['filters']['title']['expose']['label'] = 'Timetracking';
  $handler->display->display_options['filters']['title']['expose']['operator'] = 'title_op';
  $handler->display->display_options['filters']['title']['expose']['identifier'] = 'title';
  $handler->display->display_options['filters']['title']['expose']['remember_roles'] = array(
    2 => '2',
    1 => 0,
    3 => 0,
    4 => 0,
  );

  /* Filter criterion: Content: Billing status (pm_billing_status) */
  $handler->display->display_options['filters']['pm_billing_status_value']['id'] = 'pm_billing_status_value';
  $handler->display->display_options['filters']['pm_billing_status_value']['table'] = 'field_data_pm_billing_status';
  $handler->display->display_options['filters']['pm_billing_status_value']['field'] = 'pm_billing_status_value';
  $handler->display->display_options['filters']['pm_billing_status_value']['group'] = 1;
  $handler->display->display_options['filters']['pm_billing_status_value']['exposed'] = TRUE;
  $handler->display->display_options['filters']['pm_billing_status_value']['expose']['operator_id'] = 'pm_billing_status_value_op';
  $handler->display->display_options['filters']['pm_billing_status_value']['expose']['label'] = 'Billing status';
  $handler->display->display_options['filters']['pm_billing_status_value']['expose']['operator'] = 'pm_billing_status_value_op';
  $handler->display->display_options['filters']['pm_billing_status_value']['expose']['identifier'] = 'pm_billing_status_value';
  $handler->display->display_options['filters']['pm_billing_status_value']['expose']['remember_roles'] = array(
    2 => '2',
    1 => 0,
    3 => 0,
    4 => 0,
  );
  $handler->display->display_options['filters']['pm_billing_status_value']['reduce_duplicates'] = TRUE;

  /* Filter criterion: User: Name */
  $handler->display->display_options['filters']['uid']['id'] = 'uid';
  $handler->display->display_options['filters']['uid']['table'] = 'users';
  $handler->display->display_options['filters']['uid']['field'] = 'uid';
  $handler->display->display_options['filters']['uid']['relationship'] = 'uid';
  $handler->display->display_options['filters']['uid']['value'] = '';
  $handler->display->display_options['filters']['uid']['group'] = 1;
  $handler->display->display_options['filters']['uid']['exposed'] = TRUE;
  $handler->display->display_options['filters']['uid']['expose']['operator_id'] = 'uid_op';
  $handler->display->display_options['filters']['uid']['expose']['label'] = 'User';
  $handler->display->display_options['filters']['uid']['expose']['operator'] = 'uid_op';
  $handler->display->display_options['filters']['uid']['expose']['identifier'] = 'uid';
  $handler->display->display_options['filters']['uid']['expose']['remember_roles'] = array(
    2 => '2',
    1 => 0,
    3 => 0,
    4 => 0,
  );

  /* Filter criterion: Content: Title */
  $handler->display->display_options['filters']['title_1']['id'] = 'title_1';
  $handler->display->display_options['filters']['title_1']['table'] = 'node';
  $handler->display->display_options['filters']['title_1']['field'] = 'title';
  $handler->display->display_options['filters']['title_1']['relationship'] = 'pmorganization_nid';
  $handler->display->display_options['filters']['title_1']['operator'] = 'contains';
  $handler->display->display_options['filters']['title_1']['exposed'] = TRUE;
  $handler->display->display_options['filters']['title_1']['expose']['operator_id'] = 'title_1_op';
  $handler->display->display_options['filters']['title_1']['expose']['label'] = 'Organization';
  $handler->display->display_options['filters']['title_1']['expose']['operator'] = 'title_1_op';
  $handler->display->display_options['filters']['title_1']['expose']['identifier'] = 'title_1';
  $handler->display->display_options['filters']['title_1']['expose']['remember_roles'] = array(
    2 => '2',
    1 => 0,
  );

  /* Filter criterion: Content: Title */
  $handler->display->display_options['filters']['title_2']['id'] = 'title_2';
  $handler->display->display_options['filters']['title_2']['table'] = 'node';
  $handler->display->display_options['filters']['title_2']['field'] = 'title';
  $handler->display->display_options['filters']['title_2']['relationship'] = 'pmproject_nid';
  $handler->display->display_options['filters']['title_2']['operator'] = 'contains';
  $handler->display->display_options['filters']['title_2']['exposed'] = TRUE;
  $handler->display->display_options['filters']['title_2']['expose']['operator_id'] = 'title_2_op';
  $handler->display->display_options['filters']['title_2']['expose']['label'] = 'Project';
  $handler->display->display_options['filters']['title_2']['expose']['operator'] = 'title_2_op';
  $handler->display->display_options['filters']['title_2']['expose']['identifier'] = 'title_2';
  $handler->display->display_options['filters']['title_2']['expose']['remember_roles'] = array(
    2 => '2',
    1 => 0,
  );

  /* Display: Page */
  $handler = $view
    ->new_display('page', 'Page', 'page');
  $handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
  $handler->display->display_options['path'] = 'pm/timetrackings';
  $handler->display->display_options['menu']['type'] = 'normal';
  $handler->display->display_options['menu']['title'] = 'Timetrackings';
  $views[$view->name] = $view;
  return $views;
}