tripal_feature.views_default.inc 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550
  1. <?php
  2. /**
  3. * @file
  4. * Describe default feature views
  5. */
  6. /**
  7. * Implements hook_views_default_views().
  8. *
  9. * @ingroup tripal_legacy_feature
  10. */
  11. function tripal_feature_views_default_views() {
  12. $views = [];
  13. // User View ("Search Biological Content")
  14. // Remember, if you change the name/path of this view, you also want to
  15. // change it's description in tripal_feature_search_biological_data_views()
  16. $view = tripal_feature_defaultvalue_user_features();
  17. $view = tripal_make_view_compatible_with_external($view);
  18. $views[$view->name] = $view;
  19. // Admin view
  20. $view = tripal_feature_defaultview_admin_features();
  21. $view = tripal_make_view_compatible_with_external($view);
  22. $views[$view->name] = $view;
  23. return $views;
  24. }
  25. /**
  26. * Defines the feature user search default view.
  27. *
  28. * @ingroup tripal_legacy_feature
  29. */
  30. function tripal_feature_defaultvalue_user_features() {
  31. $view = new view();
  32. $view->name = 'tripal_feature_user_feature';
  33. $view->description = 'Allows users to search feature data';
  34. $view->tag = 'tripal search';
  35. $view->base_table = 'feature';
  36. $view->human_name = 'Feature User Search';
  37. $view->core = 0;
  38. $view->api_version = '3.0';
  39. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  40. /* Display: features_all */
  41. $handler = $view->new_display('default', 'features_all', 'default');
  42. $handler->display->display_options['title'] = 'Sequence Features';
  43. $handler->display->display_options['use_more_always'] = FALSE;
  44. $handler->display->display_options['access']['type'] = 'perm';
  45. $handler->display->display_options['access']['perm'] = 'access chado_feature content';
  46. $handler->display->display_options['cache']['type'] = 'none';
  47. $handler->display->display_options['query']['type'] = 'views_query';
  48. $handler->display->display_options['exposed_form']['type'] = 'basic';
  49. $handler->display->display_options['pager']['type'] = 'full';
  50. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  51. $handler->display->display_options['pager']['options']['offset'] = '0';
  52. $handler->display->display_options['pager']['options']['id'] = '0';
  53. $handler->display->display_options['pager']['options']['quantity'] = '9';
  54. $handler->display->display_options['style_plugin'] = 'table';
  55. $handler->display->display_options['style_options']['grouping'] = '';
  56. $handler->display->display_options['style_options']['columns'] = [
  57. 'accession' => 'accession',
  58. 'accession_link' => 'accession_link',
  59. 'name' => 'name',
  60. 'uniquename' => 'uniquename',
  61. 'name_1' => 'name_1',
  62. 'common_name' => 'common_name',
  63. 'seqlen' => 'seqlen',
  64. 'is_obsolete' => 'is_obsolete',
  65. 'is_analysis' => 'is_analysis',
  66. 'nid' => 'nid',
  67. ];
  68. $handler->display->display_options['style_options']['default'] = '-1';
  69. $handler->display->display_options['style_options']['info'] = [
  70. 'accession' => [
  71. 'sortable' => 1,
  72. 'separator' => '',
  73. ],
  74. 'accession_link' => [
  75. 'sortable' => 1,
  76. 'separator' => '',
  77. ],
  78. 'name' => [
  79. 'sortable' => 1,
  80. 'separator' => '',
  81. ],
  82. 'uniquename' => [
  83. 'sortable' => 1,
  84. 'separator' => '',
  85. ],
  86. 'name_1' => [
  87. 'sortable' => 1,
  88. 'separator' => '',
  89. ],
  90. 'common_name' => [
  91. 'sortable' => 1,
  92. 'separator' => '',
  93. ],
  94. 'seqlen' => [
  95. 'sortable' => 1,
  96. 'separator' => '',
  97. ],
  98. 'is_obsolete' => [
  99. 'sortable' => 1,
  100. 'separator' => '',
  101. ],
  102. 'is_analysis' => [
  103. 'sortable' => 1,
  104. 'separator' => '',
  105. ],
  106. 'nid' => [
  107. 'separator' => '',
  108. ],
  109. ];
  110. /* No results behavior: Global: Text area */
  111. $handler->display->display_options['empty']['text']['id'] = 'area';
  112. $handler->display->display_options['empty']['text']['table'] = 'views';
  113. $handler->display->display_options['empty']['text']['field'] = 'area';
  114. $handler->display->display_options['empty']['text']['content'] = 'No features matched the supplied criteria.';
  115. $handler->display->display_options['empty']['text']['format'] = '2';
  116. /* Relationship: Feature: Feature => Node */
  117. $handler->display->display_options['relationships']['feature_id']['id'] = 'feature_id';
  118. $handler->display->display_options['relationships']['feature_id']['table'] = 'chado_feature';
  119. $handler->display->display_options['relationships']['feature_id']['field'] = 'feature_id';
  120. /* Field: Content: Nid */
  121. $handler->display->display_options['fields']['nid']['id'] = 'nid';
  122. $handler->display->display_options['fields']['nid']['table'] = 'node';
  123. $handler->display->display_options['fields']['nid']['field'] = 'nid';
  124. $handler->display->display_options['fields']['nid']['relationship'] = 'feature_id';
  125. $handler->display->display_options['fields']['nid']['exclude'] = TRUE;
  126. /* Field: Node URL */
  127. $handler->display->display_options['fields']['nid_1']['id'] = 'nid_1';
  128. $handler->display->display_options['fields']['nid_1']['table'] = 'node';
  129. $handler->display->display_options['fields']['nid_1']['field'] = 'nid';
  130. $handler->display->display_options['fields']['nid_1']['relationship'] = 'feature_id';
  131. $handler->display->display_options['fields']['nid_1']['ui_name'] = 'Node URL';
  132. $handler->display->display_options['fields']['nid_1']['label'] = '';
  133. $handler->display->display_options['fields']['nid_1']['exclude'] = TRUE;
  134. $handler->display->display_options['fields']['nid_1']['alter']['alter_text'] = TRUE;
  135. $handler->display->display_options['fields']['nid_1']['alter']['text'] = 'node/[nid]';
  136. $handler->display->display_options['fields']['nid_1']['element_label_colon'] = FALSE;
  137. /* Field: Chado Feature: Uniquename */
  138. $handler->display->display_options['fields']['uniquename']['id'] = 'uniquename';
  139. $handler->display->display_options['fields']['uniquename']['table'] = 'feature';
  140. $handler->display->display_options['fields']['uniquename']['field'] = 'uniquename';
  141. $handler->display->display_options['fields']['uniquename']['label'] = 'Unique Name';
  142. $handler->display->display_options['fields']['uniquename']['alter']['make_link'] = TRUE;
  143. $handler->display->display_options['fields']['uniquename']['alter']['path'] = '[nid_1]';
  144. /* Field: Chado Feature: Name */
  145. $handler->display->display_options['fields']['name']['id'] = 'name';
  146. $handler->display->display_options['fields']['name']['table'] = 'feature';
  147. $handler->display->display_options['fields']['name']['field'] = 'name';
  148. $handler->display->display_options['fields']['name']['alter']['make_link'] = TRUE;
  149. $handler->display->display_options['fields']['name']['alter']['path'] = '[nid_1]';
  150. /* Field: Chado Cvterm: Name */
  151. $handler->display->display_options['fields']['name_1']['id'] = 'name_1';
  152. $handler->display->display_options['fields']['name_1']['table'] = 'cvterm';
  153. $handler->display->display_options['fields']['name_1']['field'] = 'name';
  154. $handler->display->display_options['fields']['name_1']['label'] = 'Type';
  155. /* Field: Chado Organism: Common Name */
  156. $handler->display->display_options['fields']['common_name']['id'] = 'common_name';
  157. $handler->display->display_options['fields']['common_name']['table'] = 'organism';
  158. $handler->display->display_options['fields']['common_name']['field'] = 'common_name';
  159. /* Field: Chado Feature: Seqlen */
  160. $handler->display->display_options['fields']['seqlen']['id'] = 'seqlen';
  161. $handler->display->display_options['fields']['seqlen']['table'] = 'feature';
  162. $handler->display->display_options['fields']['seqlen']['field'] = 'seqlen';
  163. $handler->display->display_options['fields']['seqlen']['label'] = 'Sequence Length';
  164. /* Field: Chado Feature: Is Obsolete */
  165. $handler->display->display_options['fields']['is_obsolete']['id'] = 'is_obsolete';
  166. $handler->display->display_options['fields']['is_obsolete']['table'] = 'feature';
  167. $handler->display->display_options['fields']['is_obsolete']['field'] = 'is_obsolete';
  168. $handler->display->display_options['fields']['is_obsolete']['type'] = 'separator';
  169. $handler->display->display_options['fields']['is_obsolete']['not'] = 0;
  170. /* Sort criterion: Chado Organism: Common Name */
  171. $handler->display->display_options['sorts']['common_name']['id'] = 'common_name';
  172. $handler->display->display_options['sorts']['common_name']['table'] = 'organism';
  173. $handler->display->display_options['sorts']['common_name']['field'] = 'common_name';
  174. /* Sort criterion: Chado Cvterm: Name */
  175. $handler->display->display_options['sorts']['name']['id'] = 'name';
  176. $handler->display->display_options['sorts']['name']['table'] = 'cvterm';
  177. $handler->display->display_options['sorts']['name']['field'] = 'name';
  178. /* Sort criterion: Chado Feature: Name */
  179. $handler->display->display_options['sorts']['name_1']['id'] = 'name_1';
  180. $handler->display->display_options['sorts']['name_1']['table'] = 'feature';
  181. $handler->display->display_options['sorts']['name_1']['field'] = 'name';
  182. /* Filter criterion: Chado Feature: Uniquename */
  183. $handler->display->display_options['filters']['uniquename']['id'] = 'uniquename';
  184. $handler->display->display_options['filters']['uniquename']['table'] = 'feature';
  185. $handler->display->display_options['filters']['uniquename']['field'] = 'uniquename';
  186. $handler->display->display_options['filters']['uniquename']['operator'] = 'contains';
  187. $handler->display->display_options['filters']['uniquename']['group'] = 1;
  188. $handler->display->display_options['filters']['uniquename']['exposed'] = TRUE;
  189. $handler->display->display_options['filters']['uniquename']['expose']['operator_id'] = 'uniquename_op';
  190. $handler->display->display_options['filters']['uniquename']['expose']['label'] = 'Unique Name';
  191. $handler->display->display_options['filters']['uniquename']['expose']['use_operator'] = TRUE;
  192. $handler->display->display_options['filters']['uniquename']['expose']['operator'] = 'uniquename_op';
  193. $handler->display->display_options['filters']['uniquename']['expose']['identifier'] = 'uniquename';
  194. $handler->display->display_options['filters']['uniquename']['expose']['remember_roles'] = [
  195. 2 => '2',
  196. 1 => 0,
  197. 3 => 0,
  198. ];
  199. $handler->display->display_options['filters']['uniquename']['select_optional'] = TRUE;
  200. $handler->display->display_options['filters']['uniquename']['max_length'] = '40';
  201. /* Filter criterion: Chado Feature: Name */
  202. $handler->display->display_options['filters']['name_1']['id'] = 'name_1';
  203. $handler->display->display_options['filters']['name_1']['table'] = 'feature';
  204. $handler->display->display_options['filters']['name_1']['field'] = 'name';
  205. $handler->display->display_options['filters']['name_1']['operator'] = 'contains';
  206. $handler->display->display_options['filters']['name_1']['group'] = 1;
  207. $handler->display->display_options['filters']['name_1']['exposed'] = TRUE;
  208. $handler->display->display_options['filters']['name_1']['expose']['operator_id'] = 'name_1_op';
  209. $handler->display->display_options['filters']['name_1']['expose']['label'] = 'Name Contains';
  210. $handler->display->display_options['filters']['name_1']['expose']['use_operator'] = TRUE;
  211. $handler->display->display_options['filters']['name_1']['expose']['operator'] = 'name_1_op';
  212. $handler->display->display_options['filters']['name_1']['expose']['identifier'] = 'name';
  213. $handler->display->display_options['filters']['name_1']['expose']['remember_roles'] = [
  214. 2 => '2',
  215. 1 => 0,
  216. 3 => 0,
  217. ];
  218. /* Filter criterion: Chado Feature: Type Id */
  219. $handler->display->display_options['filters']['type_id']['id'] = 'type_id';
  220. $handler->display->display_options['filters']['type_id']['table'] = 'feature';
  221. $handler->display->display_options['filters']['type_id']['field'] = 'type_id';
  222. $handler->display->display_options['filters']['type_id']['value'] = [];
  223. $handler->display->display_options['filters']['type_id']['group'] = 1;
  224. $handler->display->display_options['filters']['type_id']['exposed'] = TRUE;
  225. $handler->display->display_options['filters']['type_id']['expose']['operator_id'] = 'type_id_op';
  226. $handler->display->display_options['filters']['type_id']['expose']['label'] = 'Type';
  227. $handler->display->display_options['filters']['type_id']['expose']['operator'] = 'type_id_op';
  228. $handler->display->display_options['filters']['type_id']['expose']['identifier'] = 'type_id';
  229. $handler->display->display_options['filters']['type_id']['values_form_type'] = 'select';
  230. $handler->display->display_options['filters']['type_id']['select_optional'] = TRUE;
  231. /* Filter criterion: Chado Organism: Common Name */
  232. $handler->display->display_options['filters']['common_name']['id'] = 'common_name';
  233. $handler->display->display_options['filters']['common_name']['table'] = 'organism';
  234. $handler->display->display_options['filters']['common_name']['field'] = 'common_name';
  235. $handler->display->display_options['filters']['common_name']['value'] = [];
  236. $handler->display->display_options['filters']['common_name']['group'] = 1;
  237. $handler->display->display_options['filters']['common_name']['exposed'] = TRUE;
  238. $handler->display->display_options['filters']['common_name']['expose']['operator_id'] = 'common_name_op';
  239. $handler->display->display_options['filters']['common_name']['expose']['label'] = 'Organism Common Name';
  240. $handler->display->display_options['filters']['common_name']['expose']['operator'] = 'common_name_op';
  241. $handler->display->display_options['filters']['common_name']['expose']['identifier'] = 'organism';
  242. $handler->display->display_options['filters']['common_name']['values_form_type'] = 'select';
  243. $handler->display->display_options['filters']['common_name']['select_optional'] = TRUE;
  244. /* Display: Page */
  245. $handler = $view->new_display('page', 'Page', 'page_1');
  246. $handler->display->display_options['path'] = 'chado/feature';
  247. $handler->display->display_options['menu']['type'] = 'normal';
  248. $handler->display->display_options['menu']['title'] = 'Features';
  249. $handler->display->display_options['menu']['description'] = 'A biological sequence or a section of a biological sequence, or a collection of such sections.';
  250. $handler->display->display_options['menu']['weight'] = '-10';
  251. return $view;
  252. }
  253. /**
  254. * The default feature administration view
  255. *
  256. * @ingroup tripal_legacy_feature
  257. */
  258. function tripal_feature_defaultview_admin_features() {
  259. $view = new view();
  260. $view->name = 'tripal_feature_admin_features';
  261. $view->description = 'DO NOT DISABLE';
  262. $view->tag = 'tripal admin';
  263. $view->base_table = 'feature';
  264. $view->human_name = 'Feature Admin';
  265. $view->core = 0;
  266. $view->api_version = '3.0';
  267. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  268. /* Display: features_all */
  269. $handler = $view->new_display('default', 'features_all', 'default');
  270. $handler->display->display_options['title'] = 'Sequence Features';
  271. $handler->display->display_options['use_more_always'] = FALSE;
  272. $handler->display->display_options['access']['type'] = 'perm';
  273. $handler->display->display_options['access']['perm'] = 'access chado_feature content';
  274. $handler->display->display_options['cache']['type'] = 'none';
  275. $handler->display->display_options['query']['type'] = 'views_query';
  276. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  277. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  278. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of features that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of features or to find a specific feature.';
  279. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  280. $handler->display->display_options['pager']['type'] = 'full';
  281. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  282. $handler->display->display_options['pager']['options']['offset'] = '0';
  283. $handler->display->display_options['pager']['options']['id'] = '0';
  284. $handler->display->display_options['pager']['options']['quantity'] = '9';
  285. $handler->display->display_options['style_plugin'] = 'table';
  286. $handler->display->display_options['style_options']['grouping'] = '';
  287. $handler->display->display_options['style_options']['columns'] = [
  288. 'accession' => 'accession',
  289. 'accession_link' => 'accession_link',
  290. 'name' => 'name',
  291. 'uniquename' => 'uniquename',
  292. 'name_1' => 'name_1',
  293. 'common_name' => 'common_name',
  294. 'seqlen' => 'seqlen',
  295. 'is_obsolete' => 'is_obsolete',
  296. 'is_analysis' => 'is_analysis',
  297. 'nid' => 'nid',
  298. ];
  299. $handler->display->display_options['style_options']['default'] = '-1';
  300. $handler->display->display_options['style_options']['info'] = [
  301. 'accession' => [
  302. 'sortable' => 1,
  303. 'separator' => '',
  304. ],
  305. 'accession_link' => [
  306. 'sortable' => 1,
  307. 'separator' => '',
  308. ],
  309. 'name' => [
  310. 'sortable' => 1,
  311. 'separator' => '',
  312. ],
  313. 'uniquename' => [
  314. 'sortable' => 1,
  315. 'separator' => '',
  316. ],
  317. 'name_1' => [
  318. 'sortable' => 1,
  319. 'separator' => '',
  320. ],
  321. 'common_name' => [
  322. 'sortable' => 1,
  323. 'separator' => '',
  324. ],
  325. 'seqlen' => [
  326. 'sortable' => 1,
  327. 'separator' => '',
  328. ],
  329. 'is_obsolete' => [
  330. 'sortable' => 1,
  331. 'separator' => '',
  332. ],
  333. 'is_analysis' => [
  334. 'sortable' => 1,
  335. 'separator' => '',
  336. ],
  337. 'nid' => [
  338. 'separator' => '',
  339. ],
  340. ];
  341. /* Header: Global: Action Links */
  342. $handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
  343. $handler->display->display_options['header']['action_links_area']['table'] = 'views';
  344. $handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
  345. $handler->display->display_options['header']['action_links_area']['label'] = 'Add/Import';
  346. $handler->display->display_options['header']['action_links_area']['empty'] = TRUE;
  347. $handler->display->display_options['header']['action_links_area']['link-1'] = [
  348. 'label-1' => 'Add Feature',
  349. 'path-1' => 'node/add/tripal-feature',
  350. ];
  351. $handler->display->display_options['header']['action_links_area']['link-2'] = [
  352. 'label-2' => 'Import via FASTA file',
  353. 'path-2' => 'admin/tripal/loaders/fasta_loader',
  354. ];
  355. $handler->display->display_options['header']['action_links_area']['link-3'] = [
  356. 'label-3' => 'Import via GFF3 file',
  357. 'path-3' => 'admin/tripal/loaders/gff3_load',
  358. ];
  359. $handler->display->display_options['header']['action_links_area']['link-4'] = [
  360. 'label-4' => '',
  361. 'path-4' => '',
  362. ];
  363. /* Header: Global: Action Links */
  364. $handler->display->display_options['header']['action_links_area_1']['id'] = 'action_links_area_1';
  365. $handler->display->display_options['header']['action_links_area_1']['table'] = 'views';
  366. $handler->display->display_options['header']['action_links_area_1']['field'] = 'action_links_area';
  367. $handler->display->display_options['header']['action_links_area_1']['label'] = 'Extract';
  368. $handler->display->display_options['header']['action_links_area_1']['empty'] = TRUE;
  369. $handler->display->display_options['header']['action_links_area_1']['link-1'] = [
  370. 'label-1' => 'Retrieve Sequences',
  371. 'path-1' => 'find/sequences',
  372. ];
  373. $handler->display->display_options['header']['action_links_area_1']['link-2'] = [
  374. 'label-2' => '',
  375. 'path-2' => '',
  376. ];
  377. $handler->display->display_options['header']['action_links_area_1']['link-3'] = [
  378. 'label-3' => '',
  379. 'path-3' => '',
  380. ];
  381. $handler->display->display_options['header']['action_links_area_1']['link-4'] = [
  382. 'label-4' => '',
  383. 'path-4' => '',
  384. ];
  385. /* No results behavior: Global: Text area */
  386. $handler->display->display_options['empty']['text']['id'] = 'area';
  387. $handler->display->display_options['empty']['text']['table'] = 'views';
  388. $handler->display->display_options['empty']['text']['field'] = 'area';
  389. $handler->display->display_options['empty']['text']['content'] = 'No features matched the supplied criteria.';
  390. $handler->display->display_options['empty']['text']['format'] = '2';
  391. /* Relationship: Feature: Feature => Node */
  392. $handler->display->display_options['relationships']['feature_id']['id'] = 'feature_id';
  393. $handler->display->display_options['relationships']['feature_id']['table'] = 'chado_feature';
  394. $handler->display->display_options['relationships']['feature_id']['field'] = 'feature_id';
  395. /* Field: Content: Nid */
  396. $handler->display->display_options['fields']['nid']['id'] = 'nid';
  397. $handler->display->display_options['fields']['nid']['table'] = 'node';
  398. $handler->display->display_options['fields']['nid']['field'] = 'nid';
  399. $handler->display->display_options['fields']['nid']['relationship'] = 'feature_id';
  400. $handler->display->display_options['fields']['nid']['exclude'] = TRUE;
  401. /* Field: Node URL */
  402. $handler->display->display_options['fields']['nid_1']['id'] = 'nid_1';
  403. $handler->display->display_options['fields']['nid_1']['table'] = 'node';
  404. $handler->display->display_options['fields']['nid_1']['field'] = 'nid';
  405. $handler->display->display_options['fields']['nid_1']['relationship'] = 'feature_id';
  406. $handler->display->display_options['fields']['nid_1']['ui_name'] = 'Node URL';
  407. $handler->display->display_options['fields']['nid_1']['label'] = '';
  408. $handler->display->display_options['fields']['nid_1']['exclude'] = TRUE;
  409. $handler->display->display_options['fields']['nid_1']['alter']['alter_text'] = TRUE;
  410. $handler->display->display_options['fields']['nid_1']['alter']['text'] = 'node/[nid]';
  411. $handler->display->display_options['fields']['nid_1']['element_label_colon'] = FALSE;
  412. /* Field: Chado Feature: Uniquename */
  413. $handler->display->display_options['fields']['uniquename']['id'] = 'uniquename';
  414. $handler->display->display_options['fields']['uniquename']['table'] = 'feature';
  415. $handler->display->display_options['fields']['uniquename']['field'] = 'uniquename';
  416. $handler->display->display_options['fields']['uniquename']['label'] = 'Unique Name';
  417. $handler->display->display_options['fields']['uniquename']['alter']['path'] = 'node/[nid]';
  418. $handler->display->display_options['fields']['uniquename']['alter']['make_link'] = TRUE;
  419. $handler->display->display_options['fields']['uniquename']['alter']['path'] = '[nid_1]';
  420. /* Field: Chado Feature: Name */
  421. $handler->display->display_options['fields']['name']['id'] = 'name';
  422. $handler->display->display_options['fields']['name']['table'] = 'feature';
  423. $handler->display->display_options['fields']['name']['field'] = 'name';
  424. $handler->display->display_options['fields']['name']['alter']['make_link'] = TRUE;
  425. $handler->display->display_options['fields']['name']['alter']['path'] = '[nid_1]';
  426. /* Field: Chado Cvterm: Name */
  427. $handler->display->display_options['fields']['name_1']['id'] = 'name_1';
  428. $handler->display->display_options['fields']['name_1']['table'] = 'cvterm';
  429. $handler->display->display_options['fields']['name_1']['field'] = 'name';
  430. $handler->display->display_options['fields']['name_1']['label'] = 'Type';
  431. /* Field: Chado Organism: Common Name */
  432. $handler->display->display_options['fields']['common_name']['id'] = 'common_name';
  433. $handler->display->display_options['fields']['common_name']['table'] = 'organism';
  434. $handler->display->display_options['fields']['common_name']['field'] = 'common_name';
  435. /* Field: Chado Feature: Seqlen */
  436. $handler->display->display_options['fields']['seqlen']['id'] = 'seqlen';
  437. $handler->display->display_options['fields']['seqlen']['table'] = 'feature';
  438. $handler->display->display_options['fields']['seqlen']['field'] = 'seqlen';
  439. $handler->display->display_options['fields']['seqlen']['label'] = 'Sequence Length';
  440. /* Field: Chado Feature: Is Obsolete */
  441. $handler->display->display_options['fields']['is_obsolete']['id'] = 'is_obsolete';
  442. $handler->display->display_options['fields']['is_obsolete']['table'] = 'feature';
  443. $handler->display->display_options['fields']['is_obsolete']['field'] = 'is_obsolete';
  444. $handler->display->display_options['fields']['is_obsolete']['type'] = 'separator';
  445. $handler->display->display_options['fields']['is_obsolete']['not'] = 0;
  446. /* Field: Content: Delete link */
  447. $handler->display->display_options['fields']['delete_node']['id'] = 'delete_node';
  448. $handler->display->display_options['fields']['delete_node']['table'] = 'views_entity_node';
  449. $handler->display->display_options['fields']['delete_node']['field'] = 'delete_node';
  450. $handler->display->display_options['fields']['delete_node']['relationship'] = 'feature_id';
  451. $handler->display->display_options['fields']['delete_node']['exclude'] = TRUE;
  452. /* Field: Content: Edit link */
  453. $handler->display->display_options['fields']['edit_node']['id'] = 'edit_node';
  454. $handler->display->display_options['fields']['edit_node']['table'] = 'views_entity_node';
  455. $handler->display->display_options['fields']['edit_node']['field'] = 'edit_node';
  456. $handler->display->display_options['fields']['edit_node']['relationship'] = 'feature_id';
  457. $handler->display->display_options['fields']['edit_node']['exclude'] = TRUE;
  458. /* Field: Global: Custom text */
  459. $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
  460. $handler->display->display_options['fields']['nothing']['table'] = 'views';
  461. $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
  462. $handler->display->display_options['fields']['nothing']['label'] = '';
  463. $handler->display->display_options['fields']['nothing']['alter']['text'] = '[edit_node] [delete_node]';
  464. $handler->display->display_options['fields']['nothing']['element_label_colon'] = FALSE;
  465. /* Sort criterion: Chado Feature: Feature Id */
  466. $handler->display->display_options['sorts']['feature_id']['id'] = 'feature_id';
  467. $handler->display->display_options['sorts']['feature_id']['table'] = 'feature';
  468. $handler->display->display_options['sorts']['feature_id']['field'] = 'feature_id';
  469. $handler->display->display_options['sorts']['feature_id']['order'] = 'DESC';
  470. /* Filter criterion: Chado Organism: Common Name */
  471. $handler->display->display_options['filters']['common_name']['id'] = 'common_name';
  472. $handler->display->display_options['filters']['common_name']['table'] = 'organism';
  473. $handler->display->display_options['filters']['common_name']['field'] = 'common_name';
  474. $handler->display->display_options['filters']['common_name']['value'] = [];
  475. $handler->display->display_options['filters']['common_name']['group'] = '0';
  476. $handler->display->display_options['filters']['common_name']['exposed'] = TRUE;
  477. $handler->display->display_options['filters']['common_name']['expose']['operator_id'] = 'common_name_op';
  478. $handler->display->display_options['filters']['common_name']['expose']['label'] = 'Organism Common Name';
  479. $handler->display->display_options['filters']['common_name']['expose']['operator'] = 'common_name_op';
  480. $handler->display->display_options['filters']['common_name']['expose']['identifier'] = 'organism';
  481. /* Filter criterion: Chado Feature: Type Id */
  482. $handler->display->display_options['filters']['type_id']['id'] = 'type_id';
  483. $handler->display->display_options['filters']['type_id']['table'] = 'feature';
  484. $handler->display->display_options['filters']['type_id']['field'] = 'type_id';
  485. $handler->display->display_options['filters']['type_id']['value'] = [];
  486. $handler->display->display_options['filters']['type_id']['group'] = '0';
  487. $handler->display->display_options['filters']['type_id']['exposed'] = TRUE;
  488. $handler->display->display_options['filters']['type_id']['expose']['operator_id'] = 'type_id_op';
  489. $handler->display->display_options['filters']['type_id']['expose']['label'] = 'Type';
  490. $handler->display->display_options['filters']['type_id']['expose']['operator'] = 'type_id_op';
  491. $handler->display->display_options['filters']['type_id']['expose']['identifier'] = 'type_id';
  492. /* Filter criterion: Chado Feature: Name */
  493. $handler->display->display_options['filters']['name_1']['id'] = 'name_1';
  494. $handler->display->display_options['filters']['name_1']['table'] = 'feature';
  495. $handler->display->display_options['filters']['name_1']['field'] = 'name';
  496. $handler->display->display_options['filters']['name_1']['operator'] = '~';
  497. $handler->display->display_options['filters']['name_1']['group'] = '0';
  498. $handler->display->display_options['filters']['name_1']['exposed'] = TRUE;
  499. $handler->display->display_options['filters']['name_1']['expose']['operator_id'] = 'name_1_op';
  500. $handler->display->display_options['filters']['name_1']['expose']['label'] = 'Name Contains';
  501. $handler->display->display_options['filters']['name_1']['expose']['operator'] = 'name_1_op';
  502. $handler->display->display_options['filters']['name_1']['expose']['identifier'] = 'name';
  503. /** MANUALLY ADD since filter handler no exporting correctly */
  504. $handler->display->display_options['filters']['common_name']['expose']['values_form_type'] = 'select';
  505. $handler->display->display_options['filters']['common_name']['expose']['select_multiple'] = FALSE;
  506. $handler->display->display_options['filters']['common_name']['expose']['select_optional'] = TRUE;
  507. $handler->display->display_options['filters']['common_name']['expose']['max_length'] = 40;
  508. $handler->display->display_options['filters']['type_id']['expose']['values_form_type'] = 'select';
  509. $handler->display->display_options['filters']['type_id']['expose']['select_multiple'] = FALSE;
  510. $handler->display->display_options['filters']['type_id']['expose']['select_optional'] = TRUE;
  511. $handler->display->display_options['filters']['type_id']['expose']['max_length'] = 40;
  512. /* Display: Page */
  513. $handler = $view->new_display('page', 'Page', 'page_1');
  514. $handler->display->display_options['path'] = 'admin/tripal/legacy/tripal_feature/features';
  515. $handler->display->display_options['menu']['type'] = 'default tab';
  516. $handler->display->display_options['menu']['title'] = 'Features';
  517. $handler->display->display_options['menu']['description'] = 'A feature is a biological sequence or a section of a biological sequence, or a collection of such sections.';
  518. $handler->display->display_options['menu']['weight'] = '-10';
  519. $handler->display->display_options['menu']['context'] = 0;
  520. $handler->display->display_options['menu']['context_only_inline'] = 0;
  521. $handler->display->display_options['tab_options']['weight'] = '0';
  522. /** MANUALLY ADD since filter handler no exporting correctly
  523. * $handler->display->display_options['filters']['common_name']['expose']['values_form_type'] = 'select';
  524. * $handler->display->display_options['filters']['common_name']['expose']['select_multiple'] = FALSE;
  525. * $handler->display->display_options['filters']['common_name']['expose']['select_optional'] = TRUE;
  526. * $handler->display->display_options['filters']['common_name']['expose']['max_length'] = 40;
  527. * $handler->display->display_options['filters']['type_id']['expose']['values_form_type'] = 'select';
  528. * $handler->display->display_options['filters']['type_id']['expose']['select_multiple'] = FALSE;
  529. * $handler->display->display_options['filters']['type_id']['expose']['select_optional'] = TRUE;
  530. * $handler->display->display_options['filters']['type_id']['expose']['max_length'] = 40;
  531. */
  532. return $view;
  533. }