You are here

function _spaces_casetracker_views_cases_byproject in Spaces 5.2

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

File

spaces_casetracker/spaces_casetracker.module, line 859

Code

function _spaces_casetracker_views_cases_byproject() {
  $view = _spaces_casetracker_views_base();
  $view->name = 'spaces_cases_byproject';
  $view->description = t('Filter cases by project.');
  $view->menu = TRUE;
  $view->menu_title = t('Cases by project');
  $view->page = TRUE;
  $view->page_title = 'Cases by project';
  $view->url = 'cases/by-project';
  $view->sort = array(
    array(
      'tablename' => 'casetracker_case',
      'field' => 'case_status_id',
      'sortorder' => 'ASC',
      'options' => 'normal',
    ),
  );
  $view->filter['project'] = array(
    'tablename' => 'casetracker_project',
    'field' => 'project_number',
    'operator' => 'OR',
    'options' => '',
    'value' => array(
      0 => '100',
    ),
  );
  $view->exposed_filter = array(
    array(
      'tablename' => 'casetracker_project',
      'field' => 'project_number',
      'label' => 'Project',
      'optional' => '0',
      'is_default' => '1',
      'operator' => '1',
      'single' => '1',
    ),
  );
  $view->requires = array(
    node,
    casetracker_case,
    casetracker_project,
  );
  return $view;
}