tripal_featuremap.views_default.inc 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <?php
  2. /**
  3. * @file
  4. * Default feature map views
  5. */
  6. /**
  7. * Implements hook_views_default_views().
  8. *
  9. * @ingroup tripal_featuremap
  10. */
  11. function tripal_featuremap_views_default_views() {
  12. $views = array();
  13. $view = tripal_featuremap_defaultview_admin_featuremaps();
  14. $view = tripal_views_make_view_compatible_with_external($view);
  15. $views[$view->name] = $view;
  16. return $views;
  17. }
  18. /**
  19. * Describes the default featuremap admin view
  20. *
  21. * @ingroup tripal_featuremap
  22. */
  23. function tripal_featuremap_defaultview_admin_featuremaps() {
  24. $view = new view();
  25. $view->name = 'tripal_featuremap_admin_featuremaps';
  26. $view->description = 'DO NOT DISABLE';
  27. $view->tag = 'tripal admin';
  28. $view->base_table = 'featuremap';
  29. $view->human_name = 'Feature Map Admin';
  30. $view->core = 6;
  31. $view->api_version = '3.0';
  32. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  33. /* Display: Defaults */
  34. $handler = $view->new_display('default', 'Defaults', 'default');
  35. $handler->display->display_options['title'] = 'Maps';
  36. $handler->display->display_options['use_more_always'] = FALSE;
  37. $handler->display->display_options['access']['type'] = 'perm';
  38. $handler->display->display_options['access']['perm'] = 'access chado_featuremap content';
  39. $handler->display->display_options['cache']['type'] = 'none';
  40. $handler->display->display_options['query']['type'] = 'views_query';
  41. $handler->display->display_options['exposed_form']['type'] = 'basic';
  42. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Filter';
  43. $handler->display->display_options['pager']['type'] = 'full';
  44. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  45. $handler->display->display_options['pager']['options']['offset'] = '0';
  46. $handler->display->display_options['pager']['options']['id'] = '0';
  47. $handler->display->display_options['pager']['options']['quantity'] = '9';
  48. $handler->display->display_options['style_plugin'] = 'table';
  49. $handler->display->display_options['style_options']['grouping'] = '';
  50. $handler->display->display_options['style_options']['columns'] = array(
  51. 'name' => 'name',
  52. 'description' => 'description',
  53. 'name_1' => 'name_1',
  54. 'nid' => 'nid',
  55. );
  56. $handler->display->display_options['style_options']['default'] = '-1';
  57. $handler->display->display_options['style_options']['info'] = array(
  58. 'name' => array(
  59. 'sortable' => 1,
  60. 'separator' => '',
  61. ),
  62. 'description' => array(
  63. 'sortable' => 1,
  64. 'separator' => '',
  65. ),
  66. 'name_1' => array(
  67. 'sortable' => 1,
  68. 'separator' => '',
  69. ),
  70. 'nid' => array(
  71. 'separator' => '',
  72. ),
  73. );
  74. /* Header: Global: Action Links */
  75. $handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
  76. $handler->display->display_options['header']['action_links_area']['table'] = 'views';
  77. $handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
  78. $handler->display->display_options['header']['action_links_area']['label'] = 'Action Links';
  79. $handler->display->display_options['header']['action_links_area']['empty'] = TRUE;
  80. $handler->display->display_options['header']['action_links_area']['link-1'] = array(
  81. 'label-1' => 'Add Map',
  82. 'path-1' => 'node/add/tripal-featuremap',
  83. );
  84. $handler->display->display_options['header']['action_links_area']['link-2'] = array(
  85. 'label-2' => '',
  86. 'path-2' => '',
  87. );
  88. $handler->display->display_options['header']['action_links_area']['link-3'] = array(
  89. 'label-3' => '',
  90. 'path-3' => '',
  91. );
  92. $handler->display->display_options['header']['action_links_area']['link-4'] = array(
  93. 'label-4' => '',
  94. 'path-4' => '',
  95. );
  96. /* No results behavior: Global: Text area */
  97. $handler->display->display_options['empty']['text']['id'] = 'area';
  98. $handler->display->display_options['empty']['text']['table'] = 'views';
  99. $handler->display->display_options['empty']['text']['field'] = 'area';
  100. $handler->display->display_options['empty']['text']['content'] = 'No feature maps match the current criteria.';
  101. $handler->display->display_options['empty']['text']['format'] = '1';
  102. /* Relationship: Featuremap: Featuremap => Node */
  103. $handler->display->display_options['relationships']['featuremap_id']['id'] = 'featuremap_id';
  104. $handler->display->display_options['relationships']['featuremap_id']['table'] = 'chado_featuremap';
  105. $handler->display->display_options['relationships']['featuremap_id']['field'] = 'featuremap_id';
  106. /* Field: Content: Nid */
  107. $handler->display->display_options['fields']['nid']['id'] = 'nid';
  108. $handler->display->display_options['fields']['nid']['table'] = 'node';
  109. $handler->display->display_options['fields']['nid']['field'] = 'nid';
  110. $handler->display->display_options['fields']['nid']['relationship'] = 'featuremap_id';
  111. $handler->display->display_options['fields']['nid']['exclude'] = TRUE;
  112. /* Field: Chado Featuremap: Name */
  113. $handler->display->display_options['fields']['name']['id'] = 'name';
  114. $handler->display->display_options['fields']['name']['table'] = 'featuremap';
  115. $handler->display->display_options['fields']['name']['field'] = 'name';
  116. $handler->display->display_options['fields']['name']['alter']['path'] = 'node/[nid]';
  117. /* Field: Chado Featuremap: Description */
  118. $handler->display->display_options['fields']['description']['id'] = 'description';
  119. $handler->display->display_options['fields']['description']['table'] = 'featuremap';
  120. $handler->display->display_options['fields']['description']['field'] = 'description';
  121. /* Field: Chado Cvterm: Name */
  122. $handler->display->display_options['fields']['name_1']['id'] = 'name_1';
  123. $handler->display->display_options['fields']['name_1']['table'] = 'cvterm';
  124. $handler->display->display_options['fields']['name_1']['field'] = 'name';
  125. $handler->display->display_options['fields']['name_1']['label'] = 'Map Units';
  126. /* Field: Content: Delete link */
  127. $handler->display->display_options['fields']['delete_node']['id'] = 'delete_node';
  128. $handler->display->display_options['fields']['delete_node']['table'] = 'views_entity_node';
  129. $handler->display->display_options['fields']['delete_node']['field'] = 'delete_node';
  130. $handler->display->display_options['fields']['delete_node']['relationship'] = 'featuremap_id';
  131. $handler->display->display_options['fields']['delete_node']['exclude'] = TRUE;
  132. /* Field: Content: Edit link */
  133. $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
  134. $handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
  135. $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
  136. $handler->display->display_options['fields']['edit_node']['relationship'] = 'featuremap_id';
  137. $handler->display->display_options['fields']['edit_node']['exclude'] = TRUE;
  138. /* Field: Global: Custom text */
  139. $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
  140. $handler->display->display_options['fields']['nothing']['table'] = 'views';
  141. $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
  142. $handler->display->display_options['fields']['nothing']['label'] = '';
  143. $handler->display->display_options['fields']['nothing']['alter']['text'] = '[edit_node] [delete_node]';
  144. $handler->display->display_options['fields']['nothing']['element_label_colon'] = FALSE;
  145. /* Sort criterion: Chado Featuremap: Name */
  146. $handler->display->display_options['sorts']['name']['id'] = 'name';
  147. $handler->display->display_options['sorts']['name']['table'] = 'featuremap';
  148. $handler->display->display_options['sorts']['name']['field'] = 'name';
  149. /* Filter criterion: Chado Featuremap: Name */
  150. $handler->display->display_options['filters']['name_1']['id'] = 'name_1';
  151. $handler->display->display_options['filters']['name_1']['table'] = 'featuremap';
  152. $handler->display->display_options['filters']['name_1']['field'] = 'name';
  153. $handler->display->display_options['filters']['name_1']['operator'] = 'contains';
  154. $handler->display->display_options['filters']['name_1']['group'] = '0';
  155. $handler->display->display_options['filters']['name_1']['exposed'] = TRUE;
  156. $handler->display->display_options['filters']['name_1']['expose']['operator_id'] = 'name_1_op';
  157. $handler->display->display_options['filters']['name_1']['expose']['label'] = 'Name Contains';
  158. $handler->display->display_options['filters']['name_1']['expose']['operator'] = 'name_1_op';
  159. $handler->display->display_options['filters']['name_1']['expose']['identifier'] = 'name_1';
  160. $handler->display->display_options['filters']['name_1']['expose']['remember_roles'] = array(
  161. 2 => '2',
  162. 1 => 0,
  163. 3 => 0,
  164. );
  165. /* Filter criterion: Chado Featuremap: Description */
  166. $handler->display->display_options['filters']['description']['id'] = 'description';
  167. $handler->display->display_options['filters']['description']['table'] = 'featuremap';
  168. $handler->display->display_options['filters']['description']['field'] = 'description';
  169. $handler->display->display_options['filters']['description']['operator'] = 'contains';
  170. $handler->display->display_options['filters']['description']['group'] = '0';
  171. $handler->display->display_options['filters']['description']['exposed'] = TRUE;
  172. $handler->display->display_options['filters']['description']['expose']['operator_id'] = 'description_op';
  173. $handler->display->display_options['filters']['description']['expose']['label'] = 'Description Contains';
  174. $handler->display->display_options['filters']['description']['expose']['operator'] = 'description_op';
  175. $handler->display->display_options['filters']['description']['expose']['identifier'] = 'description';
  176. $handler->display->display_options['filters']['description']['expose']['remember_roles'] = array(
  177. 2 => '2',
  178. 1 => 0,
  179. 3 => 0,
  180. );
  181. /* Display: Page */
  182. $handler = $view->new_display('page', 'Page', 'page_1');
  183. $handler->display->display_options['path'] = 'admin/tripal/chado/tripal_featuremap/featuremaps';
  184. $handler->display->display_options['menu']['type'] = 'default tab';
  185. $handler->display->display_options['menu']['title'] = 'Maps';
  186. $handler->display->display_options['menu']['description'] = 'A listing of chado feature maps.';
  187. $handler->display->display_options['menu']['weight'] = '-10';
  188. $handler->display->display_options['menu']['context'] = 0;
  189. $handler->display->display_options['menu']['context_only_inline'] = 0;
  190. $handler->display->display_options['tab_options']['weight'] = '0';
  191. return $view;
  192. }