pmexpense.views_default.inc in Drupal PM (Project Management) 7
Same filename and directory in other branches
Defines default views for the PM Expense module.
File
pmexpense/pmexpense.views_default.incView source
<?php
/**
* @file
* Defines default views for the PM Expense module.
*/
/**
* Implements hook_views_default_views().
*/
function pmexpense_views_default_views() {
$views = array();
$view = new view();
$view->name = 'pmexpenses_list';
$view->description = '';
$view->tag = 'pm';
$view->base_table = 'node';
$view->human_name = 'PM Expense';
$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'] = 'Expenses';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'Project Management expense: 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_1' => 'title_1',
'title_2' => 'title_2',
'title' => 'title',
'expensedate' => 'expensedate',
'amount' => 'amount',
'edit_node' => 'edit_node',
'delete_node' => 'edit_node',
);
$handler->display->display_options['style_options']['default'] = 'expensedate';
$handler->display->display_options['style_options']['info'] = array(
'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,
),
'title' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'expensedate' => array(
'sortable' => 1,
'default_sort_order' => 'desc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'amount' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
'empty_column' => 0,
),
'edit_node' => array(
'align' => '',
'separator' => ' ',
'empty_column' => 1,
),
'delete_node' => array(
'align' => '',
'separator' => '',
'empty_column' => 1,
),
);
/* Relationship: Project Management Expense: Organization */
$handler->display->display_options['relationships']['organization_nid']['id'] = 'organization_nid';
$handler->display->display_options['relationships']['organization_nid']['table'] = 'pmexpense';
$handler->display->display_options['relationships']['organization_nid']['field'] = 'organization_nid';
/* Relationship: Project Management Expense: Project */
$handler->display->display_options['relationships']['project_nid']['id'] = 'project_nid';
$handler->display->display_options['relationships']['project_nid']['table'] = 'pmexpense';
$handler->display->display_options['relationships']['project_nid']['field'] = 'project_nid';
/* Relationship: Project Management Expense: Task */
$handler->display->display_options['relationships']['task_nid']['id'] = 'task_nid';
$handler->display->display_options['relationships']['task_nid']['table'] = 'pmexpense';
$handler->display->display_options['relationships']['task_nid']['field'] = 'task_nid';
/* Relationship: Project Management Expense: Ticket */
$handler->display->display_options['relationships']['ticket_nid']['id'] = 'ticket_nid';
$handler->display->display_options['relationships']['ticket_nid']['table'] = 'pmexpense';
$handler->display->display_options['relationships']['ticket_nid']['field'] = 'ticket_nid';
/* 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'] = 'organization_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'] = 'project_nid';
$handler->display->display_options['fields']['title_2']['label'] = 'Project';
/* 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'] = 'Expense';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
/* Field: Content Expense Date */
$handler->display->display_options['fields']['pmexpense_date']['id'] = 'pmexpense_date';
$handler->display->display_options['fields']['pmexpense_date']['table'] = 'field_data_pmexpense_date';
$handler->display->display_options['fields']['pmexpense_date']['field'] = 'pmexpense_date';
$handler->display->display_options['fields']['pmexpense_date']['settings'] = array(
'format_type' => 'medium',
'fromto' => 'both',
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
);
'short';
/* Field: Project Management Expense: Amount */
$handler->display->display_options['fields']['amount']['id'] = 'amount';
$handler->display->display_options['fields']['amount']['table'] = 'pmexpense';
$handler->display->display_options['fields']['amount']['field'] = 'amount';
/* Field: Content: Edit link */
$handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
$handler->display->display_options['fields']['edit_node']['label'] = 'Operations';
/* Field: Content: Delete link */
$handler->display->display_options['fields']['delete_node']['id'] = 'delete_node';
$handler->display->display_options['fields']['delete_node']['table'] = 'views_entity_node';
$handler->display->display_options['fields']['delete_node']['field'] = 'delete_node';
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* 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(
'pmexpense' => 'pmexpense',
);
$handler->display->display_options['filters']['type']['group'] = 1;
/* 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'] = 'organization_nid';
$handler->display->display_options['filters']['title_1']['operator'] = 'contains';
$handler->display->display_options['filters']['title_1']['group'] = 1;
$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,
3 => 0,
);
/* 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'] = 'Expense';
$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,
);
/* Filter criterion: Project Management Expense: Provider */
$handler->display->display_options['filters']['provider_title']['id'] = 'provider_title';
$handler->display->display_options['filters']['provider_title']['table'] = 'pmexpense';
$handler->display->display_options['filters']['provider_title']['field'] = 'provider_title';
$handler->display->display_options['filters']['provider_title']['operator'] = 'contains';
$handler->display->display_options['filters']['provider_title']['group'] = 1;
$handler->display->display_options['filters']['provider_title']['exposed'] = TRUE;
$handler->display->display_options['filters']['provider_title']['expose']['operator_id'] = 'provider_title_op';
$handler->display->display_options['filters']['provider_title']['expose']['label'] = 'Provider';
$handler->display->display_options['filters']['provider_title']['expose']['operator'] = 'provider_title_op';
$handler->display->display_options['filters']['provider_title']['expose']['identifier'] = 'provider_title';
$handler->display->display_options['filters']['provider_title']['expose']['remember_roles'] = array(
2 => '2',
1 => 0,
3 => 0,
);
/* Display: Page */
$handler = $view
->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'pm/expenses';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Expenses';
$views[$view->name] = $view;
return $views;
}
Functions
Name | Description |
---|---|
pmexpense_views_default_views | Implements hook_views_default_views(). |