tripal_chado.views_default.inc 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204
  1. <?php
  2. /**
  3. * @file
  4. * Describes core default views
  5. */
  6. /**
  7. * Describes core default views
  8. *
  9. * @ingroup tripal
  10. */
  11. function tripal_chado_views_default_views() {
  12. $views = [];
  13. // Default Tripal custom tables view.
  14. $view = tripal_chado_defaultview_admin_custom_tables();
  15. $views[$view->name] = $view;
  16. // Default Trial materialized views view.
  17. $view = tripal_chado_defaultview_admin_mviews();
  18. $views[$view->name] = $view;
  19. // Default Tripal admin view: CVs.
  20. $view = tripal_chado_defaultview_admin_cvs_listing();
  21. $view = tripal_make_view_compatible_with_external($view);
  22. $views[$view->name] = $view;
  23. // Default Tripal admin view: CV Terms.
  24. $view = tripal_chado_defaultview_admin_cvterms_listing();
  25. $view = tripal_make_view_compatible_with_external($view);
  26. $views[$view->name] = $view;
  27. // Default Tripal Admin View: DB
  28. $view = tripal_chado_defaultview_admin_db_listing();
  29. $view = tripal_make_view_compatible_with_external($view);
  30. $views[$view->name] = $view;
  31. // Default Tripal Admin View: DB References
  32. $view = tripal_chado_defaultview_admin_dbxref_listing();
  33. $view = tripal_make_view_compatible_with_external($view);
  34. $views[$view->name] = $view;
  35. return $views;
  36. }
  37. /**
  38. * Describes the custom tables administration view.
  39. *
  40. * @ingroup tripal
  41. */
  42. function tripal_chado_defaultview_admin_custom_tables() {
  43. $view = new view();
  44. $view->name = 'tripal_admin_custom_table';
  45. $view->description = 'DO NOT DISABLE';
  46. $view->tag = 'tripal admin';
  47. $view->base_table = 'tripal_custom_tables';
  48. $view->human_name = 'Chado Custom Table (Admin)';
  49. $view->core = 7;
  50. $view->api_version = '3.0';
  51. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  52. /* Display: Master */
  53. $handler = $view->new_display('default', 'Master', 'default');
  54. $handler->display->display_options['title'] = 'Custom Tables';
  55. $handler->display->display_options['use_more_always'] = FALSE;
  56. $handler->display->display_options['access']['type'] = 'none';
  57. $handler->display->display_options['cache']['type'] = 'none';
  58. $handler->display->display_options['query']['type'] = 'views_query';
  59. $handler->display->display_options['exposed_form']['type'] = 'basic';
  60. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Filter';
  61. $handler->display->display_options['pager']['type'] = 'full';
  62. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  63. $handler->display->display_options['style_plugin'] = 'table';
  64. /* Header: Global: Action Links */
  65. $handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
  66. $handler->display->display_options['header']['action_links_area']['table'] = 'views';
  67. $handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
  68. $handler->display->display_options['header']['action_links_area']['label'] = 'Action Links';
  69. $handler->display->display_options['header']['action_links_area']['empty'] = TRUE;
  70. $handler->display->display_options['header']['action_links_area']['link-1'] = array(
  71. 'label-1' => 'Add Custom Table',
  72. 'path-1' => 'admin/tripal/storage/chado/custom_tables/new',
  73. );
  74. $handler->display->display_options['header']['action_links_area']['link-2'] = array(
  75. 'label-2' => '',
  76. 'path-2' => '',
  77. );
  78. $handler->display->display_options['header']['action_links_area']['link-3'] = array(
  79. 'label-3' => '',
  80. 'path-3' => '',
  81. );
  82. $handler->display->display_options['header']['action_links_area']['link-4'] = array(
  83. 'label-4' => '',
  84. 'path-4' => '',
  85. );
  86. /* Field: Tripal Custom Tables: Custom Table ID */
  87. $handler->display->display_options['fields']['table_id']['id'] = 'table_id';
  88. $handler->display->display_options['fields']['table_id']['table'] = 'tripal_custom_tables';
  89. $handler->display->display_options['fields']['table_id']['field'] = 'table_id';
  90. $handler->display->display_options['fields']['table_id']['label'] = 'ID';
  91. $handler->display->display_options['fields']['table_id']['element_class'] = 'extra-short-column';
  92. $handler->display->display_options['fields']['table_id']['element_label_class'] = 'extra-short-column';
  93. $handler->display->display_options['fields']['table_id']['element_label_colon'] = FALSE;
  94. $handler->display->display_options['fields']['table_id']['separator'] = '';
  95. /* Field: Tripal Custom Tables: Table Name */
  96. $handler->display->display_options['fields']['table_name']['id'] = 'table_name';
  97. $handler->display->display_options['fields']['table_name']['table'] = 'tripal_custom_tables';
  98. $handler->display->display_options['fields']['table_name']['field'] = 'table_name';
  99. $handler->display->display_options['fields']['table_name']['alter']['make_link'] = TRUE;
  100. $handler->display->display_options['fields']['table_name']['alter']['path'] = 'admin/tripal/storage/chado/custom_tables/view/[table_id]';
  101. /* Field: Tripal Custom Tables: Is Base? */
  102. $handler->display->display_options['fields']['is_base']['id'] = 'is_base';
  103. $handler->display->display_options['fields']['is_base']['table'] = 'tripal_custom_tables';
  104. $handler->display->display_options['fields']['is_base']['field'] = 'is_base';
  105. $handler->display->display_options['fields']['is_base']['alter']['alter_text'] = TRUE;
  106. $handler->display->display_options['fields']['is_base']['alter']['text'] = 'Yes';
  107. $handler->display->display_options['fields']['is_base']['element_label_colon'] = FALSE;
  108. $handler->display->display_options['fields']['is_base']['hide_empty'] = TRUE;
  109. $handler->display->display_options['fields']['is_base']['empty_zero'] = TRUE;
  110. $handler->display->display_options['fields']['is_base']['separator'] = '';
  111. /* Field: Tripal Custom Tables: Materialized View ID */
  112. $handler->display->display_options['fields']['mview_id']['id'] = 'mview_id';
  113. $handler->display->display_options['fields']['mview_id']['table'] = 'tripal_custom_tables';
  114. $handler->display->display_options['fields']['mview_id']['field'] = 'mview_id';
  115. $handler->display->display_options['fields']['mview_id']['label'] = 'Is Materialized View?';
  116. $handler->display->display_options['fields']['mview_id']['alter']['alter_text'] = TRUE;
  117. $handler->display->display_options['fields']['mview_id']['alter']['text'] = 'Yes';
  118. $handler->display->display_options['fields']['mview_id']['element_label_colon'] = FALSE;
  119. $handler->display->display_options['fields']['mview_id']['hide_empty'] = TRUE;
  120. $handler->display->display_options['fields']['mview_id']['empty_zero'] = TRUE;
  121. $handler->display->display_options['fields']['mview_id']['separator'] = '';
  122. /* Field: Global: Custom text */
  123. $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
  124. $handler->display->display_options['fields']['nothing']['table'] = 'views';
  125. $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
  126. $handler->display->display_options['fields']['nothing']['label'] = 'Edit Link';
  127. $handler->display->display_options['fields']['nothing']['exclude'] = TRUE;
  128. $handler->display->display_options['fields']['nothing']['alter']['text'] = 'Edit';
  129. $handler->display->display_options['fields']['nothing']['alter']['make_link'] = TRUE;
  130. $handler->display->display_options['fields']['nothing']['alter']['path'] = 'admin/tripal/storage/chado/custom_tables/edit/[table_id]';
  131. /* Field: Global: Custom text */
  132. $handler->display->display_options['fields']['nothing_1']['id'] = 'nothing_1';
  133. $handler->display->display_options['fields']['nothing_1']['table'] = 'views';
  134. $handler->display->display_options['fields']['nothing_1']['field'] = 'nothing';
  135. $handler->display->display_options['fields']['nothing_1']['label'] = 'Delete Link';
  136. $handler->display->display_options['fields']['nothing_1']['exclude'] = TRUE;
  137. $handler->display->display_options['fields']['nothing_1']['alter']['text'] = 'Delete';
  138. $handler->display->display_options['fields']['nothing_1']['alter']['make_link'] = TRUE;
  139. $handler->display->display_options['fields']['nothing_1']['alter']['path'] = 'admin/tripal/storage/chado/custom_tables/delete/[table_id]';
  140. /* Field: Global: Custom text */
  141. $handler->display->display_options['fields']['nothing_2']['id'] = 'nothing_2';
  142. $handler->display->display_options['fields']['nothing_2']['table'] = 'views';
  143. $handler->display->display_options['fields']['nothing_2']['field'] = 'nothing';
  144. $handler->display->display_options['fields']['nothing_2']['label'] = '';
  145. $handler->display->display_options['fields']['nothing_2']['alter']['text'] = '[nothing] [nothing_1]';
  146. $handler->display->display_options['fields']['nothing_2']['element_label_colon'] = FALSE;
  147. /* Filter criterion: Tripal Custom Tables: Table Name */
  148. $handler->display->display_options['filters']['table_name']['id'] = 'table_name';
  149. $handler->display->display_options['filters']['table_name']['table'] = 'tripal_custom_tables';
  150. $handler->display->display_options['filters']['table_name']['field'] = 'table_name';
  151. $handler->display->display_options['filters']['table_name']['exposed'] = TRUE;
  152. $handler->display->display_options['filters']['table_name']['expose']['operator_id'] = 'table_name_op';
  153. $handler->display->display_options['filters']['table_name']['expose']['label'] = 'Table Name';
  154. $handler->display->display_options['filters']['table_name']['expose']['operator'] = 'table_name_op';
  155. $handler->display->display_options['filters']['table_name']['expose']['identifier'] = 'table_name';
  156. $handler->display->display_options['filters']['table_name']['expose']['remember_roles'] = array(
  157. 2 => '2',
  158. 1 => 0,
  159. 3 => 0,
  160. );
  161. /* Display: Page */
  162. $handler = $view->new_display('page', 'Page', 'page');
  163. $handler->display->display_options['path'] = 'admin/tripal/storage/chado/custom_tables/tables';
  164. $handler->display->display_options['menu']['type'] = 'default tab';
  165. $handler->display->display_options['menu']['title'] = 'Custom Tables';
  166. $handler->display->display_options['menu']['description'] = 'A list of existing custom tables';
  167. $handler->display->display_options['menu']['weight'] = '-10';
  168. $handler->display->display_options['menu']['name'] = 'management';
  169. $handler->display->display_options['menu']['context'] = 0;
  170. $handler->display->display_options['menu']['context_only_inline'] = 0;
  171. $handler->display->display_options['tab_options']['weight'] = '0';
  172. return $view;
  173. }
  174. /**
  175. * Describes the materialized views administration view.
  176. *
  177. * @ingroup tripal
  178. */
  179. function tripal_chado_defaultview_admin_mviews() {
  180. $view = new view();
  181. $view->name = 'tripal_admin_mviews';
  182. $view->description = 'DO NOT DISABLE';
  183. $view->tag = 'tripal admin';
  184. $view->base_table = 'tripal_mviews';
  185. $view->human_name = 'Chado Materialized View (Admin)';
  186. $view->core = 7;
  187. $view->api_version = '3.0';
  188. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  189. /* Display: Master */
  190. $handler = $view->new_display('default', 'Master', 'default');
  191. $handler->display->display_options['title'] = 'Materialized Views';
  192. $handler->display->display_options['use_more_always'] = FALSE;
  193. $handler->display->display_options['access']['type'] = 'none';
  194. $handler->display->display_options['cache']['type'] = 'none';
  195. $handler->display->display_options['query']['type'] = 'views_query';
  196. $handler->display->display_options['exposed_form']['type'] = 'basic';
  197. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Filter';
  198. $handler->display->display_options['pager']['type'] = 'full';
  199. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  200. $handler->display->display_options['style_plugin'] = 'table';
  201. $handler->display->display_options['style_options']['columns'] = [
  202. 'mview_id' => 'mview_id',
  203. 'name' => 'name',
  204. 'mv_table' => 'mv_table',
  205. 'comment' => 'comment',
  206. 'last_update' => 'last_update',
  207. 'status' => 'status',
  208. ];
  209. $handler->display->display_options['style_options']['default'] = 'mview_id';
  210. $handler->display->display_options['style_options']['info'] = [
  211. 'mview_id' => [
  212. 'sortable' => 1,
  213. 'default_sort_order' => 'asc',
  214. 'align' => '',
  215. 'separator' => '',
  216. 'empty_column' => 0,
  217. ],
  218. 'name' => [
  219. 'sortable' => 1,
  220. 'default_sort_order' => 'asc',
  221. 'align' => '',
  222. 'separator' => '',
  223. 'empty_column' => 0,
  224. ],
  225. 'mv_table' => [
  226. 'sortable' => 1,
  227. 'default_sort_order' => 'asc',
  228. 'align' => '',
  229. 'separator' => '',
  230. 'empty_column' => 0,
  231. ],
  232. 'comment' => [
  233. 'sortable' => 0,
  234. 'default_sort_order' => 'asc',
  235. 'align' => '',
  236. 'separator' => '',
  237. 'empty_column' => 0,
  238. ],
  239. 'last_update' => [
  240. 'sortable' => 1,
  241. 'default_sort_order' => 'asc',
  242. 'align' => '',
  243. 'separator' => '',
  244. 'empty_column' => 0,
  245. ],
  246. 'status' => [
  247. 'sortable' => 1,
  248. 'default_sort_order' => 'asc',
  249. 'align' => '',
  250. 'separator' => '',
  251. 'empty_column' => 0,
  252. ],
  253. ];
  254. /* Header: Global: Text area */
  255. $handler->display->display_options['header']['area']['id'] = 'area';
  256. $handler->display->display_options['header']['area']['table'] = 'views';
  257. $handler->display->display_options['header']['area']['field'] = 'area';
  258. $handler->display->display_options['header']['area']['label'] = 'Description';
  259. $handler->display->display_options['header']['area']['empty'] = TRUE;
  260. $handler->display->display_options['header']['area']['content'] = '<p>Materialized Views (MViews) are custom tables populated with a defined SQL statement. Because Chado is highly normalized and highly constrained it serves as a wonderful data storage platform, but unfortunately some queries may be slow. MViews alleviate slowness by aggregating data into tables that are more easy to query. Use MViews to create tables for custom search pages or custom Tripal module development.</p>
  261. <p>MViews behaves in the following way:</p>
  262. <ul>
  263. <li>The SQL statement defined for an MVIEW will be used to populate the table</li>
  264. <li>Altering the table structure of an MView will cause the MView table to be dropped and recreated. All records in the MView will be lost.</li>
  265. <li>Altering the query of an existing view will not change the MView table. No records will be lost.</li>
  266. <li>Repopulating an MView that is already populated will result in replacement of all records.</li>
  267. <li>A database transaction will be used when populating MViews. Therefore replacement of records does not occur until the query completes. Any search forms or pages dependent on the MView will continue to function.</li>
  268. </ul>';
  269. $handler->display->display_options['header']['area']['format'] = 'full_html';
  270. /* Header: Global: Action Links */
  271. $handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
  272. $handler->display->display_options['header']['action_links_area']['table'] = 'views';
  273. $handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
  274. $handler->display->display_options['header']['action_links_area']['label'] = 'Action Links';
  275. $handler->display->display_options['header']['action_links_area']['link-1'] = [
  276. 'label-1' => 'Add Materialized View',
  277. 'path-1' => 'admin/tripal/storage/chado/mviews/new',
  278. ];
  279. $handler->display->display_options['header']['action_links_area']['link-2'] = [
  280. 'label-2' => '',
  281. 'path-2' => '',
  282. ];
  283. $handler->display->display_options['header']['action_links_area']['link-3'] = [
  284. 'label-3' => '',
  285. 'path-3' => '',
  286. ];
  287. $handler->display->display_options['header']['action_links_area']['link-4'] = [
  288. 'label-4' => '',
  289. 'path-4' => '',
  290. ];
  291. /* Field: Tripal Materialized Views: Materialized View ID */
  292. $handler->display->display_options['fields']['mview_id']['id'] = 'mview_id';
  293. $handler->display->display_options['fields']['mview_id']['table'] = 'tripal_mviews';
  294. $handler->display->display_options['fields']['mview_id']['field'] = 'mview_id';
  295. $handler->display->display_options['fields']['mview_id']['label'] = '';
  296. $handler->display->display_options['fields']['mview_id']['element_class'] = 'extra-short-column';
  297. $handler->display->display_options['fields']['mview_id']['element_label_class'] = 'extra-short-column';
  298. $handler->display->display_options['fields']['mview_id']['element_label_colon'] = FALSE;
  299. $handler->display->display_options['fields']['mview_id']['separator'] = '';
  300. /* Field: Tripal Materialized Views: Name */
  301. $handler->display->display_options['fields']['name']['id'] = 'name';
  302. $handler->display->display_options['fields']['name']['table'] = 'tripal_mviews';
  303. $handler->display->display_options['fields']['name']['field'] = 'name';
  304. $handler->display->display_options['fields']['name']['alter']['make_link'] = TRUE;
  305. $handler->display->display_options['fields']['name']['alter']['path'] = 'admin/tripal/storage/chado/mviews/report/[mview_id]';
  306. /* Field: Tripal Materialized Views: Table */
  307. $handler->display->display_options['fields']['mv_table']['id'] = 'mv_table';
  308. $handler->display->display_options['fields']['mv_table']['table'] = 'tripal_mviews';
  309. $handler->display->display_options['fields']['mv_table']['field'] = 'mv_table';
  310. $handler->display->display_options['fields']['mv_table']['label'] = 'Table Name';
  311. /* Field: Tripal Materialized Views: Description */
  312. $handler->display->display_options['fields']['comment']['id'] = 'comment';
  313. $handler->display->display_options['fields']['comment']['table'] = 'tripal_mviews';
  314. $handler->display->display_options['fields']['comment']['field'] = 'comment';
  315. /* Field: Tripal Materialized Views: Updated */
  316. $handler->display->display_options['fields']['last_update']['id'] = 'last_update';
  317. $handler->display->display_options['fields']['last_update']['table'] = 'tripal_mviews';
  318. $handler->display->display_options['fields']['last_update']['field'] = 'last_update';
  319. $handler->display->display_options['fields']['last_update']['label'] = 'Last Updated';
  320. $handler->display->display_options['fields']['last_update']['date_format'] = 'long';
  321. /* Field: Tripal Materialized Views: Status */
  322. $handler->display->display_options['fields']['status']['id'] = 'status';
  323. $handler->display->display_options['fields']['status']['table'] = 'tripal_mviews';
  324. $handler->display->display_options['fields']['status']['field'] = 'status';
  325. $handler->display->display_options['fields']['status']['empty'] = 'Not yet populated';
  326. /* Field: Global: Custom text */
  327. $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
  328. $handler->display->display_options['fields']['nothing']['table'] = 'views';
  329. $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
  330. $handler->display->display_options['fields']['nothing']['label'] = 'Edit Link';
  331. $handler->display->display_options['fields']['nothing']['exclude'] = TRUE;
  332. $handler->display->display_options['fields']['nothing']['alter']['text'] = 'Edit';
  333. $handler->display->display_options['fields']['nothing']['alter']['make_link'] = TRUE;
  334. $handler->display->display_options['fields']['nothing']['alter']['path'] = 'admin/tripal/storage/chado/mviews/edit/[mview_id]';
  335. /* Field: Global: Custom text */
  336. $handler->display->display_options['fields']['nothing_1']['id'] = 'nothing_1';
  337. $handler->display->display_options['fields']['nothing_1']['table'] = 'views';
  338. $handler->display->display_options['fields']['nothing_1']['field'] = 'nothing';
  339. $handler->display->display_options['fields']['nothing_1']['label'] = 'Delete Link';
  340. $handler->display->display_options['fields']['nothing_1']['exclude'] = TRUE;
  341. $handler->display->display_options['fields']['nothing_1']['alter']['text'] = 'Delete';
  342. $handler->display->display_options['fields']['nothing_1']['alter']['make_link'] = TRUE;
  343. $handler->display->display_options['fields']['nothing_1']['alter']['path'] = 'admin/tripal/storage/chado/mviews/delete/[mview_id]';
  344. /* Field: Global: Custom text */
  345. $handler->display->display_options['fields']['nothing_2']['id'] = 'nothing_2';
  346. $handler->display->display_options['fields']['nothing_2']['table'] = 'views';
  347. $handler->display->display_options['fields']['nothing_2']['field'] = 'nothing';
  348. $handler->display->display_options['fields']['nothing_2']['label'] = 'Populate Link';
  349. $handler->display->display_options['fields']['nothing_2']['exclude'] = TRUE;
  350. $handler->display->display_options['fields']['nothing_2']['alter']['text'] = 'Populate';
  351. $handler->display->display_options['fields']['nothing_2']['alter']['make_link'] = TRUE;
  352. $handler->display->display_options['fields']['nothing_2']['alter']['path'] = 'admin/tripal/storage/chado/mviews/update/[mview_id]';
  353. /* Field: Global: Custom text */
  354. $handler->display->display_options['fields']['nothing_3']['id'] = 'nothing_3';
  355. $handler->display->display_options['fields']['nothing_3']['table'] = 'views';
  356. $handler->display->display_options['fields']['nothing_3']['field'] = 'nothing';
  357. $handler->display->display_options['fields']['nothing_3']['label'] = '';
  358. $handler->display->display_options['fields']['nothing_3']['alter']['text'] = '[nothing] [nothing_1]<br />
  359. [nothing_2]';
  360. $handler->display->display_options['fields']['nothing_3']['element_class'] = 'short-column';
  361. $handler->display->display_options['fields']['nothing_3']['element_label_class'] = 'short-column';
  362. $handler->display->display_options['fields']['nothing_3']['element_label_colon'] = FALSE;
  363. /* Filter criterion: Tripal Materialized Views: Name */
  364. $handler->display->display_options['filters']['name']['id'] = 'name';
  365. $handler->display->display_options['filters']['name']['table'] = 'tripal_mviews';
  366. $handler->display->display_options['filters']['name']['field'] = 'name';
  367. $handler->display->display_options['filters']['name']['group'] = 1;
  368. $handler->display->display_options['filters']['name']['exposed'] = TRUE;
  369. $handler->display->display_options['filters']['name']['expose']['operator_id'] = 'name_op';
  370. $handler->display->display_options['filters']['name']['expose']['label'] = 'Name';
  371. $handler->display->display_options['filters']['name']['expose']['operator'] = 'name_op';
  372. $handler->display->display_options['filters']['name']['expose']['identifier'] = 'name';
  373. $handler->display->display_options['filters']['name']['expose']['remember_roles'] = [
  374. 2 => '2',
  375. 1 => 0,
  376. 3 => 0,
  377. ];
  378. /* Filter criterion: Tripal Materialized Views: Table */
  379. $handler->display->display_options['filters']['mv_table']['id'] = 'mv_table';
  380. $handler->display->display_options['filters']['mv_table']['table'] = 'tripal_mviews';
  381. $handler->display->display_options['filters']['mv_table']['field'] = 'mv_table';
  382. $handler->display->display_options['filters']['mv_table']['group'] = 1;
  383. $handler->display->display_options['filters']['mv_table']['exposed'] = TRUE;
  384. $handler->display->display_options['filters']['mv_table']['expose']['operator_id'] = 'mv_table_op';
  385. $handler->display->display_options['filters']['mv_table']['expose']['label'] = 'Table Name';
  386. $handler->display->display_options['filters']['mv_table']['expose']['operator'] = 'mv_table_op';
  387. $handler->display->display_options['filters']['mv_table']['expose']['identifier'] = 'mv_table';
  388. $handler->display->display_options['filters']['mv_table']['expose']['remember_roles'] = [
  389. 2 => '2',
  390. 1 => 0,
  391. 3 => 0,
  392. ];
  393. /* Filter criterion: Tripal Materialized Views: Module Name */
  394. $handler->display->display_options['filters']['modulename']['id'] = 'modulename';
  395. $handler->display->display_options['filters']['modulename']['table'] = 'tripal_mviews';
  396. $handler->display->display_options['filters']['modulename']['field'] = 'modulename';
  397. $handler->display->display_options['filters']['modulename']['group'] = 1;
  398. $handler->display->display_options['filters']['modulename']['exposed'] = TRUE;
  399. $handler->display->display_options['filters']['modulename']['expose']['operator_id'] = 'modulename_op';
  400. $handler->display->display_options['filters']['modulename']['expose']['label'] = 'Module';
  401. $handler->display->display_options['filters']['modulename']['expose']['operator'] = 'modulename_op';
  402. $handler->display->display_options['filters']['modulename']['expose']['identifier'] = 'modulename';
  403. $handler->display->display_options['filters']['modulename']['expose']['remember_roles'] = [
  404. 2 => '2',
  405. 1 => 0,
  406. 3 => 0,
  407. ];
  408. /* Filter criterion: Tripal Materialized Views: Status */
  409. $handler->display->display_options['filters']['status']['id'] = 'status';
  410. $handler->display->display_options['filters']['status']['table'] = 'tripal_mviews';
  411. $handler->display->display_options['filters']['status']['field'] = 'status';
  412. $handler->display->display_options['filters']['status']['group'] = 1;
  413. $handler->display->display_options['filters']['status']['exposed'] = TRUE;
  414. $handler->display->display_options['filters']['status']['expose']['operator_id'] = 'status_op';
  415. $handler->display->display_options['filters']['status']['expose']['label'] = 'Status';
  416. $handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';
  417. $handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
  418. $handler->display->display_options['filters']['status']['expose']['remember_roles'] = [
  419. 2 => '2',
  420. 1 => 0,
  421. 3 => 0,
  422. ];
  423. /* Display: Page */
  424. $handler = $view->new_display('page', 'Page', 'page');
  425. $handler->display->display_options['path'] = 'admin/tripal/storage/chado/mviews/mviews';
  426. $handler->display->display_options['menu']['type'] = 'default tab';
  427. $handler->display->display_options['menu']['title'] = 'Materialized Views';
  428. $handler->display->display_options['menu']['description'] = 'a list of mviews';
  429. $handler->display->display_options['menu']['weight'] = '-10';
  430. $handler->display->display_options['menu']['name'] = 'management';
  431. $handler->display->display_options['menu']['context'] = 0;
  432. $handler->display->display_options['menu']['context_only_inline'] = 0;
  433. $handler->display->display_options['tab_options']['weight'] = '0';
  434. return $view;
  435. }
  436. /**
  437. * Default Admin View for cv management
  438. *
  439. * @ingroup tripal_cv
  440. */
  441. function tripal_chado_defaultview_admin_cvs_listing() {
  442. $view = new view();
  443. $view->name = 'tripal_cv_admin_cvs';
  444. $view->description = 'DO NOT DISABLE';
  445. $view->tag = 'tripal admin';
  446. $view->base_table = 'cv';
  447. $view->human_name = 'CVs Admin';
  448. $view->core = 6;
  449. $view->api_version = '3.0';
  450. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  451. /* Display: Defaults */
  452. $handler = $view->new_display('default', 'Defaults', 'default');
  453. $handler->display->display_options['title'] = 'Controlled Vocabularies';
  454. $handler->display->display_options['use_more_always'] = FALSE;
  455. $handler->display->display_options['access']['type'] = 'perm';
  456. $handler->display->display_options['access']['perm'] = 'administer tripal';
  457. $handler->display->display_options['cache']['type'] = 'none';
  458. $handler->display->display_options['query']['type'] = 'views_query';
  459. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  460. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  461. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of controlled vocabularies that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of vocabularies or to find a specific vocabulary.';
  462. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  463. $handler->display->display_options['pager']['type'] = 'full';
  464. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  465. $handler->display->display_options['pager']['options']['offset'] = '0';
  466. $handler->display->display_options['pager']['options']['id'] = '0';
  467. $handler->display->display_options['pager']['options']['quantity'] = '9';
  468. $handler->display->display_options['style_plugin'] = 'table';
  469. $handler->display->display_options['style_options']['grouping'] = '';
  470. $handler->display->display_options['style_options']['columns'] = [
  471. 'name' => 'name',
  472. 'definition' => 'definition',
  473. 'nothing' => 'nothing',
  474. ];
  475. $handler->display->display_options['style_options']['default'] = 'name';
  476. $handler->display->display_options['style_options']['info'] = [
  477. 'name' => [
  478. 'sortable' => 1,
  479. 'separator' => '',
  480. ],
  481. 'definition' => [
  482. 'sortable' => 0,
  483. 'separator' => '',
  484. ],
  485. 'nothing' => [
  486. 'separator' => '',
  487. ],
  488. ];
  489. /* Header: Global: Action Links */
  490. $handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
  491. $handler->display->display_options['header']['action_links_area']['table'] = 'views';
  492. $handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
  493. $handler->display->display_options['header']['action_links_area']['label'] = 'Action Links';
  494. $handler->display->display_options['header']['action_links_area']['empty'] = TRUE;
  495. $handler->display->display_options['header']['action_links_area']['link-1'] = [
  496. 'label-1' => 'Add Vocabulary',
  497. 'path-1' => 'admin/tripal/loaders/chado_vocabs/chado_cv/add',
  498. ];
  499. /* No results behavior: Global: Text area */
  500. $handler->display->display_options['empty']['text']['id'] = 'area';
  501. $handler->display->display_options['empty']['text']['table'] = 'views';
  502. $handler->display->display_options['empty']['text']['field'] = 'area';
  503. $handler->display->display_options['empty']['text']['content'] = 'No controlled vocabularies match the supplied criteria.';
  504. $handler->display->display_options['empty']['text']['format'] = '2';
  505. /* Field: Chado Cv: Cv Id */
  506. $handler->display->display_options['fields']['cv_id']['id'] = 'cv_id';
  507. $handler->display->display_options['fields']['cv_id']['table'] = 'cv';
  508. $handler->display->display_options['fields']['cv_id']['field'] = 'cv_id';
  509. $handler->display->display_options['fields']['cv_id']['exclude'] = TRUE;
  510. $handler->display->display_options['fields']['cv_id']['separator'] = '';
  511. /* Field: Chado Cv: Name */
  512. $handler->display->display_options['fields']['name']['id'] = 'name';
  513. $handler->display->display_options['fields']['name']['table'] = 'cv';
  514. $handler->display->display_options['fields']['name']['field'] = 'name';
  515. /* Field: Chado Cv: Definition */
  516. $handler->display->display_options['fields']['definition']['id'] = 'definition';
  517. $handler->display->display_options['fields']['definition']['table'] = 'cv';
  518. $handler->display->display_options['fields']['definition']['field'] = 'definition';
  519. /* Field: Global: Custom text */
  520. $handler->display->display_options['fields']['nothing_1']['id'] = 'nothing_1';
  521. $handler->display->display_options['fields']['nothing_1']['table'] = 'views';
  522. $handler->display->display_options['fields']['nothing_1']['field'] = 'nothing';
  523. $handler->display->display_options['fields']['nothing_1']['label'] = 'Edit Link';
  524. $handler->display->display_options['fields']['nothing_1']['exclude'] = TRUE;
  525. $handler->display->display_options['fields']['nothing_1']['alter']['text'] = 'edit';
  526. $handler->display->display_options['fields']['nothing_1']['alter']['make_link'] = TRUE;
  527. $handler->display->display_options['fields']['nothing_1']['alter']['path'] = 'admin/tripal/loaders/chado_vocabs/chado_cv/edit/[cv_id]';
  528. /* Field: Global: Custom text */
  529. $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
  530. $handler->display->display_options['fields']['nothing']['table'] = 'views';
  531. $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
  532. $handler->display->display_options['fields']['nothing']['label'] = 'View Terms link';
  533. $handler->display->display_options['fields']['nothing']['exclude'] = TRUE;
  534. $handler->display->display_options['fields']['nothing']['alter']['text'] = 'View Terms';
  535. $handler->display->display_options['fields']['nothing']['alter']['make_link'] = TRUE;
  536. $handler->display->display_options['fields']['nothing']['alter']['path'] = 'admin/tripal/loaders/chado_vocabs/chado_cvterms?cv=[name]';
  537. $handler->display->display_options['fields']['nothing']['hide_alter_empty'] = TRUE;
  538. /* Field: Global: Custom text */
  539. $handler->display->display_options['fields']['nothing_3']['id'] = 'nothing_3';
  540. $handler->display->display_options['fields']['nothing_3']['table'] = 'views';
  541. $handler->display->display_options['fields']['nothing_3']['field'] = 'nothing';
  542. $handler->display->display_options['fields']['nothing_3']['label'] = 'Add term';
  543. $handler->display->display_options['fields']['nothing_3']['exclude'] = TRUE;
  544. $handler->display->display_options['fields']['nothing_3']['alter']['text'] = 'Add Term';
  545. $handler->display->display_options['fields']['nothing_3']['alter']['make_link'] = TRUE;
  546. $handler->display->display_options['fields']['nothing_3']['alter']['path'] = 'aadmin/tripal/loaders/chado_vocabs/chado_cv/[cv_id]/cvterm/add';
  547. /* Field: Global: Custom text */
  548. $handler->display->display_options['fields']['nothing_2']['id'] = 'nothing_2';
  549. $handler->display->display_options['fields']['nothing_2']['table'] = 'views';
  550. $handler->display->display_options['fields']['nothing_2']['field'] = 'nothing';
  551. $handler->display->display_options['fields']['nothing_2']['label'] = '';
  552. $handler->display->display_options['fields']['nothing_2']['alter']['text'] = '[nothing_1]<br />
  553. [nothing] [nothing_3]';
  554. $handler->display->display_options['fields']['nothing_2']['element_class'] = 'short-column';
  555. $handler->display->display_options['fields']['nothing_2']['element_label_class'] = 'short-column';
  556. $handler->display->display_options['fields']['nothing_2']['element_label_colon'] = FALSE;
  557. /* Sort criterion: Chado Cv: Name */
  558. $handler->display->display_options['sorts']['name']['id'] = 'name';
  559. $handler->display->display_options['sorts']['name']['table'] = 'cv';
  560. $handler->display->display_options['sorts']['name']['field'] = 'name';
  561. /* Filter criterion: Chado Cv: Name */
  562. $handler->display->display_options['filters']['name']['id'] = 'name';
  563. $handler->display->display_options['filters']['name']['table'] = 'cv';
  564. $handler->display->display_options['filters']['name']['field'] = 'name';
  565. $handler->display->display_options['filters']['name']['operator'] = 'contains';
  566. $handler->display->display_options['filters']['name']['group'] = '0';
  567. $handler->display->display_options['filters']['name']['exposed'] = TRUE;
  568. $handler->display->display_options['filters']['name']['expose']['operator_id'] = 'name_op';
  569. $handler->display->display_options['filters']['name']['expose']['label'] = 'Name Contains';
  570. $handler->display->display_options['filters']['name']['expose']['operator'] = 'name_op';
  571. $handler->display->display_options['filters']['name']['expose']['identifier'] = 'name';
  572. $handler->display->display_options['filters']['name']['expose']['remember_roles'] = [
  573. 2 => '2',
  574. 1 => 0,
  575. 3 => 0,
  576. ];
  577. /* Filter criterion: Chado Cv: Definition */
  578. $handler->display->display_options['filters']['definition']['id'] = 'definition';
  579. $handler->display->display_options['filters']['definition']['table'] = 'cv';
  580. $handler->display->display_options['filters']['definition']['field'] = 'definition';
  581. $handler->display->display_options['filters']['definition']['operator'] = 'contains';
  582. $handler->display->display_options['filters']['definition']['group'] = '0';
  583. $handler->display->display_options['filters']['definition']['exposed'] = TRUE;
  584. $handler->display->display_options['filters']['definition']['expose']['operator_id'] = 'definition_op';
  585. $handler->display->display_options['filters']['definition']['expose']['label'] = 'Definition Contains';
  586. $handler->display->display_options['filters']['definition']['expose']['operator'] = 'definition_op';
  587. $handler->display->display_options['filters']['definition']['expose']['identifier'] = 'definition';
  588. $handler->display->display_options['filters']['definition']['expose']['remember_roles'] = [
  589. 2 => '2',
  590. 1 => 0,
  591. 3 => 0,
  592. ];
  593. /** MANUALLY ADD since filter handler not exporting correctly */
  594. $handler->display->display_options['filters']['name']['expose']['values_form_type'] = 'textfield';
  595. $handler->display->display_options['filters']['name']['expose']['select_multiple'] = FALSE;
  596. $handler->display->display_options['filters']['name']['expose']['select_optional'] = FALSE;
  597. $handler->display->display_options['filters']['name']['expose']['max_length'] = 40;
  598. /* Display: Page */
  599. $handler = $view->new_display('page', 'Page', 'page_1');
  600. $handler->display->display_options['path'] = 'admin/tripal/loaders/chado_vocabs/chado_cvs';
  601. $handler->display->display_options['menu']['type'] = 'default tab';
  602. $handler->display->display_options['menu']['title'] = 'Chado Controlled Vocabularies';
  603. $handler->display->display_options['menu']['description'] = 'A listing of all controlled vocabularies';
  604. $handler->display->display_options['menu']['weight'] = '-10';
  605. $handler->display->display_options['menu']['name'] = 'management';
  606. $handler->display->display_options['menu']['context'] = 0;
  607. $handler->display->display_options['menu']['context_only_inline'] = 0;
  608. $handler->display->display_options['tab_options']['weight'] = '0';
  609. /** MANUALLY ADD since filter handler no exporting correctly
  610. * $handler->display->display_options['filters']['name']['expose']['values_form_type'] = 'textfield';
  611. * $handler->display->display_options['filters']['name']['expose']['select_multiple'] = FALSE;
  612. * $handler->display->display_options['filters']['name']['expose']['select_optional'] = FALSE;
  613. * $handler->display->display_options['filters']['name']['expose']['max_length'] = 40;
  614. */
  615. return $view;
  616. }
  617. /**
  618. * Default Admin View for cvterm management
  619. *
  620. * @ingroup tripal_cv
  621. */
  622. function tripal_chado_defaultview_admin_cvterms_listing() {
  623. $view = new view();
  624. $view->name = 'tripal_cv_admin_cvterms';
  625. $view->description = 'DO NOT DISABLE';
  626. $view->tag = 'tripal admin';
  627. $view->base_table = 'cvterm';
  628. $view->human_name = 'CV Terms Admin';
  629. $view->core = 0;
  630. $view->api_version = '3.0';
  631. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  632. /* Display: Defaults */
  633. $handler = $view->new_display('default', 'Defaults', 'default');
  634. $handler->display->display_options['title'] = 'Controlled Vocabulary Terms';
  635. $handler->display->display_options['use_more_always'] = FALSE;
  636. $handler->display->display_options['access']['type'] = 'perm';
  637. $handler->display->display_options['access']['perm'] = 'administer tripal';
  638. $handler->display->display_options['cache']['type'] = 'none';
  639. $handler->display->display_options['query']['type'] = 'views_query';
  640. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  641. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  642. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of controlled vocabulary terms that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of terms or to find a specific term.';
  643. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  644. $handler->display->display_options['pager']['type'] = 'full';
  645. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  646. $handler->display->display_options['pager']['options']['offset'] = '0';
  647. $handler->display->display_options['pager']['options']['id'] = '0';
  648. $handler->display->display_options['pager']['options']['quantity'] = '9';
  649. $handler->display->display_options['style_plugin'] = 'table';
  650. $handler->display->display_options['style_options']['grouping'] = '';
  651. $handler->display->display_options['style_options']['columns'] = [
  652. 'name_1' => 'name_1',
  653. 'name' => 'name',
  654. 'definition' => 'definition',
  655. 'is_obsolete' => 'is_obsolete',
  656. 'is_relationshiptype' => 'is_relationshiptype',
  657. ];
  658. $handler->display->display_options['style_options']['default'] = '-1';
  659. $handler->display->display_options['style_options']['info'] = [
  660. 'name_1' => [
  661. 'sortable' => 1,
  662. 'separator' => '',
  663. ],
  664. 'name' => [
  665. 'sortable' => 1,
  666. 'separator' => '',
  667. ],
  668. 'definition' => [
  669. 'sortable' => 0,
  670. 'separator' => '',
  671. ],
  672. 'is_obsolete' => [
  673. 'sortable' => 1,
  674. 'separator' => '',
  675. ],
  676. 'is_relationshiptype' => [
  677. 'sortable' => 1,
  678. 'separator' => '',
  679. ],
  680. ];
  681. /* Header: Global: Action Links */
  682. $handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
  683. $handler->display->display_options['header']['action_links_area']['table'] = 'views';
  684. $handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
  685. $handler->display->display_options['header']['action_links_area']['label'] = 'Action Links';
  686. $handler->display->display_options['header']['action_links_area']['empty'] = TRUE;
  687. $handler->display->display_options['header']['action_links_area']['link-1'] = [
  688. 'label-1' => 'Add Term',
  689. 'path-1' => 'admin/tripal/loaders/chado_vocabs/chado_cv/cvterm/add',
  690. ];
  691. /* No results behavior: Global: Text area */
  692. $handler->display->display_options['empty']['text']['id'] = 'area';
  693. $handler->display->display_options['empty']['text']['table'] = 'views';
  694. $handler->display->display_options['empty']['text']['field'] = 'area';
  695. $handler->display->display_options['empty']['text']['content'] = 'There are no terms associated with the selected controlled vocabulary. Please select a different vocabulary from the list above.';
  696. $handler->display->display_options['empty']['text']['format'] = '1';
  697. /* Field: Chado Cv: Cv Id */
  698. $handler->display->display_options['fields']['cv_id']['id'] = 'cv_id';
  699. $handler->display->display_options['fields']['cv_id']['table'] = 'cv';
  700. $handler->display->display_options['fields']['cv_id']['field'] = 'cv_id';
  701. $handler->display->display_options['fields']['cv_id']['exclude'] = TRUE;
  702. $handler->display->display_options['fields']['cv_id']['separator'] = '';
  703. /* Field: Chado Cv: Name */
  704. $handler->display->display_options['fields']['name_1']['id'] = 'name_1';
  705. $handler->display->display_options['fields']['name_1']['table'] = 'cv';
  706. $handler->display->display_options['fields']['name_1']['field'] = 'name';
  707. $handler->display->display_options['fields']['name_1']['label'] = 'Vocabulary';
  708. $handler->display->display_options['fields']['name_1']['alter']['make_link'] = TRUE;
  709. $handler->display->display_options['fields']['name_1']['alter']['path'] = 'admin/tripal/loaders/chado_vocabs/chado_cvs?name=[name_1]';
  710. /* Field: Chado Cvterm: Cvterm Id */
  711. $handler->display->display_options['fields']['cvterm_id']['id'] = 'cvterm_id';
  712. $handler->display->display_options['fields']['cvterm_id']['table'] = 'cvterm';
  713. $handler->display->display_options['fields']['cvterm_id']['field'] = 'cvterm_id';
  714. $handler->display->display_options['fields']['cvterm_id']['exclude'] = TRUE;
  715. $handler->display->display_options['fields']['cvterm_id']['separator'] = '';
  716. /* Field: Chado Cvterm: Name */
  717. $handler->display->display_options['fields']['name']['id'] = 'name';
  718. $handler->display->display_options['fields']['name']['table'] = 'cvterm';
  719. $handler->display->display_options['fields']['name']['field'] = 'name';
  720. /* Field: Chado Cvterm: Definition */
  721. $handler->display->display_options['fields']['definition']['id'] = 'definition';
  722. $handler->display->display_options['fields']['definition']['table'] = 'cvterm';
  723. $handler->display->display_options['fields']['definition']['field'] = 'definition';
  724. $handler->display->display_options['fields']['definition']['element_class'] = 'wide-column';
  725. $handler->display->display_options['fields']['definition']['element_label_class'] = 'wide-column';
  726. /* Field: Chado Cvterm: Is Obsolete */
  727. $handler->display->display_options['fields']['is_obsolete']['id'] = 'is_obsolete';
  728. $handler->display->display_options['fields']['is_obsolete']['table'] = 'cvterm';
  729. $handler->display->display_options['fields']['is_obsolete']['field'] = 'is_obsolete';
  730. $handler->display->display_options['fields']['is_obsolete']['label'] = 'Obsolete?';
  731. $handler->display->display_options['fields']['is_obsolete']['alter']['alter_text'] = TRUE;
  732. $handler->display->display_options['fields']['is_obsolete']['alter']['text'] = 'Yes';
  733. $handler->display->display_options['fields']['is_obsolete']['element_class'] = 'short-column';
  734. $handler->display->display_options['fields']['is_obsolete']['element_label_class'] = 'short-column';
  735. $handler->display->display_options['fields']['is_obsolete']['empty'] = 'No';
  736. $handler->display->display_options['fields']['is_obsolete']['empty_zero'] = TRUE;
  737. $handler->display->display_options['fields']['is_obsolete']['separator'] = '';
  738. /* Field: Chado Cvterm: Is Relationshiptype */
  739. $handler->display->display_options['fields']['is_relationshiptype']['id'] = 'is_relationshiptype';
  740. $handler->display->display_options['fields']['is_relationshiptype']['table'] = 'cvterm';
  741. $handler->display->display_options['fields']['is_relationshiptype']['field'] = 'is_relationshiptype';
  742. $handler->display->display_options['fields']['is_relationshiptype']['label'] = 'Relation-ship?';
  743. $handler->display->display_options['fields']['is_relationshiptype']['alter']['alter_text'] = TRUE;
  744. $handler->display->display_options['fields']['is_relationshiptype']['alter']['text'] = 'Yes';
  745. $handler->display->display_options['fields']['is_relationshiptype']['element_class'] = 'short-column';
  746. $handler->display->display_options['fields']['is_relationshiptype']['element_label_class'] = 'short-column';
  747. $handler->display->display_options['fields']['is_relationshiptype']['empty'] = 'No';
  748. $handler->display->display_options['fields']['is_relationshiptype']['empty_zero'] = TRUE;
  749. $handler->display->display_options['fields']['is_relationshiptype']['separator'] = '';
  750. /* Field: Global: Custom text */
  751. $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
  752. $handler->display->display_options['fields']['nothing']['table'] = 'views';
  753. $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
  754. $handler->display->display_options['fields']['nothing']['label'] = 'Edit Link';
  755. $handler->display->display_options['fields']['nothing']['exclude'] = TRUE;
  756. $handler->display->display_options['fields']['nothing']['alter']['text'] = 'edit';
  757. $handler->display->display_options['fields']['nothing']['alter']['make_link'] = TRUE;
  758. $handler->display->display_options['fields']['nothing']['alter']['path'] = 'admin/tripal/loaders/chado_vocabs/chado_cv/[cv_id]/cvterm/edit/[cvterm_id]';
  759. /* Field: Global: Custom text */
  760. $handler->display->display_options['fields']['nothing_1']['id'] = 'nothing_1';
  761. $handler->display->display_options['fields']['nothing_1']['table'] = 'views';
  762. $handler->display->display_options['fields']['nothing_1']['field'] = 'nothing';
  763. $handler->display->display_options['fields']['nothing_1']['label'] = '';
  764. $handler->display->display_options['fields']['nothing_1']['alter']['text'] = '[nothing]';
  765. $handler->display->display_options['fields']['nothing_1']['element_class'] = 'short-column';
  766. $handler->display->display_options['fields']['nothing_1']['element_label_class'] = 'short-column';
  767. $handler->display->display_options['fields']['nothing_1']['element_label_colon'] = FALSE;
  768. /* Sort criterion: Chado Cv: Name */
  769. $handler->display->display_options['sorts']['name']['id'] = 'name';
  770. $handler->display->display_options['sorts']['name']['table'] = 'cv';
  771. $handler->display->display_options['sorts']['name']['field'] = 'name';
  772. /* Sort criterion: Chado Cvterm: Name */
  773. $handler->display->display_options['sorts']['name_1']['id'] = 'name_1';
  774. $handler->display->display_options['sorts']['name_1']['table'] = 'cvterm';
  775. $handler->display->display_options['sorts']['name_1']['field'] = 'name';
  776. /* Filter criterion: Chado Cv: Name */
  777. $handler->display->display_options['filters']['name']['id'] = 'name';
  778. $handler->display->display_options['filters']['name']['table'] = 'cv';
  779. $handler->display->display_options['filters']['name']['field'] = 'name';
  780. $handler->display->display_options['filters']['name']['value'] = 'All';
  781. $handler->display->display_options['filters']['name']['group'] = '0';
  782. $handler->display->display_options['filters']['name']['exposed'] = TRUE;
  783. $handler->display->display_options['filters']['name']['expose']['operator_id'] = 'name_op';
  784. $handler->display->display_options['filters']['name']['expose']['label'] = 'Vocabulary';
  785. $handler->display->display_options['filters']['name']['expose']['operator'] = 'name_op';
  786. $handler->display->display_options['filters']['name']['expose']['identifier'] = 'cv';
  787. $handler->display->display_options['filters']['name']['expose']['remember_roles'] = [
  788. 2 => '2',
  789. 1 => 0,
  790. 3 => 0,
  791. ];
  792. $handler->display->display_options['filters']['name']['values_form_type'] = 'select';
  793. $handler->display->display_options['filters']['name']['select_optional'] = TRUE;
  794. /* Filter criterion: Chado Cvterm: Name */
  795. $handler->display->display_options['filters']['name_1']['id'] = 'name_1';
  796. $handler->display->display_options['filters']['name_1']['table'] = 'cvterm';
  797. $handler->display->display_options['filters']['name_1']['field'] = 'name';
  798. $handler->display->display_options['filters']['name_1']['operator'] = 'contains';
  799. $handler->display->display_options['filters']['name_1']['group'] = '0';
  800. $handler->display->display_options['filters']['name_1']['exposed'] = TRUE;
  801. $handler->display->display_options['filters']['name_1']['expose']['operator_id'] = '';
  802. $handler->display->display_options['filters']['name_1']['expose']['label'] = 'Name Contains';
  803. $handler->display->display_options['filters']['name_1']['expose']['identifier'] = 'name';
  804. $handler->display->display_options['filters']['name_1']['expose']['remember_roles'] = [
  805. 2 => '2',
  806. 1 => 0,
  807. 3 => 0,
  808. ];
  809. /* Filter criterion: Chado Cvterm: Definition */
  810. $handler->display->display_options['filters']['definition']['id'] = 'definition';
  811. $handler->display->display_options['filters']['definition']['table'] = 'cvterm';
  812. $handler->display->display_options['filters']['definition']['field'] = 'definition';
  813. $handler->display->display_options['filters']['definition']['operator'] = 'contains';
  814. $handler->display->display_options['filters']['definition']['group'] = '0';
  815. $handler->display->display_options['filters']['definition']['exposed'] = TRUE;
  816. $handler->display->display_options['filters']['definition']['expose']['operator_id'] = 'definition_op';
  817. $handler->display->display_options['filters']['definition']['expose']['label'] = 'Definition Contains';
  818. $handler->display->display_options['filters']['definition']['expose']['operator'] = 'definition_op';
  819. $handler->display->display_options['filters']['definition']['expose']['identifier'] = 'definition';
  820. $handler->display->display_options['filters']['definition']['expose']['remember_roles'] = [
  821. 2 => '2',
  822. 1 => 0,
  823. 3 => 0,
  824. ];
  825. /* Display: Page */
  826. $handler = $view->new_display('page', 'Page', 'page_1');
  827. $handler->display->display_options['path'] = 'admin/tripal/loaders/chado_vocabs/chado_cvterms';
  828. $handler->display->display_options['menu']['type'] = 'normal';
  829. $handler->display->display_options['menu']['title'] = 'Manage Chado CV Terms';
  830. $handler->display->display_options['menu']['description'] = 'View, edit and add controlled vocabulary terms.';
  831. $handler->display->display_options['menu']['weight'] = '-8';
  832. $handler->display->display_options['menu']['name'] = 'management';
  833. $handler->display->display_options['menu']['context'] = 0;
  834. $handler->display->display_options['menu']['context_only_inline'] = 0;
  835. return $view;
  836. }
  837. /**
  838. * Default Admin View for db management
  839. *
  840. * @ingroup tripal_db
  841. */
  842. function tripal_chado_defaultview_admin_db_listing() {
  843. $view = new view();
  844. $view->name = 'tripal_db_admin_dbs';
  845. $view->description = 'DO NOT DISABLE';
  846. $view->tag = 'tripal admin';
  847. $view->base_table = 'db';
  848. $view->human_name = 'DB Admin';
  849. $view->core = 6;
  850. $view->api_version = '3.0';
  851. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  852. /* Display: Defaults */
  853. $handler = $view->new_display('default', 'Defaults', 'default');
  854. $handler->display->display_options['title'] = 'Databases';
  855. $handler->display->display_options['use_more_always'] = FALSE;
  856. $handler->display->display_options['access']['type'] = 'perm';
  857. $handler->display->display_options['access']['perm'] = 'administer db cross-references';
  858. $handler->display->display_options['cache']['type'] = 'none';
  859. $handler->display->display_options['query']['type'] = 'views_query';
  860. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  861. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  862. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of external databases that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of databases or to find a specific database.';
  863. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  864. $handler->display->display_options['pager']['type'] = 'full';
  865. $handler->display->display_options['pager']['options']['items_per_page'] = '50';
  866. $handler->display->display_options['pager']['options']['offset'] = '0';
  867. $handler->display->display_options['pager']['options']['id'] = '0';
  868. $handler->display->display_options['pager']['options']['quantity'] = '9';
  869. $handler->display->display_options['style_plugin'] = 'table';
  870. $handler->display->display_options['style_options']['grouping'] = '';
  871. $handler->display->display_options['style_options']['columns'] = [
  872. 'name' => 'name',
  873. 'url' => 'url',
  874. 'urlprefix' => 'urlprefix',
  875. 'description' => 'description',
  876. ];
  877. $handler->display->display_options['style_options']['default'] = 'name';
  878. $handler->display->display_options['style_options']['info'] = [
  879. 'name' => [
  880. 'sortable' => 1,
  881. 'separator' => '',
  882. ],
  883. 'description' => [
  884. 'sortable' => 0,
  885. 'separator' => '',
  886. ],
  887. ];
  888. /* Header: Global: Action Links */
  889. $handler->display->display_options['header']['action_links_area']['id'] = 'action_links_area';
  890. $handler->display->display_options['header']['action_links_area']['table'] = 'views';
  891. $handler->display->display_options['header']['action_links_area']['field'] = 'action_links_area';
  892. $handler->display->display_options['header']['action_links_area']['label'] = 'Action Links';
  893. $handler->display->display_options['header']['action_links_area']['empty'] = TRUE;
  894. $handler->display->display_options['header']['action_links_area']['link-1'] = [
  895. 'label-1' => 'Add Database',
  896. 'path-1' => 'admin/tripal/loaders/chado_db/add',
  897. ];
  898. /* No results behavior: Global: Text area */
  899. $handler->display->display_options['empty']['text']['id'] = 'area';
  900. $handler->display->display_options['empty']['text']['table'] = 'views';
  901. $handler->display->display_options['empty']['text']['field'] = 'area';
  902. $handler->display->display_options['empty']['text']['content'] = 'No databases match the supplied criteria.';
  903. $handler->display->display_options['empty']['text']['format'] = '2';
  904. /* Field: Chado Db: Db Id */
  905. $handler->display->display_options['fields']['db_id']['id'] = 'db_id';
  906. $handler->display->display_options['fields']['db_id']['table'] = 'db';
  907. $handler->display->display_options['fields']['db_id']['field'] = 'db_id';
  908. $handler->display->display_options['fields']['db_id']['exclude'] = TRUE;
  909. $handler->display->display_options['fields']['db_id']['separator'] = '';
  910. /* Field: Chado Db: Name */
  911. $handler->display->display_options['fields']['name']['id'] = 'name';
  912. $handler->display->display_options['fields']['name']['table'] = 'db';
  913. $handler->display->display_options['fields']['name']['field'] = 'name';
  914. /* Field: Chado Db: Description */
  915. $handler->display->display_options['fields']['description']['id'] = 'description';
  916. $handler->display->display_options['fields']['description']['table'] = 'db';
  917. $handler->display->display_options['fields']['description']['field'] = 'description';
  918. /* Field: Global: Custom text */
  919. $handler->display->display_options['fields']['nothing']['id'] = 'nothing';
  920. $handler->display->display_options['fields']['nothing']['table'] = 'views';
  921. $handler->display->display_options['fields']['nothing']['field'] = 'nothing';
  922. $handler->display->display_options['fields']['nothing']['label'] = 'Edit Link';
  923. $handler->display->display_options['fields']['nothing']['exclude'] = TRUE;
  924. $handler->display->display_options['fields']['nothing']['alter']['text'] = 'edit';
  925. $handler->display->display_options['fields']['nothing']['alter']['make_link'] = TRUE;
  926. $handler->display->display_options['fields']['nothing']['alter']['path'] = 'admin/tripal/loaders/chado_db/edit/[db_id]';
  927. /* Field: Global: Custom text */
  928. $handler->display->display_options['fields']['nothing_1']['id'] = 'nothing_1';
  929. $handler->display->display_options['fields']['nothing_1']['table'] = 'views';
  930. $handler->display->display_options['fields']['nothing_1']['field'] = 'nothing';
  931. $handler->display->display_options['fields']['nothing_1']['label'] = 'View DBxrefs';
  932. $handler->display->display_options['fields']['nothing_1']['exclude'] = TRUE;
  933. $handler->display->display_options['fields']['nothing_1']['alter']['text'] = 'items';
  934. $handler->display->display_options['fields']['nothing_1']['alter']['make_link'] = TRUE;
  935. $handler->display->display_options['fields']['nothing_1']['alter']['path'] = 'admin/tripal/loaders/chado_db/dbxrefs?db_name=[name]';
  936. /* Field: Global: Custom text */
  937. $handler->display->display_options['fields']['nothing_2']['id'] = 'nothing_2';
  938. $handler->display->display_options['fields']['nothing_2']['table'] = 'views';
  939. $handler->display->display_options['fields']['nothing_2']['field'] = 'nothing';
  940. $handler->display->display_options['fields']['nothing_2']['label'] = 'Actions';
  941. $handler->display->display_options['fields']['nothing_2']['alter']['text'] = '[nothing] | [nothing_1]';
  942. $handler->display->display_options['fields']['nothing_2']['element_label_colon'] = FALSE;
  943. /* Filter criterion: Chado Db: Name */
  944. $handler->display->display_options['filters']['name']['id'] = 'name';
  945. $handler->display->display_options['filters']['name']['table'] = 'db';
  946. $handler->display->display_options['filters']['name']['field'] = 'name';
  947. $handler->display->display_options['filters']['name']['operator'] = 'contains';
  948. $handler->display->display_options['filters']['name']['group'] = '0';
  949. $handler->display->display_options['filters']['name']['exposed'] = TRUE;
  950. $handler->display->display_options['filters']['name']['expose']['operator_id'] = 'name_op';
  951. $handler->display->display_options['filters']['name']['expose']['label'] = 'Name Contains';
  952. $handler->display->display_options['filters']['name']['expose']['operator'] = 'name_op';
  953. $handler->display->display_options['filters']['name']['expose']['identifier'] = 'name';
  954. $handler->display->display_options['filters']['name']['expose']['remember_roles'] = [
  955. 2 => '2',
  956. 1 => 0,
  957. 3 => 0,
  958. ];
  959. /* Filter criterion: Chado Db: Description */
  960. $handler->display->display_options['filters']['description']['id'] = 'description';
  961. $handler->display->display_options['filters']['description']['table'] = 'db';
  962. $handler->display->display_options['filters']['description']['field'] = 'description';
  963. $handler->display->display_options['filters']['description']['operator'] = 'contains';
  964. $handler->display->display_options['filters']['description']['group'] = '0';
  965. $handler->display->display_options['filters']['description']['exposed'] = TRUE;
  966. $handler->display->display_options['filters']['description']['expose']['operator_id'] = 'description_op';
  967. $handler->display->display_options['filters']['description']['expose']['label'] = 'Description Contains';
  968. $handler->display->display_options['filters']['description']['expose']['operator'] = 'description_op';
  969. $handler->display->display_options['filters']['description']['expose']['identifier'] = 'description';
  970. $handler->display->display_options['filters']['description']['expose']['remember_roles'] = [
  971. 2 => '2',
  972. 1 => 0,
  973. 3 => 0,
  974. ];
  975. /* Display: Page */
  976. $handler = $view->new_display('page', 'Page', 'page_1');
  977. $handler->display->display_options['path'] = 'admin/tripal/loaders/chado_db/dbs';
  978. $handler->display->display_options['menu']['type'] = 'default tab';
  979. $handler->display->display_options['menu']['title'] = 'Databases';
  980. $handler->display->display_options['menu']['description'] = 'Lists all databases available to create database references for.';
  981. $handler->display->display_options['menu']['weight'] = '-8';
  982. $handler->display->display_options['menu']['name'] = 'management';
  983. $handler->display->display_options['menu']['context'] = 0;
  984. $handler->display->display_options['menu']['context_only_inline'] = 0;
  985. $handler->display->display_options['tab_options']['weight'] = '0';
  986. return $view;
  987. }
  988. /**
  989. * Default Admin View for dbxref management
  990. *
  991. * @ingroup tripal_db
  992. */
  993. function tripal_chado_defaultview_admin_dbxref_listing() {
  994. $view = new view();
  995. $view->name = 'tripal_db_admin_dbxrefs';
  996. $view->description = 'DO NOT DISABLE';
  997. $view->tag = 'tripal admin';
  998. $view->base_table = 'dbxref';
  999. $view->human_name = 'DB Reference Admin';
  1000. $view->core = 7;
  1001. $view->api_version = '3.0';
  1002. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  1003. /* Display: Master */
  1004. $handler = $view->new_display('default', 'Master', 'default');
  1005. $handler->display->display_options['title'] = 'DB Reference Admin';
  1006. $handler->display->display_options['use_more_always'] = FALSE;
  1007. $handler->display->display_options['access']['type'] = 'perm';
  1008. $handler->display->display_options['access']['perm'] = 'administer db cross-references';
  1009. $handler->display->display_options['cache']['type'] = 'none';
  1010. $handler->display->display_options['query']['type'] = 'views_query';
  1011. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  1012. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  1013. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of external database references that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of references or to find a specific reference.';
  1014. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  1015. $handler->display->display_options['pager']['type'] = 'full';
  1016. $handler->display->display_options['pager']['options']['items_per_page'] = '50';
  1017. $handler->display->display_options['style_plugin'] = 'table';
  1018. $handler->display->display_options['style_options']['columns'] = [
  1019. 'dbxref_id' => 'dbxref_id',
  1020. 'name' => 'name',
  1021. 'accession' => 'accession',
  1022. 'description' => 'description',
  1023. 'version' => 'version',
  1024. ];
  1025. $handler->display->display_options['style_options']['default'] = '-1';
  1026. $handler->display->display_options['style_options']['info'] = [
  1027. 'dbxref_id' => [
  1028. 'sortable' => 0,
  1029. 'default_sort_order' => 'asc',
  1030. 'align' => '',
  1031. 'separator' => '',
  1032. 'empty_column' => 0,
  1033. ],
  1034. 'name' => [
  1035. 'sortable' => 1,
  1036. 'default_sort_order' => 'asc',
  1037. 'align' => '',
  1038. 'separator' => '',
  1039. 'empty_column' => 0,
  1040. ],
  1041. 'accession' => [
  1042. 'sortable' => 1,
  1043. 'default_sort_order' => 'asc',
  1044. 'align' => '',
  1045. 'separator' => '',
  1046. 'empty_column' => 0,
  1047. ],
  1048. 'description' => [
  1049. 'sortable' => 0,
  1050. 'default_sort_order' => 'asc',
  1051. 'align' => '',
  1052. 'separator' => '',
  1053. 'empty_column' => 0,
  1054. ],
  1055. 'version' => [
  1056. 'sortable' => 1,
  1057. 'default_sort_order' => 'asc',
  1058. 'align' => '',
  1059. 'separator' => '',
  1060. 'empty_column' => 0,
  1061. ],
  1062. ];
  1063. /* Field: Chado Dbxref: Dbxref Id */
  1064. $handler->display->display_options['fields']['dbxref_id']['id'] = 'dbxref_id';
  1065. $handler->display->display_options['fields']['dbxref_id']['table'] = 'dbxref';
  1066. $handler->display->display_options['fields']['dbxref_id']['field'] = 'dbxref_id';
  1067. $handler->display->display_options['fields']['dbxref_id']['exclude'] = TRUE;
  1068. $handler->display->display_options['fields']['dbxref_id']['separator'] = '';
  1069. /* Field: Chado Db: Name */
  1070. $handler->display->display_options['fields']['name']['id'] = 'name';
  1071. $handler->display->display_options['fields']['name']['table'] = 'db';
  1072. $handler->display->display_options['fields']['name']['field'] = 'name';
  1073. $handler->display->display_options['fields']['name']['label'] = 'Database';
  1074. /* Field: Chado Dbxref: Accession */
  1075. $handler->display->display_options['fields']['accession']['id'] = 'accession';
  1076. $handler->display->display_options['fields']['accession']['table'] = 'dbxref';
  1077. $handler->display->display_options['fields']['accession']['field'] = 'accession';
  1078. /* Field: Chado Dbxref: Description */
  1079. $handler->display->display_options['fields']['description']['id'] = 'description';
  1080. $handler->display->display_options['fields']['description']['table'] = 'dbxref';
  1081. $handler->display->display_options['fields']['description']['field'] = 'description';
  1082. /* Field: Chado Dbxref: Version */
  1083. $handler->display->display_options['fields']['version']['id'] = 'version';
  1084. $handler->display->display_options['fields']['version']['table'] = 'dbxref';
  1085. $handler->display->display_options['fields']['version']['field'] = 'version';
  1086. /* Sort criterion: Chado Db: Name */
  1087. $handler->display->display_options['sorts']['name']['id'] = 'name';
  1088. $handler->display->display_options['sorts']['name']['table'] = 'db';
  1089. $handler->display->display_options['sorts']['name']['field'] = 'name';
  1090. /* Sort criterion: Chado Dbxref: Accession */
  1091. $handler->display->display_options['sorts']['accession']['id'] = 'accession';
  1092. $handler->display->display_options['sorts']['accession']['table'] = 'dbxref';
  1093. $handler->display->display_options['sorts']['accession']['field'] = 'accession';
  1094. /* Sort criterion: Chado Dbxref: Version */
  1095. $handler->display->display_options['sorts']['version']['id'] = 'version';
  1096. $handler->display->display_options['sorts']['version']['table'] = 'dbxref';
  1097. $handler->display->display_options['sorts']['version']['field'] = 'version';
  1098. $handler->display->display_options['sorts']['version']['order'] = 'DESC';
  1099. /* Filter criterion: Chado Db: Name */
  1100. $handler->display->display_options['filters']['name']['id'] = 'name';
  1101. $handler->display->display_options['filters']['name']['table'] = 'db';
  1102. $handler->display->display_options['filters']['name']['field'] = 'name';
  1103. $handler->display->display_options['filters']['name']['value'] = [
  1104. 'All' => 'All',
  1105. ];
  1106. $handler->display->display_options['filters']['name']['group'] = 1;
  1107. $handler->display->display_options['filters']['name']['exposed'] = TRUE;
  1108. $handler->display->display_options['filters']['name']['expose']['operator_id'] = '';
  1109. $handler->display->display_options['filters']['name']['expose']['label'] = 'Database';
  1110. $handler->display->display_options['filters']['name']['expose']['identifier'] = 'db_name';
  1111. $handler->display->display_options['filters']['name']['expose']['values_form_type'] = 'select';
  1112. $handler->display->display_options['filters']['name']['expose']['select_multiple'] = TRUE;
  1113. $handler->display->display_options['filters']['name']['expose']['select_optional'] = TRUE;
  1114. $handler->display->display_options['filters']['name']['expose']['max_length'] = 40;
  1115. $handler->display->display_options['filters']['name']['expose']['remember_roles'] = [
  1116. 2 => '2',
  1117. 1 => 0,
  1118. 3 => 0,
  1119. ];
  1120. /* Filter criterion: Chado Dbxref: Accession */
  1121. $handler->display->display_options['filters']['accession']['id'] = 'accession';
  1122. $handler->display->display_options['filters']['accession']['table'] = 'dbxref';
  1123. $handler->display->display_options['filters']['accession']['field'] = 'accession';
  1124. $handler->display->display_options['filters']['accession']['operator'] = 'contains';
  1125. $handler->display->display_options['filters']['accession']['group'] = 1;
  1126. $handler->display->display_options['filters']['accession']['exposed'] = TRUE;
  1127. $handler->display->display_options['filters']['accession']['expose']['operator_id'] = 'accession_op';
  1128. $handler->display->display_options['filters']['accession']['expose']['label'] = 'Accession Contains';
  1129. $handler->display->display_options['filters']['accession']['expose']['operator'] = 'accession_op';
  1130. $handler->display->display_options['filters']['accession']['expose']['identifier'] = 'accession';
  1131. $handler->display->display_options['filters']['accession']['expose']['remember_roles'] = [
  1132. 2 => '2',
  1133. 1 => 0,
  1134. 3 => 0,
  1135. ];
  1136. /* Filter criterion: Chado Dbxref: Description */
  1137. $handler->display->display_options['filters']['description']['id'] = 'description';
  1138. $handler->display->display_options['filters']['description']['table'] = 'dbxref';
  1139. $handler->display->display_options['filters']['description']['field'] = 'description';
  1140. $handler->display->display_options['filters']['description']['operator'] = 'contains';
  1141. $handler->display->display_options['filters']['description']['group'] = 1;
  1142. $handler->display->display_options['filters']['description']['exposed'] = TRUE;
  1143. $handler->display->display_options['filters']['description']['expose']['operator_id'] = 'description_op';
  1144. $handler->display->display_options['filters']['description']['expose']['label'] = 'Description Contains';
  1145. $handler->display->display_options['filters']['description']['expose']['operator'] = 'description_op';
  1146. $handler->display->display_options['filters']['description']['expose']['identifier'] = 'description';
  1147. $handler->display->display_options['filters']['description']['expose']['remember_roles'] = [
  1148. 2 => '2',
  1149. 1 => 0,
  1150. 3 => 0,
  1151. ];
  1152. /* Display: Page */
  1153. $handler = $view->new_display('page', 'Page', 'page');
  1154. $handler->display->display_options['path'] = 'admin/tripal/loaders/chado_db/dbxrefs';
  1155. $handler->display->display_options['menu']['type'] = 'tab';
  1156. $handler->display->display_options['menu']['title'] = 'References';
  1157. $handler->display->display_options['menu']['weight'] = '0';
  1158. $handler->display->display_options['menu']['name'] = 'management';
  1159. $handler->display->display_options['menu']['context'] = 0;
  1160. $handler->display->display_options['menu']['context_only_inline'] = 0;
  1161. return $view;
  1162. }