views_test.views_default.inc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <?php
  2. /**
  3. * @file
  4. * Tests views.
  5. */
  6. /**
  7. * Implements hook_views_default_views().
  8. */
  9. function views_test_views_default_views() {
  10. $view = new view();
  11. $view->name = 'test_views_groupby_save';
  12. $view->description = '';
  13. $view->tag = '';
  14. $view->view_php = '';
  15. $view->base_table = 'node';
  16. $view->is_cacheable = FALSE;
  17. $view->api_version = 2;
  18. $view->version = 7;
  19. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  20. /* Display: Master */
  21. $handler = $view->new_display('default', 'Master', 'default');
  22. $handler->display->display_options['access']['type'] = 'none';
  23. $handler->display->display_options['cache']['type'] = 'none';
  24. $handler->display->display_options['exposed_form']['type'] = 'basic';
  25. $handler->display->display_options['pager']['type'] = 'none';
  26. $handler->display->display_options['style_plugin'] = 'default';
  27. $handler->display->display_options['row_plugin'] = 'fields';
  28. $views[$view->name] = $view;
  29. $view = new view();
  30. $view->name = 'test_rename_reset_button';
  31. $view->description = '';
  32. $view->tag = '';
  33. $view->base_table = 'node';
  34. $view->human_name = '';
  35. $view->core = 0;
  36. $view->api_version = '3.0';
  37. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  38. /* Display: Master */
  39. $handler = $view->new_display('default', 'Master', 'default');
  40. $handler->display->display_options['access']['type'] = 'none';
  41. $handler->display->display_options['cache']['type'] = 'none';
  42. $handler->display->display_options['query']['type'] = 'views_query';
  43. $handler->display->display_options['query']['options']['query_comment'] = FALSE;
  44. $handler->display->display_options['exposed_form']['type'] = 'basic';
  45. $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
  46. $handler->display->display_options['pager']['type'] = 'full';
  47. $handler->display->display_options['style_plugin'] = 'default';
  48. $handler->display->display_options['row_plugin'] = 'node';
  49. $handler->display->display_options['row_options']['links'] = 1;
  50. $handler->display->display_options['row_options']['comments'] = 0;
  51. /* Filter criterion: Content: Type */
  52. $handler->display->display_options['filters']['type']['id'] = 'type';
  53. $handler->display->display_options['filters']['type']['table'] = 'node';
  54. $handler->display->display_options['filters']['type']['field'] = 'type';
  55. $handler->display->display_options['filters']['type']['exposed'] = TRUE;
  56. $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
  57. $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type';
  58. $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
  59. $handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
  60. /* Display: Page */
  61. $handler = $view->new_display('page', 'Page', 'page_1');
  62. $handler->display->display_options['path'] = 'test_rename_reset_button';
  63. $views[$view->name] = $view;
  64. $view = new view();
  65. $view->name = 'test_exposed_admin_ui';
  66. $view->description = '';
  67. $view->tag = '';
  68. $view->view_php = '';
  69. $view->base_table = 'node';
  70. $view->is_cacheable = FALSE;
  71. $view->api_version = 2;
  72. $view->version = 7;
  73. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  74. /* Display: Master */
  75. $handler = $view->new_display('default', 'Master', 'default');
  76. $handler->display->display_options['access']['type'] = 'none';
  77. $handler->display->display_options['cache']['type'] = 'none';
  78. $handler->display->display_options['exposed_form']['type'] = 'basic';
  79. $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
  80. $handler->display->display_options['pager']['type'] = 'full';
  81. $handler->display->display_options['style_plugin'] = 'default';
  82. $handler->display->display_options['row_plugin'] = 'node';
  83. $handler->display->display_options['row_options']['links'] = 1;
  84. $handler->display->display_options['row_options']['comments'] = 0;
  85. /* Sort criterion: Content: Post date */
  86. $handler->display->display_options['sorts']['created']['id'] = 'created';
  87. $handler->display->display_options['sorts']['created']['table'] = 'node';
  88. $handler->display->display_options['sorts']['created']['field'] = 'created';
  89. /* Filter: Content: Type */
  90. $handler->display->display_options['filters']['type']['id'] = 'type';
  91. $handler->display->display_options['filters']['type']['table'] = 'node';
  92. $handler->display->display_options['filters']['type']['field'] = 'type';
  93. $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
  94. $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type';
  95. $handler->display->display_options['filters']['type']['expose']['use_operator'] = TRUE;
  96. /* Display: Page */
  97. $handler = $view->new_display('page', 'Page', 'page_1');
  98. $handler->display->display_options['path'] = 'test_exposed_admin_ui';
  99. $views[$view->name] = $view;
  100. $view = new view();
  101. $view->name = 'test_filter_in_operator_ui';
  102. $view->description = '';
  103. $view->tag = '';
  104. $view->view_php = '';
  105. $view->base_table = 'node';
  106. $view->is_cacheable = FALSE;
  107. $view->api_version = 2;
  108. $view->version = 7;
  109. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  110. /* Display: Master */
  111. $handler = $view->new_display('default', 'Master', 'default');
  112. $handler->display->display_options['access']['type'] = 'none';
  113. $handler->display->display_options['cache']['type'] = 'none';
  114. $handler->display->display_options['exposed_form']['type'] = 'basic';
  115. $handler->display->display_options['pager']['type'] = 'full';
  116. $handler->display->display_options['style_plugin'] = 'default';
  117. $handler->display->display_options['row_plugin'] = 'fields';
  118. /* Filter: Content: Type */
  119. $handler->display->display_options['filters']['type']['id'] = 'type';
  120. $handler->display->display_options['filters']['type']['table'] = 'node';
  121. $handler->display->display_options['filters']['type']['field'] = 'type';
  122. $handler->display->display_options['filters']['type']['exposed'] = TRUE;
  123. $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
  124. $handler->display->display_options['filters']['type']['expose']['label'] = 'Content: Type';
  125. $handler->display->display_options['filters']['type']['expose']['use_operator'] = 0;
  126. $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
  127. $handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
  128. $views[$view->name] = $view;
  129. $view = new view();
  130. $view->name = 'test_argument_default_current_user';
  131. $view->description = '';
  132. $view->tag = '';
  133. $view->view_php = '';
  134. $view->base_table = 'node';
  135. $view->is_cacheable = FALSE;
  136. $view->api_version = 3;
  137. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  138. /* Display: Master */
  139. $handler = $view->new_display('default', 'Master', 'default');
  140. $handler->display->display_options['access']['type'] = 'none';
  141. $handler->display->display_options['cache']['type'] = 'none';
  142. $handler->display->display_options['exposed_form']['type'] = 'basic';
  143. $handler->display->display_options['pager']['type'] = 'full';
  144. $handler->display->display_options['pager']['options']['items_per_page'] = '10';
  145. $handler->display->display_options['pager']['options']['offset'] = '0';
  146. $handler->display->display_options['pager']['options']['id'] = '0';
  147. $handler->display->display_options['style_plugin'] = 'default';
  148. $handler->display->display_options['row_plugin'] = 'fields';
  149. /* Field: Content: Title */
  150. $handler->display->display_options['fields']['title']['id'] = 'title';
  151. $handler->display->display_options['fields']['title']['table'] = 'node';
  152. $handler->display->display_options['fields']['title']['field'] = 'title';
  153. $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
  154. $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
  155. $handler->display->display_options['fields']['title']['alter']['trim'] = 0;
  156. $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1;
  157. $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1;
  158. $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
  159. $handler->display->display_options['fields']['title']['alter']['html'] = 0;
  160. $handler->display->display_options['fields']['title']['hide_empty'] = 0;
  161. $handler->display->display_options['fields']['title']['empty_zero'] = 0;
  162. $handler->display->display_options['fields']['title']['link_to_node'] = 0;
  163. /* Contextual filter: Content: Author uid */
  164. $handler->display->display_options['arguments']['uid']['id'] = 'uid';
  165. $handler->display->display_options['arguments']['uid']['table'] = 'node';
  166. $handler->display->display_options['arguments']['uid']['field'] = 'uid';
  167. $handler->display->display_options['arguments']['uid']['default_action'] = 'default';
  168. $views[$view->name] = $view;
  169. $view = new view();
  170. $view->name = 'test_feed_http_headers_caching';
  171. $view->description = '';
  172. $view->tag = '';
  173. $view->base_table = 'node';
  174. $view->core = 7;
  175. $view->api_version = '3.0';
  176. $view->disabled = FALSE;
  177. /* Display: Master */
  178. $handler = $view->new_display('default', 'Master', 'default');
  179. $handler->display->display_options['access']['type'] = 'none';
  180. $handler->display->display_options['cache']['type'] = 'time';
  181. $handler->display->display_options['cache']['results_lifespan'] = '3600';
  182. $handler->display->display_options['cache']['results_lifespan_custom'] = '0';
  183. $handler->display->display_options['cache']['output_lifespan'] = '3600';
  184. $handler->display->display_options['cache']['output_lifespan_custom'] = '0';
  185. $handler->display->display_options['query']['type'] = 'views_query';
  186. $handler->display->display_options['exposed_form']['type'] = 'basic';
  187. $handler->display->display_options['pager']['type'] = 'full';
  188. $handler->display->display_options['style_plugin'] = 'default';
  189. $handler->display->display_options['row_plugin'] = 'node';
  190. /* Display: Feed */
  191. $handler = $view->new_display('feed', 'Feed', 'feed_1');
  192. $handler->display->display_options['pager']['type'] = 'none';
  193. $handler->display->display_options['pager']['options']['offset'] = '0';
  194. $handler->display->display_options['style_plugin'] = 'rss';
  195. $handler->display->display_options['row_plugin'] = 'node_rss';
  196. $handler->display->display_options['path'] = 'test_feed_http_headers_caching';
  197. $views[$view->name] = $view;
  198. $view = new view();
  199. $view->name = 'test_exposed_remember';
  200. $view->description = '';
  201. $view->tag = '';
  202. $view->base_table = 'node';
  203. $view->human_name = 'test_exposed_remember';
  204. $view->core = 0;
  205. $view->api_version = '3.0';
  206. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  207. /* Display: Master */
  208. $handler = $view->new_display('default', 'Master', 'default');
  209. $handler->display->display_options['use_more_always'] = FALSE;
  210. $handler->display->display_options['access']['type'] = 'none';
  211. $handler->display->display_options['cache']['type'] = 'none';
  212. $handler->display->display_options['query']['type'] = 'views_query';
  213. $handler->display->display_options['exposed_form']['type'] = 'basic';
  214. $handler->display->display_options['exposed_form']['options']['reset_button'] = TRUE;
  215. $handler->display->display_options['pager']['type'] = 'none';
  216. $handler->display->display_options['style_plugin'] = 'default';
  217. $handler->display->display_options['row_plugin'] = 'node';
  218. /* Sort criterion: Content: Post date */
  219. $handler->display->display_options['sorts']['created']['id'] = 'created';
  220. $handler->display->display_options['sorts']['created']['table'] = 'node';
  221. $handler->display->display_options['sorts']['created']['field'] = 'created';
  222. /* Filter criterion: Content: Type */
  223. $handler->display->display_options['filters']['type']['id'] = 'type';
  224. $handler->display->display_options['filters']['type']['table'] = 'node';
  225. $handler->display->display_options['filters']['type']['field'] = 'type';
  226. $handler->display->display_options['filters']['type']['exposed'] = TRUE;
  227. $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
  228. $handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
  229. $handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
  230. $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
  231. $handler->display->display_options['filters']['type']['expose']['remember'] = TRUE;
  232. $handler->display->display_options['filters']['type']['expose']['remember_roles'] = array(
  233. 2 => '2',
  234. );
  235. /* Display: Page */
  236. $handler = $view->new_display('page', 'Page', 'page_1');
  237. $handler->display->display_options['path'] = 'test_exposed_remember';
  238. $translatables['test_exposed_remember'] = array(
  239. t('Master'),
  240. t('more'),
  241. t('Apply'),
  242. t('Reset'),
  243. t('Sort by'),
  244. t('Asc'),
  245. t('Desc'),
  246. t('Type'),
  247. t('Page'),
  248. );
  249. $views[$view->name] = $view;
  250. $view = new view();
  251. $view->name = 'test_ajax_view';
  252. $view->description = '';
  253. $view->tag = '';
  254. $view->base_table = 'node';
  255. $view->human_name = '';
  256. $view->core = 0;
  257. $view->api_version = '3.0';
  258. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  259. /* Display: Master */
  260. $handler = $view->new_display('default', 'Master', 'default');
  261. $handler->display->display_options['use_ajax'] = TRUE;
  262. $handler->display->display_options['use_more_always'] = FALSE;
  263. $handler->display->display_options['access']['type'] = 'none';
  264. $handler->display->display_options['cache']['type'] = 'none';
  265. $handler->display->display_options['query']['type'] = 'views_query';
  266. $handler->display->display_options['exposed_form']['type'] = 'basic';
  267. $handler->display->display_options['pager']['type'] = 'none';
  268. $handler->display->display_options['style_plugin'] = 'default';
  269. $handler->display->display_options['row_plugin'] = 'node';
  270. /* Display: Page */
  271. $handler = $view->new_display('page', 'Page', 'page_1');
  272. $handler->display->display_options['path'] = 'test_ajax_view';
  273. $views[$view->name] = $view;
  274. $view = new view();
  275. $view->name = 'test_noajax_view';
  276. $view->description = '';
  277. $view->tag = '';
  278. $view->base_table = 'node';
  279. $view->human_name = '';
  280. $view->core = 0;
  281. $view->api_version = '3.0';
  282. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  283. /* Display: Master */
  284. $handler = $view->new_display('default', 'Master', 'default');
  285. $handler->display->display_options['use_ajax'] = FALSE;
  286. $handler->display->display_options['use_more_always'] = FALSE;
  287. $handler->display->display_options['access']['type'] = 'none';
  288. $handler->display->display_options['cache']['type'] = 'none';
  289. $handler->display->display_options['query']['type'] = 'views_query';
  290. $handler->display->display_options['exposed_form']['type'] = 'basic';
  291. $handler->display->display_options['pager']['type'] = 'none';
  292. $handler->display->display_options['style_plugin'] = 'default';
  293. $handler->display->display_options['row_plugin'] = 'node';
  294. $views[$view->name] = $view;
  295. return $views;
  296. }