You are here

function _spaces_casetracker_views_cases_projects in Spaces 5.2

Same name and namespace in other branches
  1. 5 spaces_casetracker/spaces_casetracker.module \_spaces_casetracker_views_cases_projects()
1 string reference to '_spaces_casetracker_views_cases_projects'
spaces_casetracker_views_default_views in spaces_casetracker/spaces_casetracker.module
Implementation of hook_default_views

File

spaces_casetracker/spaces_casetracker.module, line 1150

Code

function _spaces_casetracker_views_cases_projects() {
  $view = new stdClass();
  $view->name = 'spaces_cases_projects';
  $view->description = t('A listing of all projects.');
  $view->access = array();
  $view->view_args_php = '';
  $view->menu = TRUE;
  $view->menu_title = t('Projects');
  $view->page = TRUE;
  $view->page_title = t('Projects');
  $view->page_empty = '<?php print _spaces_views_empty("casetracker"); ?>';
  $view->page_empty_format = '2';
  $view->page_type = 'table';
  $view->url = 'cases/projects';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '99';
  $view->argument = array();
  $view->sort = array(
    array(
      'tablename' => 'node',
      'field' => 'title',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->field = array(
    array(
      'tablename' => 'node',
      'field' => 'title',
      'label' => 'Project',
      'handler' => 'views_handler_field_nodelink',
      'options' => 'link',
    ),
    array(
      'tablename' => 'node',
      'field' => 'created',
      'label' => '',
      'handler' => 'views_handler_field_date_custom',
      'options' => 'F j, Y',
    ),
    array(
      'tablename' => 'casetracker_case_node',
      'field' => 'nid',
      'label' => '',
    ),
  );
  $view->filter = array(
    array(
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array(
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array(
        0 => 'casetracker_basic_project',
      ),
    ),
    array(
      'tablename' => 'spaces',
      'field' => 'type',
      'operator' => 'all',
      'options' => '',
      'value' => 'all',
    ),
  );
  $view->exposed_filter = array();
  $view->requires = array(
    node,
    casetracker_case_node,
  );
  return $view;
}