function hosting_client_views_default_views in Hosting 6.2
Same name and namespace in other branches
- 7.4 client/includes/views/hosting_client.views_default.inc \hosting_client_views_default_views()
- 7.3 client/includes/views/hosting_client.views_default.inc \hosting_client_views_default_views()
Implementation of hook_views_default_views().
File
- client/
hosting_client.views_default.inc, line 10 - Provide a default view listing clients
Code
function hosting_client_views_default_views() {
$views = array();
// Exported view: hosting_site_list
$view = new view();
$view->name = 'hosting_client_list';
$view->description = 'Display a list of clients in Aegir';
$view->tag = '';
$view->base_table = 'node';
$view->human_name = 'List of Hosting clients';
$view->core = 6;
$view->api_version = '3.0';
$view->disabled = FALSE;
/* Edit this to true to make a default view disabled initially */
/* Display: Defaults */
$handler = $view
->new_display('default', 'Defaults', 'default');
$handler->display->display_options['title'] = 'Clients';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'view client';
$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'] = 'none';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
'title' => 'title',
'uname' => 'uname',
'created' => 'created',
);
$handler->display->display_options['style_options']['default'] = 'title';
$handler->display->display_options['style_options']['info'] = array(
'title' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'uname' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'created' => array(
'sortable' => 1,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
);
$handler->display->display_options['style_options']['override'] = 1;
$handler->display->display_options['style_options']['sticky'] = 0;
$handler->display->display_options['style_options']['empty_table'] = 0;
/* Field: Node: 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'] = 'Client name';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['external'] = 0;
$handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['element_label_colon'] = 0;
$handler->display->display_options['fields']['title']['element_default_classes'] = 1;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Field: Hosting Client: Internal name */
$handler->display->display_options['fields']['uname']['id'] = 'uname';
$handler->display->display_options['fields']['uname']['table'] = 'hosting_client';
$handler->display->display_options['fields']['uname']['field'] = 'uname';
$handler->display->display_options['fields']['uname']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['uname']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['uname']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['uname']['alter']['external'] = 0;
$handler->display->display_options['fields']['uname']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['uname']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['uname']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['uname']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['uname']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['uname']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['uname']['alter']['trim'] = 0;
$handler->display->display_options['fields']['uname']['alter']['html'] = 0;
$handler->display->display_options['fields']['uname']['element_label_colon'] = 1;
$handler->display->display_options['fields']['uname']['element_default_classes'] = 1;
$handler->display->display_options['fields']['uname']['hide_empty'] = 0;
$handler->display->display_options['fields']['uname']['empty_zero'] = 0;
$handler->display->display_options['fields']['uname']['hide_alter_empty'] = 1;
/* Field: Node: Post date */
$handler->display->display_options['fields']['created']['id'] = 'created';
$handler->display->display_options['fields']['created']['table'] = 'node';
$handler->display->display_options['fields']['created']['field'] = 'created';
$handler->display->display_options['fields']['created']['label'] = 'Client added date';
$handler->display->display_options['fields']['created']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['created']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['created']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['created']['alter']['external'] = 0;
$handler->display->display_options['fields']['created']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['created']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['created']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['created']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['created']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim'] = 0;
$handler->display->display_options['fields']['created']['alter']['html'] = 0;
$handler->display->display_options['fields']['created']['element_label_colon'] = 1;
$handler->display->display_options['fields']['created']['element_default_classes'] = 1;
$handler->display->display_options['fields']['created']['hide_empty'] = 0;
$handler->display->display_options['fields']['created']['empty_zero'] = 0;
$handler->display->display_options['fields']['created']['hide_alter_empty'] = 1;
/* Filter: Node: 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(
'client' => 'client',
);
/* Filter: Node: 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';
/* Display: Page */
$handler = $view
->new_display('page', 'Page', 'page_clients');
$handler->display->display_options['path'] = 'hosting/clients';
$handler->display->display_options['menu']['type'] = 'normal';
$handler->display->display_options['menu']['title'] = 'Clients';
$handler->display->display_options['menu']['description'] = 'List of clients';
$handler->display->display_options['menu']['weight'] = '0';
$handler->display->display_options['menu']['name'] = 'primary-links';
$views[$view->name] = $view;
return $views;
}