content_menu.views.inc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. <?php
  2. /**
  3. * @file
  4. * Views-related stuff for Content Menu module.
  5. */
  6. /**
  7. * Implements hook_views_default_views().
  8. */
  9. function content_menu_views_default_views() {
  10. $view = new view();
  11. $view->name = 'menu_existing_content_selection';
  12. $view->description = '';
  13. $view->tag = 'default';
  14. $view->base_table = 'node';
  15. $view->human_name = 'Menu existing content selection';
  16. $view->core = 7;
  17. $view->api_version = '3.0';
  18. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  19. /* Display: Master */
  20. $handler = $view->new_display('default', 'Master', 'default');
  21. $handler->display->display_options['title'] = 'Select existing content';
  22. $handler->display->display_options['use_ajax'] = TRUE;
  23. $handler->display->display_options['access']['type'] = 'perm';
  24. $handler->display->display_options['access']['perm'] = 'administer menu';
  25. $handler->display->display_options['cache']['type'] = 'none';
  26. $handler->display->display_options['query']['type'] = 'views_query';
  27. $handler->display->display_options['query']['options']['query_comment'] = FALSE;
  28. $handler->display->display_options['exposed_form']['type'] = 'basic';
  29. $handler->display->display_options['pager']['type'] = 'full';
  30. $handler->display->display_options['pager']['options']['items_per_page'] = '10';
  31. $handler->display->display_options['style_plugin'] = 'table';
  32. $handler->display->display_options['style_options']['columns'] = array(
  33. 'title' => 'title',
  34. 'name' => 'name',
  35. 'created' => 'created',
  36. 'type' => 'type',
  37. 'nid' => 'nid',
  38. );
  39. $handler->display->display_options['style_options']['default'] = 'title';
  40. $handler->display->display_options['style_options']['info'] = array(
  41. 'title' => array(
  42. 'sortable' => 1,
  43. 'default_sort_order' => 'asc',
  44. 'align' => '',
  45. 'separator' => '',
  46. 'empty_column' => 0,
  47. ),
  48. 'name' => array(
  49. 'sortable' => 1,
  50. 'default_sort_order' => 'asc',
  51. 'align' => '',
  52. 'separator' => '',
  53. 'empty_column' => 0,
  54. ),
  55. 'created' => array(
  56. 'sortable' => 1,
  57. 'default_sort_order' => 'asc',
  58. 'align' => '',
  59. 'separator' => '',
  60. 'empty_column' => 0,
  61. ),
  62. 'type' => array(
  63. 'sortable' => 1,
  64. 'default_sort_order' => 'asc',
  65. 'align' => '',
  66. 'separator' => '',
  67. 'empty_column' => 0,
  68. ),
  69. 'nid' => array(
  70. 'sortable' => 0,
  71. 'default_sort_order' => 'asc',
  72. 'align' => '',
  73. 'separator' => '',
  74. 'empty_column' => 0,
  75. ),
  76. );
  77. $handler->display->display_options['style_options']['override'] = 1;
  78. $handler->display->display_options['style_options']['sticky'] = 0;
  79. $handler->display->display_options['style_options']['empty_table'] = 0;
  80. /* No results behavior: Global: Text area */
  81. $handler->display->display_options['empty']['area']['id'] = 'area';
  82. $handler->display->display_options['empty']['area']['table'] = 'views';
  83. $handler->display->display_options['empty']['area']['field'] = 'area';
  84. $handler->display->display_options['empty']['area']['empty'] = FALSE;
  85. $handler->display->display_options['empty']['area']['content'] = 'There is no content available that matches your selection criteria';
  86. $handler->display->display_options['empty']['area']['format'] = 'plain_text';
  87. $handler->display->display_options['empty']['area']['tokenize'] = 0;
  88. /* Relationship: Content: Author */
  89. $handler->display->display_options['relationships']['uid']['id'] = 'uid';
  90. $handler->display->display_options['relationships']['uid']['table'] = 'node';
  91. $handler->display->display_options['relationships']['uid']['field'] = 'uid';
  92. $handler->display->display_options['relationships']['uid']['required'] = 0;
  93. /* Field: Content: Nid */
  94. $handler->display->display_options['fields']['nid']['id'] = 'nid';
  95. $handler->display->display_options['fields']['nid']['table'] = 'node';
  96. $handler->display->display_options['fields']['nid']['field'] = 'nid';
  97. $handler->display->display_options['fields']['nid']['label'] = '';
  98. $handler->display->display_options['fields']['nid']['alter']['alter_text'] = 1;
  99. $handler->display->display_options['fields']['nid']['alter']['text'] = '<span class="node-selector" data-nid="[nid]">select</span>';
  100. $handler->display->display_options['fields']['nid']['alter']['make_link'] = 1;
  101. $handler->display->display_options['fields']['nid']['alter']['path'] = 'node/[nid]';
  102. $handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
  103. $handler->display->display_options['fields']['nid']['alter']['external'] = 0;
  104. $handler->display->display_options['fields']['nid']['alter']['replace_spaces'] = 0;
  105. $handler->display->display_options['fields']['nid']['alter']['trim_whitespace'] = 0;
  106. $handler->display->display_options['fields']['nid']['alter']['alt'] = 'Select this content';
  107. $handler->display->display_options['fields']['nid']['alter']['link_class'] = 'node-pane-selector';
  108. $handler->display->display_options['fields']['nid']['alter']['nl2br'] = 0;
  109. $handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 1;
  110. $handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 1;
  111. $handler->display->display_options['fields']['nid']['alter']['more_link'] = 0;
  112. $handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
  113. $handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
  114. $handler->display->display_options['fields']['nid']['alter']['html'] = 0;
  115. $handler->display->display_options['fields']['nid']['element_label_colon'] = FALSE;
  116. $handler->display->display_options['fields']['nid']['element_default_classes'] = 0;
  117. $handler->display->display_options['fields']['nid']['hide_empty'] = 0;
  118. $handler->display->display_options['fields']['nid']['empty_zero'] = 0;
  119. $handler->display->display_options['fields']['nid']['hide_alter_empty'] = 0;
  120. $handler->display->display_options['fields']['nid']['link_to_node'] = 0;
  121. /* Field: Content: Link -&gt; */
  122. $handler->display->display_options['fields']['title_1']['id'] = 'title_1';
  123. $handler->display->display_options['fields']['title_1']['table'] = 'node';
  124. $handler->display->display_options['fields']['title_1']['field'] = 'title';
  125. $handler->display->display_options['fields']['title_1']['ui_name'] = 'Content: Link ->';
  126. $handler->display->display_options['fields']['title_1']['label'] = '';
  127. $handler->display->display_options['fields']['title_1']['exclude'] = TRUE;
  128. $handler->display->display_options['fields']['title_1']['alter']['alter_text'] = 1;
  129. $handler->display->display_options['fields']['title_1']['alter']['text'] = 'view &rarr;';
  130. $handler->display->display_options['fields']['title_1']['alter']['make_link'] = 0;
  131. $handler->display->display_options['fields']['title_1']['alter']['absolute'] = 0;
  132. $handler->display->display_options['fields']['title_1']['alter']['external'] = 0;
  133. $handler->display->display_options['fields']['title_1']['alter']['replace_spaces'] = 0;
  134. $handler->display->display_options['fields']['title_1']['alter']['trim_whitespace'] = 0;
  135. $handler->display->display_options['fields']['title_1']['alter']['nl2br'] = 0;
  136. $handler->display->display_options['fields']['title_1']['alter']['word_boundary'] = 1;
  137. $handler->display->display_options['fields']['title_1']['alter']['ellipsis'] = 1;
  138. $handler->display->display_options['fields']['title_1']['alter']['more_link'] = 0;
  139. $handler->display->display_options['fields']['title_1']['alter']['strip_tags'] = 0;
  140. $handler->display->display_options['fields']['title_1']['alter']['trim'] = 0;
  141. $handler->display->display_options['fields']['title_1']['alter']['html'] = 0;
  142. $handler->display->display_options['fields']['title_1']['element_label_colon'] = FALSE;
  143. $handler->display->display_options['fields']['title_1']['element_default_classes'] = 1;
  144. $handler->display->display_options['fields']['title_1']['hide_empty'] = 0;
  145. $handler->display->display_options['fields']['title_1']['empty_zero'] = 0;
  146. $handler->display->display_options['fields']['title_1']['hide_alter_empty'] = 1;
  147. $handler->display->display_options['fields']['title_1']['link_to_node'] = 1;
  148. /* Field: Content: Title */
  149. $handler->display->display_options['fields']['title']['id'] = 'title';
  150. $handler->display->display_options['fields']['title']['table'] = 'node';
  151. $handler->display->display_options['fields']['title']['field'] = 'title';
  152. $handler->display->display_options['fields']['title']['alter']['alter_text'] = 1;
  153. $handler->display->display_options['fields']['title']['alter']['text'] = '[title] [title_1]';
  154. $handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
  155. $handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
  156. $handler->display->display_options['fields']['title']['alter']['external'] = 0;
  157. $handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0;
  158. $handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0;
  159. $handler->display->display_options['fields']['title']['alter']['nl2br'] = 0;
  160. $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
  161. $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
  162. $handler->display->display_options['fields']['title']['alter']['more_link'] = 0;
  163. $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
  164. $handler->display->display_options['fields']['title']['alter']['trim'] = 0;
  165. $handler->display->display_options['fields']['title']['alter']['html'] = 0;
  166. $handler->display->display_options['fields']['title']['element_label_colon'] = 1;
  167. $handler->display->display_options['fields']['title']['element_default_classes'] = 1;
  168. $handler->display->display_options['fields']['title']['hide_empty'] = 0;
  169. $handler->display->display_options['fields']['title']['empty_zero'] = 0;
  170. $handler->display->display_options['fields']['title']['hide_alter_empty'] = 1;
  171. $handler->display->display_options['fields']['title']['link_to_node'] = 0;
  172. /* Field: Content: Type */
  173. $handler->display->display_options['fields']['type']['id'] = 'type';
  174. $handler->display->display_options['fields']['type']['table'] = 'node';
  175. $handler->display->display_options['fields']['type']['field'] = 'type';
  176. $handler->display->display_options['fields']['type']['label'] = 'Content Type';
  177. $handler->display->display_options['fields']['type']['alter']['alter_text'] = 0;
  178. $handler->display->display_options['fields']['type']['alter']['make_link'] = 0;
  179. $handler->display->display_options['fields']['type']['alter']['absolute'] = 0;
  180. $handler->display->display_options['fields']['type']['alter']['external'] = 0;
  181. $handler->display->display_options['fields']['type']['alter']['replace_spaces'] = 0;
  182. $handler->display->display_options['fields']['type']['alter']['trim_whitespace'] = 0;
  183. $handler->display->display_options['fields']['type']['alter']['nl2br'] = 0;
  184. $handler->display->display_options['fields']['type']['alter']['word_boundary'] = 1;
  185. $handler->display->display_options['fields']['type']['alter']['ellipsis'] = 1;
  186. $handler->display->display_options['fields']['type']['alter']['strip_tags'] = 0;
  187. $handler->display->display_options['fields']['type']['alter']['trim'] = 0;
  188. $handler->display->display_options['fields']['type']['alter']['html'] = 0;
  189. $handler->display->display_options['fields']['type']['element_label_colon'] = 1;
  190. $handler->display->display_options['fields']['type']['element_default_classes'] = 1;
  191. $handler->display->display_options['fields']['type']['hide_empty'] = 0;
  192. $handler->display->display_options['fields']['type']['empty_zero'] = 0;
  193. $handler->display->display_options['fields']['type']['hide_alter_empty'] = 1;
  194. $handler->display->display_options['fields']['type']['link_to_node'] = 0;
  195. $handler->display->display_options['fields']['type']['machine_name'] = 0;
  196. /* Field: User: Name */
  197. $handler->display->display_options['fields']['name']['id'] = 'name';
  198. $handler->display->display_options['fields']['name']['table'] = 'users';
  199. $handler->display->display_options['fields']['name']['field'] = 'name';
  200. $handler->display->display_options['fields']['name']['relationship'] = 'uid';
  201. $handler->display->display_options['fields']['name']['label'] = 'Author';
  202. $handler->display->display_options['fields']['name']['alter']['alter_text'] = 0;
  203. $handler->display->display_options['fields']['name']['alter']['make_link'] = 0;
  204. $handler->display->display_options['fields']['name']['alter']['absolute'] = 0;
  205. $handler->display->display_options['fields']['name']['alter']['external'] = 0;
  206. $handler->display->display_options['fields']['name']['alter']['replace_spaces'] = 0;
  207. $handler->display->display_options['fields']['name']['alter']['trim_whitespace'] = 0;
  208. $handler->display->display_options['fields']['name']['alter']['nl2br'] = 0;
  209. $handler->display->display_options['fields']['name']['alter']['word_boundary'] = 1;
  210. $handler->display->display_options['fields']['name']['alter']['ellipsis'] = 1;
  211. $handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0;
  212. $handler->display->display_options['fields']['name']['alter']['trim'] = 0;
  213. $handler->display->display_options['fields']['name']['alter']['html'] = 0;
  214. $handler->display->display_options['fields']['name']['element_label_colon'] = 1;
  215. $handler->display->display_options['fields']['name']['element_default_classes'] = 1;
  216. $handler->display->display_options['fields']['name']['hide_empty'] = 0;
  217. $handler->display->display_options['fields']['name']['empty_zero'] = 0;
  218. $handler->display->display_options['fields']['name']['hide_alter_empty'] = 1;
  219. $handler->display->display_options['fields']['name']['link_to_user'] = 0;
  220. $handler->display->display_options['fields']['name']['overwrite_anonymous'] = 0;
  221. $handler->display->display_options['fields']['name']['format_username'] = 1;
  222. /* Field: Content: Post date */
  223. $handler->display->display_options['fields']['created']['id'] = 'created';
  224. $handler->display->display_options['fields']['created']['table'] = 'node';
  225. $handler->display->display_options['fields']['created']['field'] = 'created';
  226. $handler->display->display_options['fields']['created']['alter']['alter_text'] = 0;
  227. $handler->display->display_options['fields']['created']['alter']['make_link'] = 0;
  228. $handler->display->display_options['fields']['created']['alter']['absolute'] = 0;
  229. $handler->display->display_options['fields']['created']['alter']['external'] = 0;
  230. $handler->display->display_options['fields']['created']['alter']['replace_spaces'] = 0;
  231. $handler->display->display_options['fields']['created']['alter']['trim_whitespace'] = 0;
  232. $handler->display->display_options['fields']['created']['alter']['nl2br'] = 0;
  233. $handler->display->display_options['fields']['created']['alter']['word_boundary'] = 1;
  234. $handler->display->display_options['fields']['created']['alter']['ellipsis'] = 1;
  235. $handler->display->display_options['fields']['created']['alter']['strip_tags'] = 0;
  236. $handler->display->display_options['fields']['created']['alter']['trim'] = 0;
  237. $handler->display->display_options['fields']['created']['alter']['html'] = 0;
  238. $handler->display->display_options['fields']['created']['element_label_colon'] = 1;
  239. $handler->display->display_options['fields']['created']['element_default_classes'] = 1;
  240. $handler->display->display_options['fields']['created']['hide_empty'] = 0;
  241. $handler->display->display_options['fields']['created']['empty_zero'] = 0;
  242. $handler->display->display_options['fields']['created']['hide_alter_empty'] = 1;
  243. $handler->display->display_options['fields']['created']['date_format'] = 'short';
  244. /* Sort criterion: Content: Post date */
  245. $handler->display->display_options['sorts']['created']['id'] = 'created';
  246. $handler->display->display_options['sorts']['created']['table'] = 'node';
  247. $handler->display->display_options['sorts']['created']['field'] = 'created';
  248. $handler->display->display_options['sorts']['created']['order'] = 'DESC';
  249. /* Filter criterion: Content: Published */
  250. $handler->display->display_options['filters']['status']['id'] = 'status';
  251. $handler->display->display_options['filters']['status']['table'] = 'node';
  252. $handler->display->display_options['filters']['status']['field'] = 'status';
  253. $handler->display->display_options['filters']['status']['value'] = 1;
  254. $handler->display->display_options['filters']['status']['group'] = 1;
  255. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  256. /* Filter criterion: Content: Title */
  257. $handler->display->display_options['filters']['title']['id'] = 'title';
  258. $handler->display->display_options['filters']['title']['table'] = 'node';
  259. $handler->display->display_options['filters']['title']['field'] = 'title';
  260. $handler->display->display_options['filters']['title']['operator'] = 'contains';
  261. $handler->display->display_options['filters']['title']['exposed'] = TRUE;
  262. $handler->display->display_options['filters']['title']['expose']['operator_id'] = 'title_op';
  263. $handler->display->display_options['filters']['title']['expose']['label'] = 'Title contains';
  264. $handler->display->display_options['filters']['title']['expose']['operator'] = 'title_op';
  265. $handler->display->display_options['filters']['title']['expose']['identifier'] = 'title';
  266. $handler->display->display_options['filters']['title']['expose']['required'] = 0;
  267. $handler->display->display_options['filters']['title']['expose']['multiple'] = FALSE;
  268. /* Filter criterion: Content: Type */
  269. $handler->display->display_options['filters']['type']['id'] = 'type';
  270. $handler->display->display_options['filters']['type']['table'] = 'node';
  271. $handler->display->display_options['filters']['type']['field'] = 'type';
  272. $handler->display->display_options['filters']['type']['exposed'] = TRUE;
  273. $handler->display->display_options['filters']['type']['expose']['operator_id'] = 'type_op';
  274. $handler->display->display_options['filters']['type']['expose']['label'] = 'Type';
  275. $handler->display->display_options['filters']['type']['expose']['operator'] = 'type_op';
  276. $handler->display->display_options['filters']['type']['expose']['identifier'] = 'type';
  277. $handler->display->display_options['filters']['type']['expose']['reduce'] = 0;
  278. /* Display: Page */
  279. $handler = $view->new_display('page', 'Page', 'page_1');
  280. $handler->display->display_options['path'] = 'admin/structure/menu/manage/add_existing_content';
  281. $views[$view->name] = $view;
  282. return $views;
  283. }