123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- <?php
- /**
- * @file
- * Tests views.
- */
- /**
- * Implements hook_views_default_views().
- */
- function views_test_views_default_views() {
- $view = new view();
- $view->name = 'test_views_groupby_save';
- $view->description = '';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'node';
- $view->is_cacheable = FALSE;
- $view->api_version = 2;
- $view->version = 7;
- $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['access']['type'] = 'none';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'none';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'fields';
- $views[$view->name] = $view;
- $view = new view();
- $view->name = 'test_rename_reset_button';
- $view->description = '';
- $view->tag = '';
- $view->base_table = 'node';
- $view->human_name = '';
- $view->core = 0;
- $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['access']['type'] = 'none';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['query']['type'] = 'views_query';
- $handler->display->display_options['query']['options']['query_comment'] = FALSE;
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
- $handler->display->display_options['pager']['type'] = 'full';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'node';
- $handler->display->display_options['row_options']['links'] = 1;
- $handler->display->display_options['row_options']['comments'] = 0;
- /* 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']['exposed'] = TRUE;
- $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
- $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type';
- $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
- $handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
- /* Display: Page */
- $handler = $view->new_display('page', 'Page', 'page_1');
- $handler->display->display_options['path'] = 'test_rename_reset_button';
- $views[$view->name] = $view;
- $view = new view();
- $view->name = 'test_exposed_admin_ui';
- $view->description = '';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'node';
- $view->is_cacheable = FALSE;
- $view->api_version = 2;
- $view->version = 7;
- $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['access']['type'] = 'none';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
- $handler->display->display_options['pager']['type'] = 'full';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'node';
- $handler->display->display_options['row_options']['links'] = 1;
- $handler->display->display_options['row_options']['comments'] = 0;
- /* 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';
- /* Filter: 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']['expose']['operator_id'] = 'type_op';
- $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type';
- $handler->display->display_options['filters']['type']['expose']['use_operator'] = TRUE;
- /* Display: Page */
- $handler = $view->new_display('page', 'Page', 'page_1');
- $handler->display->display_options['path'] = 'test_exposed_admin_ui';
- $views[$view->name] = $view;
- $view = new view();
- $view->name = 'test_filter_in_operator_ui';
- $view->description = '';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'node';
- $view->is_cacheable = FALSE;
- $view->api_version = 2;
- $view->version = 7;
- $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['access']['type'] = 'none';
- $handler->display->display_options['cache']['type'] = 'none';
- $handler->display->display_options['exposed_form']['type'] = 'basic';
- $handler->display->display_options['pager']['type'] = 'full';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'fields';
- /* Filter: 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']['exposed'] = TRUE;
- $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
- $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type';
- $handler->display->display_options['filters']['type']['expose']['use_operator'] = 0;
- $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
- $handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
- $views[$view->name] = $view;
- $view = new view();
- $view->name = 'test_argument_default_current_user';
- $view->description = '';
- $view->tag = '';
- $view->view_php = '';
- $view->base_table = 'node';
- $view->is_cacheable = FALSE;
- $view->api_version = 3;
- $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['access']['type'] = 'none';
- $handler->display->display_options['cache']['type'] = 'none';
- $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['pager']['options']['offset'] = '0';
- $handler->display->display_options['pager']['options']['id'] = '0';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'fields';
- /* 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']['alter']['alter_text'] = 0;
- $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
- $handler->display->display_options['fields']['title']['alter']['trim'] = 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']['html'] = 0;
- $handler->display->display_options['fields']['title']['hide_empty'] = 0;
- $handler->display->display_options['fields']['title']['empty_zero'] = 0;
- $handler->display->display_options['fields']['title']['link_to_node'] = 0;
- /* Contextual filter: Content: Author uid */
- $handler->display->display_options['arguments']['uid']['id'] = 'uid';
- $handler->display->display_options['arguments']['uid']['table'] = 'node';
- $handler->display->display_options['arguments']['uid']['field'] = 'uid';
- $handler->display->display_options['arguments']['uid']['default_action'] = 'default';
- $views[$view->name] = $view;
- $view = new view();
- $view->name = 'test_feed_http_headers_caching';
- $view->description = '';
- $view->tag = '';
- $view->base_table = 'node';
- $view->core = 7;
- $view->api_version = '3.0';
- $view->disabled = FALSE;
- /* Display: Master */
- $handler = $view->new_display('default', 'Master', 'default');
- $handler->display->display_options['access']['type'] = 'none';
- $handler->display->display_options['cache']['type'] = 'time';
- $handler->display->display_options['cache']['results_lifespan'] = '3600';
- $handler->display->display_options['cache']['results_lifespan_custom'] = '0';
- $handler->display->display_options['cache']['output_lifespan'] = '3600';
- $handler->display->display_options['cache']['output_lifespan_custom'] = '0';
- $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['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'node';
- /* Display: Feed */
- $handler = $view->new_display('feed', 'Feed', 'feed_1');
- $handler->display->display_options['pager']['type'] = 'none';
- $handler->display->display_options['pager']['options']['offset'] = '0';
- $handler->display->display_options['style_plugin'] = 'rss';
- $handler->display->display_options['row_plugin'] = 'node_rss';
- $handler->display->display_options['path'] = 'test_feed_http_headers_caching';
- $views[$view->name] = $view;
- $view = new view();
- $view->name = 'test_exposed_remember';
- $view->description = '';
- $view->tag = '';
- $view->base_table = 'node';
- $view->human_name = 'test_exposed_remember';
- $view->core = 0;
- $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['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'none';
- $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['exposed_form']['options']['reset_button'] = TRUE;
- $handler->display->display_options['pager']['type'] = 'none';
- $handler->display->display_options['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = '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';
- /* 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']['exposed'] = TRUE;
- $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
- $handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
- $handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
- $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
- $handler->display->display_options['filters']['type']['expose']['remember'] = TRUE;
- $handler->display->display_options['filters']['type']['expose']['remember_roles'] = array(
- 2 => '2',
- );
- /* Display: Page */
- $handler = $view->new_display('page', 'Page', 'page_1');
- $handler->display->display_options['path'] = 'test_exposed_remember';
- $translatables['test_exposed_remember'] = array(
- t('Master'),
- t('more'),
- t('Apply'),
- t('Reset'),
- t('Sort by'),
- t('Asc'),
- t('Desc'),
- t('Type'),
- t('Page'),
- );
- $views[$view->name] = $view;
- $view = new view();
- $view->name = 'test_ajax_view';
- $view->description = '';
- $view->tag = '';
- $view->base_table = 'node';
- $view->human_name = '';
- $view->core = 0;
- $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['use_ajax'] = TRUE;
- $handler->display->display_options['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'none';
- $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['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'node';
- /* Display: Page */
- $handler = $view->new_display('page', 'Page', 'page_1');
- $handler->display->display_options['path'] = 'test_ajax_view';
- $views[$view->name] = $view;
- $view = new view();
- $view->name = 'test_noajax_view';
- $view->description = '';
- $view->tag = '';
- $view->base_table = 'node';
- $view->human_name = '';
- $view->core = 0;
- $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['use_ajax'] = FALSE;
- $handler->display->display_options['use_more_always'] = FALSE;
- $handler->display->display_options['access']['type'] = 'none';
- $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['style_plugin'] = 'default';
- $handler->display->display_options['row_plugin'] = 'node';
- $views[$view->name] = $view;
- return $views;
- }
|