tripal_natural_diversity.views.inc 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966
  1. <?php
  2. /**
  3. * @file
  4. * This file contains the basic functions for views integration of
  5. * chado/tripal_natural_diversity tables.
  6. *
  7. * Documentation on views integration can be found at
  8. * http://views2.logrus.com/doc/html/index.html.
  9. */
  10. /**
  11. * @defgroup tripal_natural_diversity_views Natural Diversity Views Integration
  12. * @ingroup views
  13. */
  14. /**
  15. * Created Default views related to the tables integrated by this module
  16. *
  17. * @ingroup tripal_natural_diversity_views
  18. */
  19. /* -- SPF Jun 13, 2013 removed as a search by ND experiment
  20. * results in a huge return list. As in the case of a genotyping
  21. * GWAS experiment where tens of thousands of SNP genotypes are
  22. * present. --
  23. function tripal_natural_diversity_views_default_views() {
  24. $views = array();
  25. if (!module_exists('tripal_views')) {
  26. return $views;
  27. }
  28. // Experiment Listing
  29. $view = new view;
  30. $view->name = 'natdiv_experiment_listing';
  31. $view->description = 'A listing of all natural diversity experiments';
  32. $view->tag = 'chado default';
  33. $view->base_table = 'nd_experiment';
  34. $view->core = 6;
  35. $view->api_version = '2';
  36. $view->disabled = FALSE;
  37. $handler = $view->new_display('default', 'Defaults', 'default');
  38. $handler->override_option('fields', array(
  39. 'name' => array(
  40. 'label' => 'Type',
  41. 'alter' => array(
  42. 'alter_text' => 0,
  43. 'text' => '',
  44. 'make_link' => 0,
  45. 'path' => '',
  46. 'absolute' => 0,
  47. 'link_class' => '',
  48. 'alt' => '',
  49. 'rel' => '',
  50. 'prefix' => '',
  51. 'suffix' => '',
  52. 'target' => '',
  53. 'help' => '',
  54. 'trim' => 0,
  55. 'max_length' => '',
  56. 'word_boundary' => 1,
  57. 'ellipsis' => 1,
  58. 'html' => 0,
  59. 'strip_tags' => 0,
  60. ),
  61. 'empty' => '',
  62. 'hide_empty' => 0,
  63. 'empty_zero' => 0,
  64. 'hide_alter_empty' => 1,
  65. 'type' => 'separator',
  66. 'separator' => ', ',
  67. 'exclude' => 0,
  68. 'id' => 'name',
  69. 'table' => 'cvterm',
  70. 'field' => 'name',
  71. 'relationship' => 'none',
  72. ),
  73. 'description' => array(
  74. 'label' => 'Location Experiment Performed',
  75. 'alter' => array(
  76. 'alter_text' => 0,
  77. 'text' => '',
  78. 'make_link' => 0,
  79. 'path' => '',
  80. 'absolute' => 0,
  81. 'link_class' => '',
  82. 'alt' => '',
  83. 'rel' => '',
  84. 'prefix' => '',
  85. 'suffix' => '',
  86. 'target' => '',
  87. 'help' => '',
  88. 'trim' => 0,
  89. 'max_length' => '',
  90. 'word_boundary' => 1,
  91. 'ellipsis' => 1,
  92. 'html' => 0,
  93. 'strip_tags' => 0,
  94. ),
  95. 'empty' => '',
  96. 'hide_empty' => 0,
  97. 'empty_zero' => 0,
  98. 'hide_alter_empty' => 1,
  99. 'type' => 'separator',
  100. 'separator' => ', ',
  101. 'exclude' => 0,
  102. 'id' => 'description',
  103. 'table' => 'nd_geolocation',
  104. 'field' => 'description',
  105. 'relationship' => 'none',
  106. ),
  107. ));
  108. $handler->override_option('sorts', array(
  109. 'name' => array(
  110. 'order' => 'ASC',
  111. 'id' => 'name',
  112. 'table' => 'cvterm',
  113. 'field' => 'name',
  114. 'relationship' => 'none',
  115. ),
  116. 'description' => array(
  117. 'order' => 'ASC',
  118. 'id' => 'description',
  119. 'table' => 'nd_geolocation',
  120. 'field' => 'description',
  121. 'relationship' => 'none',
  122. ),
  123. ));
  124. $handler->override_option('filters', array(
  125. 'type_id' => array(
  126. 'operator' => '=',
  127. 'value' => '',
  128. 'group' => '0',
  129. 'exposed' => TRUE,
  130. 'expose' => array(
  131. 'use_operator' => 0,
  132. 'operator' => 'type_id_op',
  133. 'identifier' => 'type_id',
  134. 'label' => 'Experiment Type',
  135. 'remember' => 0,
  136. ),
  137. 'case' => 1,
  138. 'id' => 'type_id',
  139. 'table' => 'nd_experiment',
  140. 'field' => 'type_id',
  141. 'relationship' => 'none',
  142. 'values_form_type' => 'select',
  143. 'multiple' => 1,
  144. 'optional' => 0,
  145. 'show_all' => 0,
  146. 'agg' => array(
  147. 'records_with' => 1,
  148. 'aggregates_with' => 1,
  149. ),
  150. ),
  151. 'description' => array(
  152. 'operator' => '=',
  153. 'value' => array(),
  154. 'group' => '0',
  155. 'exposed' => TRUE,
  156. 'expose' => array(
  157. 'use_operator' => 0,
  158. 'operator' => 'description_op',
  159. 'identifier' => 'geolocation',
  160. 'label' => 'Location Experiment Performed',
  161. 'remember' => 0,
  162. ),
  163. 'case' => 1,
  164. 'id' => 'description',
  165. 'table' => 'nd_geolocation',
  166. 'field' => 'description',
  167. 'relationship' => 'none',
  168. 'agg' => array(
  169. 'records_with' => 1,
  170. 'aggregates_with' => 1,
  171. ),
  172. 'values_form_type' => 'select',
  173. 'multiple' => 1,
  174. 'optional' => 0,
  175. ),
  176. 'search_results' => array(
  177. 'operator' => '=',
  178. 'value' => '',
  179. 'group' => '0',
  180. 'exposed' => FALSE,
  181. 'expose' => array(
  182. 'operator' => FALSE,
  183. 'label' => '',
  184. ),
  185. 'id' => 'search_results',
  186. 'table' => 'views',
  187. 'field' => 'search_results',
  188. 'relationship' => 'none',
  189. 'apply_button' => 'Show',
  190. 'no_results_text' => 'Click "Show" to see a list of all experiments matching the entered criteria. If you leave a any of the criteria blank then the experiments will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all experiments will be listed.',
  191. ),
  192. ));
  193. $handler->override_option('access', array(
  194. 'type' => 'perm',
  195. 'perm' => 'access content',
  196. ));
  197. $handler->override_option('cache', array(
  198. 'type' => 'none',
  199. ));
  200. $handler->override_option('title', 'Natural Diversity Experiments');
  201. $handler->override_option('header', 'Click "Show" to see a list of all experiments matching the entered criteria. If you leave a any of the criteria blank then the experiments will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all experiments will be listed.');
  202. $handler->override_option('header_format', '2');
  203. $handler->override_option('header_empty', 0);
  204. $handler->override_option('empty', 'No natural diversity experiments match the current criteria.');
  205. $handler->override_option('empty_format', '2');
  206. $handler->override_option('items_per_page', 50);
  207. $handler->override_option('use_pager', '1');
  208. $handler->override_option('style_plugin', 'table');
  209. $handler->override_option('style_options', array(
  210. 'grouping' => '',
  211. 'override' => 1,
  212. 'sticky' => 0,
  213. 'order' => 'asc',
  214. 'summary' => '',
  215. 'columns' => array(
  216. 'name' => 'name',
  217. 'description' => 'description',
  218. ),
  219. 'info' => array(
  220. 'name' => array(
  221. 'sortable' => 1,
  222. 'separator' => '',
  223. ),
  224. 'description' => array(
  225. 'sortable' => 1,
  226. 'separator' => '',
  227. ),
  228. ),
  229. 'default' => '-1',
  230. ));
  231. $handler = $view->new_display('page', 'Page', 'page_1');
  232. $handler->override_option('path', 'chado/natdiv_experiments');
  233. $handler->override_option('menu', array(
  234. 'type' => 'normal',
  235. 'title' => 'Natural Diversity Experiments',
  236. 'description' => 'A single assay resulting in a single genotype or phenotype. Multiple assays resulting in an entire experiment should be grouped together as a project.',
  237. 'weight' => '10',
  238. 'name' => 'navigation',
  239. ));
  240. $handler->override_option('tab_options', array(
  241. 'type' => 'none',
  242. 'title' => '',
  243. 'description' => '',
  244. 'weight' => 0,
  245. 'name' => 'navigation',
  246. ));
  247. $views[$view->name] = $view;
  248. // List geolocations
  249. $view = new view;
  250. $view->name = 'geolocation_listing';
  251. $view->description = 'A listing of locations where natural diversity experiments took place.';
  252. $view->tag = 'chado default';
  253. $view->base_table = 'nd_geolocation';
  254. $view->core = 6;
  255. $view->api_version = '2';
  256. $view->disabled = FALSE;
  257. $handler = $view->new_display('default', 'Defaults', 'default');
  258. $handler->override_option('fields', array(
  259. 'description' => array(
  260. 'label' => 'Name',
  261. 'alter' => array(
  262. 'alter_text' => 0,
  263. 'text' => '',
  264. 'make_link' => 0,
  265. 'path' => '',
  266. 'absolute' => 0,
  267. 'link_class' => '',
  268. 'alt' => '',
  269. 'rel' => '',
  270. 'prefix' => '',
  271. 'suffix' => '',
  272. 'target' => '',
  273. 'help' => '',
  274. 'trim' => 0,
  275. 'max_length' => '',
  276. 'word_boundary' => 1,
  277. 'ellipsis' => 1,
  278. 'html' => 0,
  279. 'strip_tags' => 0,
  280. ),
  281. 'empty' => '',
  282. 'hide_empty' => 0,
  283. 'empty_zero' => 0,
  284. 'hide_alter_empty' => 1,
  285. 'type' => 'separator',
  286. 'separator' => ', ',
  287. 'exclude' => 0,
  288. 'id' => 'description',
  289. 'table' => 'nd_geolocation',
  290. 'field' => 'description',
  291. 'relationship' => 'none',
  292. ),
  293. 'latitude' => array(
  294. 'label' => 'Latitude',
  295. 'alter' => array(
  296. 'alter_text' => 0,
  297. 'text' => '',
  298. 'make_link' => 0,
  299. 'path' => '',
  300. 'absolute' => 0,
  301. 'link_class' => '',
  302. 'alt' => '',
  303. 'rel' => '',
  304. 'prefix' => '',
  305. 'suffix' => '',
  306. 'target' => '',
  307. 'help' => '',
  308. 'trim' => 0,
  309. 'max_length' => '',
  310. 'word_boundary' => 1,
  311. 'ellipsis' => 1,
  312. 'html' => 0,
  313. 'strip_tags' => 0,
  314. ),
  315. 'empty' => '',
  316. 'hide_empty' => 0,
  317. 'empty_zero' => 0,
  318. 'hide_alter_empty' => 1,
  319. 'type' => 'separator',
  320. 'separator' => ', ',
  321. 'exclude' => 0,
  322. 'id' => 'latitude',
  323. 'table' => 'nd_geolocation',
  324. 'field' => 'latitude',
  325. 'relationship' => 'none',
  326. ),
  327. 'longitude' => array(
  328. 'label' => 'Longitude',
  329. 'alter' => array(
  330. 'alter_text' => 0,
  331. 'text' => '',
  332. 'make_link' => 0,
  333. 'path' => '',
  334. 'absolute' => 0,
  335. 'link_class' => '',
  336. 'alt' => '',
  337. 'rel' => '',
  338. 'prefix' => '',
  339. 'suffix' => '',
  340. 'target' => '',
  341. 'help' => '',
  342. 'trim' => 0,
  343. 'max_length' => '',
  344. 'word_boundary' => 1,
  345. 'ellipsis' => 1,
  346. 'html' => 0,
  347. 'strip_tags' => 0,
  348. ),
  349. 'empty' => '',
  350. 'hide_empty' => 0,
  351. 'empty_zero' => 0,
  352. 'hide_alter_empty' => 1,
  353. 'type' => 'separator',
  354. 'separator' => ', ',
  355. 'exclude' => 0,
  356. 'id' => 'longitude',
  357. 'table' => 'nd_geolocation',
  358. 'field' => 'longitude',
  359. 'relationship' => 'none',
  360. ),
  361. 'altitude' => array(
  362. 'label' => 'Altitude',
  363. 'alter' => array(
  364. 'alter_text' => 0,
  365. 'text' => '',
  366. 'make_link' => 0,
  367. 'path' => '',
  368. 'absolute' => 0,
  369. 'link_class' => '',
  370. 'alt' => '',
  371. 'rel' => '',
  372. 'prefix' => '',
  373. 'suffix' => '',
  374. 'target' => '',
  375. 'help' => '',
  376. 'trim' => 0,
  377. 'max_length' => '',
  378. 'word_boundary' => 1,
  379. 'ellipsis' => 1,
  380. 'html' => 0,
  381. 'strip_tags' => 0,
  382. ),
  383. 'empty' => '',
  384. 'hide_empty' => 0,
  385. 'empty_zero' => 0,
  386. 'hide_alter_empty' => 1,
  387. 'type' => 'separator',
  388. 'separator' => ', ',
  389. 'exclude' => 0,
  390. 'id' => 'altitude',
  391. 'table' => 'nd_geolocation',
  392. 'field' => 'altitude',
  393. 'relationship' => 'none',
  394. ),
  395. 'geodetic_datum' => array(
  396. 'label' => 'Geodetic Datum',
  397. 'alter' => array(
  398. 'alter_text' => 0,
  399. 'text' => '',
  400. 'make_link' => 0,
  401. 'path' => '',
  402. 'absolute' => 0,
  403. 'link_class' => '',
  404. 'alt' => '',
  405. 'rel' => '',
  406. 'prefix' => '',
  407. 'suffix' => '',
  408. 'target' => '',
  409. 'help' => '',
  410. 'trim' => 0,
  411. 'max_length' => '',
  412. 'word_boundary' => 1,
  413. 'ellipsis' => 1,
  414. 'html' => 0,
  415. 'strip_tags' => 0,
  416. ),
  417. 'empty' => '',
  418. 'hide_empty' => 0,
  419. 'empty_zero' => 0,
  420. 'hide_alter_empty' => 1,
  421. 'type' => 'separator',
  422. 'separator' => ', ',
  423. 'exclude' => 0,
  424. 'id' => 'geodetic_datum',
  425. 'table' => 'nd_geolocation',
  426. 'field' => 'geodetic_datum',
  427. 'relationship' => 'none',
  428. ),
  429. ));
  430. $handler->override_option('filters', array(
  431. 'geodetic_datum' => array(
  432. 'operator' => '=',
  433. 'value' => array(),
  434. 'group' => '0',
  435. 'exposed' => TRUE,
  436. 'expose' => array(
  437. 'use_operator' => 0,
  438. 'operator' => 'geodetic_datum_op',
  439. 'identifier' => 'geodetic_datum',
  440. 'label' => 'Geodetic Datum',
  441. 'remember' => 0,
  442. ),
  443. 'case' => 1,
  444. 'id' => 'geodetic_datum',
  445. 'table' => 'nd_geolocation',
  446. 'field' => 'geodetic_datum',
  447. 'relationship' => 'none',
  448. 'agg' => array(
  449. 'records_with' => 1,
  450. 'aggregates_with' => 1,
  451. ),
  452. 'values_form_type' => 'select',
  453. 'multiple' => 1,
  454. 'optional' => 0,
  455. ),
  456. 'latitude' => array(
  457. 'operator' => '=',
  458. 'value' => array(
  459. 'value' => '',
  460. 'min' => '',
  461. 'max' => '',
  462. ),
  463. 'group' => '0',
  464. 'exposed' => TRUE,
  465. 'expose' => array(
  466. 'use_operator' => 1,
  467. 'operator' => 'latitude_op',
  468. 'identifier' => 'latitude',
  469. 'label' => 'Latitude',
  470. 'optional' => 0,
  471. 'remember' => 0,
  472. ),
  473. 'case' => 1,
  474. 'id' => 'latitude',
  475. 'table' => 'nd_geolocation',
  476. 'field' => 'latitude',
  477. 'relationship' => 'none',
  478. 'agg' => array(
  479. 'records_with' => 1,
  480. 'aggregates_with' => 1,
  481. ),
  482. ),
  483. 'longitude' => array(
  484. 'operator' => '=',
  485. 'value' => array(
  486. 'value' => '',
  487. 'min' => '',
  488. 'max' => '',
  489. ),
  490. 'group' => '0',
  491. 'exposed' => TRUE,
  492. 'expose' => array(
  493. 'use_operator' => 1,
  494. 'operator' => 'longitude_op',
  495. 'identifier' => 'longitude',
  496. 'label' => 'Longitude',
  497. 'optional' => 0,
  498. 'remember' => 0,
  499. ),
  500. 'case' => 1,
  501. 'id' => 'longitude',
  502. 'table' => 'nd_geolocation',
  503. 'field' => 'longitude',
  504. 'relationship' => 'none',
  505. 'agg' => array(
  506. 'records_with' => 1,
  507. 'aggregates_with' => 1,
  508. ),
  509. ),
  510. 'altitude' => array(
  511. 'operator' => '=',
  512. 'value' => array(
  513. 'value' => '',
  514. 'min' => '',
  515. 'max' => '',
  516. ),
  517. 'group' => '0',
  518. 'exposed' => TRUE,
  519. 'expose' => array(
  520. 'use_operator' => 1,
  521. 'operator' => 'altitude_op',
  522. 'identifier' => 'altitude',
  523. 'label' => 'Altitude',
  524. 'optional' => 0,
  525. 'remember' => 0,
  526. ),
  527. 'case' => 0,
  528. 'id' => 'altitude',
  529. 'table' => 'nd_geolocation',
  530. 'field' => 'altitude',
  531. 'relationship' => 'none',
  532. 'agg' => array(
  533. 'records_with' => 1,
  534. 'aggregates_with' => 1,
  535. ),
  536. ),
  537. 'description' => array(
  538. 'operator' => '~',
  539. 'value' => '',
  540. 'group' => '0',
  541. 'exposed' => TRUE,
  542. 'expose' => array(
  543. 'use_operator' => 0,
  544. 'operator' => 'description_op',
  545. 'identifier' => 'description',
  546. 'label' => 'Name Contains',
  547. 'remember' => 0,
  548. ),
  549. 'case' => 0,
  550. 'id' => 'description',
  551. 'table' => 'nd_geolocation',
  552. 'field' => 'description',
  553. 'relationship' => 'none',
  554. 'agg' => array(
  555. 'records_with' => 1,
  556. 'aggregates_with' => 1,
  557. ),
  558. 'values_form_type' => 'textfield',
  559. 'multiple' => 0,
  560. 'optional' => 0,
  561. ),
  562. ));
  563. $handler->override_option('access', array(
  564. 'type' => 'perm',
  565. 'perm' => 'access content',
  566. ));
  567. $handler->override_option('cache', array(
  568. 'type' => 'none',
  569. ));
  570. $handler->override_option('title', 'Geographical Locations');
  571. $handler->override_option('header', 'Use the following criteria to limit the locations listed. If you leave a any of the criteria blank then the locations will be not be filtered based on that field.');
  572. $handler->override_option('header_format', '2');
  573. $handler->override_option('header_empty', 0);
  574. $handler->override_option('empty', 'No locations matched the current criteria.');
  575. $handler->override_option('empty_format', '2');
  576. $handler->override_option('items_per_page', 50);
  577. $handler->override_option('use_pager', '1');
  578. $handler->override_option('style_plugin', 'table');
  579. $handler->override_option('style_options', array(
  580. 'grouping' => '',
  581. 'override' => 1,
  582. 'sticky' => 0,
  583. 'order' => 'asc',
  584. 'summary' => '',
  585. 'columns' => array(
  586. 'description' => 'description',
  587. 'latitude' => 'latitude',
  588. 'longitude' => 'longitude',
  589. 'altitude' => 'altitude',
  590. 'geodetic_datum' => 'geodetic_datum',
  591. ),
  592. 'info' => array(
  593. 'description' => array(
  594. 'sortable' => 1,
  595. 'separator' => '',
  596. ),
  597. 'latitude' => array(
  598. 'sortable' => 1,
  599. 'separator' => '',
  600. ),
  601. 'longitude' => array(
  602. 'sortable' => 1,
  603. 'separator' => '',
  604. ),
  605. 'altitude' => array(
  606. 'sortable' => 1,
  607. 'separator' => '',
  608. ),
  609. 'geodetic_datum' => array(
  610. 'sortable' => 1,
  611. 'separator' => '',
  612. ),
  613. ),
  614. 'default' => 'description',
  615. ));
  616. $handler = $view->new_display('page', 'Page', 'page_1');
  617. $handler->override_option('path', 'chado/natdiv_geolocations');
  618. $handler->override_option('menu', array(
  619. 'type' => 'normal',
  620. 'title' => 'Locations',
  621. 'description' => 'Geographical locations in which natural diversity experiments might be performed.',
  622. 'weight' => '10',
  623. 'name' => 'navigation',
  624. ));
  625. $handler->override_option('tab_options', array(
  626. 'type' => 'none',
  627. 'title' => '',
  628. 'description' => '',
  629. 'weight' => 0,
  630. 'name' => 'navigation',
  631. ));
  632. $views[$view->name] = $view;
  633. // List protocols
  634. $view = new view;
  635. $view->name = 'natdiv_protocol_listing';
  636. $view->description = 'A listing of protocols used for natural diversity experiments';
  637. $view->tag = 'chado default';
  638. $view->base_table = 'nd_protocol';
  639. $view->core = 6;
  640. $view->api_version = '2';
  641. $view->disabled = FALSE;
  642. $handler = $view->new_display('default', 'Defaults', 'default');
  643. $handler->override_option('fields', array(
  644. 'name' => array(
  645. 'label' => 'Name',
  646. 'alter' => array(
  647. 'alter_text' => 0,
  648. 'text' => '',
  649. 'make_link' => 0,
  650. 'path' => '',
  651. 'absolute' => 0,
  652. 'link_class' => '',
  653. 'alt' => '',
  654. 'rel' => '',
  655. 'prefix' => '',
  656. 'suffix' => '',
  657. 'target' => '',
  658. 'help' => '',
  659. 'trim' => 0,
  660. 'max_length' => '',
  661. 'word_boundary' => 1,
  662. 'ellipsis' => 1,
  663. 'html' => 0,
  664. 'strip_tags' => 0,
  665. ),
  666. 'empty' => '',
  667. 'hide_empty' => 0,
  668. 'empty_zero' => 0,
  669. 'hide_alter_empty' => 1,
  670. 'type' => 'separator',
  671. 'separator' => ', ',
  672. 'exclude' => 0,
  673. 'id' => 'name',
  674. 'table' => 'nd_protocol',
  675. 'field' => 'name',
  676. 'relationship' => 'none',
  677. ),
  678. ));
  679. $handler->override_option('filters', array(
  680. 'name' => array(
  681. 'operator' => '~',
  682. 'value' => '',
  683. 'group' => '0',
  684. 'exposed' => TRUE,
  685. 'expose' => array(
  686. 'use_operator' => 0,
  687. 'operator' => 'name_op',
  688. 'identifier' => 'name',
  689. 'label' => 'Name Contains',
  690. 'remember' => 0,
  691. ),
  692. 'case' => 0,
  693. 'id' => 'name',
  694. 'table' => 'nd_protocol',
  695. 'field' => 'name',
  696. 'relationship' => 'none',
  697. 'agg' => array(
  698. 'records_with' => 1,
  699. 'aggregates_with' => 1,
  700. ),
  701. ),
  702. 'search_results' => array(
  703. 'operator' => '=',
  704. 'value' => '',
  705. 'group' => '0',
  706. 'exposed' => FALSE,
  707. 'expose' => array(
  708. 'operator' => FALSE,
  709. 'label' => '',
  710. ),
  711. 'id' => 'search_results',
  712. 'table' => 'views',
  713. 'field' => 'search_results',
  714. 'relationship' => 'none',
  715. 'apply_button' => 'Show',
  716. 'no_results_text' => 'Click "Show" to see a list of all protocols matching the entered criteria. If you leave a any of the criteria blank then the protocols will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all protocols will be listed.',
  717. ),
  718. ));
  719. $handler->override_option('access', array(
  720. 'type' => 'perm',
  721. 'perm' => 'access content',
  722. ));
  723. $handler->override_option('cache', array(
  724. 'type' => 'none',
  725. ));
  726. $handler->override_option('title', 'Protocols');
  727. $handler->override_option('header', 'Click "Show" to see a list of all protocols matching the entered criteria. If you leave a any of the criteria blank then the protocols will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all protocols will be listed.');
  728. $handler->override_option('header_format', '2');
  729. $handler->override_option('header_empty', 0);
  730. $handler->override_option('empty', 'No protocols match the current criteria.');
  731. $handler->override_option('empty_format', '2');
  732. $handler->override_option('items_per_page', 50);
  733. $handler->override_option('use_pager', '1');
  734. $handler->override_option('style_plugin', 'table');
  735. $handler->override_option('style_options', array(
  736. 'grouping' => '',
  737. 'override' => 1,
  738. 'sticky' => 0,
  739. 'order' => 'asc',
  740. 'summary' => '',
  741. 'columns' => array(
  742. 'name' => 'name',
  743. ),
  744. 'info' => array(
  745. 'name' => array(
  746. 'sortable' => 1,
  747. 'separator' => '',
  748. ),
  749. ),
  750. 'default' => 'name',
  751. ));
  752. $handler = $view->new_display('page', 'Page', 'page_1');
  753. $handler->override_option('path', 'chado/natdiv_protocols');
  754. $handler->override_option('menu', array(
  755. 'type' => 'normal',
  756. 'title' => 'Protocols',
  757. 'description' => 'The protcols used for natural diversity experiments',
  758. 'weight' => '10',
  759. 'name' => 'navigation',
  760. ));
  761. $handler->override_option('tab_options', array(
  762. 'type' => 'none',
  763. 'title' => '',
  764. 'description' => '',
  765. 'weight' => 0,
  766. 'name' => 'navigation',
  767. ));
  768. $views[$view->name] = $view;
  769. // List Reagents
  770. $view = new view;
  771. $view->name = 'natdiv_reagent_listing';
  772. $view->description = 'A listing of reagents used in natural diversity experiments';
  773. $view->tag = 'chado default';
  774. $view->base_table = 'nd_reagent';
  775. $view->core = 6;
  776. $view->api_version = '2';
  777. $view->disabled = FALSE;
  778. $handler = $view->new_display('default', 'Defaults', 'default');
  779. $handler->override_option('fields', array(
  780. 'name_1' => array(
  781. 'label' => 'Name',
  782. 'alter' => array(
  783. 'alter_text' => 0,
  784. 'text' => '',
  785. 'make_link' => 0,
  786. 'path' => '',
  787. 'absolute' => 0,
  788. 'link_class' => '',
  789. 'alt' => '',
  790. 'rel' => '',
  791. 'prefix' => '',
  792. 'suffix' => '',
  793. 'target' => '',
  794. 'help' => '',
  795. 'trim' => 0,
  796. 'max_length' => '',
  797. 'word_boundary' => 1,
  798. 'ellipsis' => 1,
  799. 'html' => 0,
  800. 'strip_tags' => 0,
  801. ),
  802. 'empty' => '',
  803. 'hide_empty' => 0,
  804. 'empty_zero' => 0,
  805. 'hide_alter_empty' => 1,
  806. 'type' => 'separator',
  807. 'separator' => ', ',
  808. 'exclude' => 0,
  809. 'id' => 'name_1',
  810. 'table' => 'nd_reagent',
  811. 'field' => 'name',
  812. 'relationship' => 'none',
  813. ),
  814. 'name' => array(
  815. 'label' => 'Type',
  816. 'alter' => array(
  817. 'alter_text' => 0,
  818. 'text' => '',
  819. 'make_link' => 0,
  820. 'path' => '',
  821. 'absolute' => 0,
  822. 'link_class' => '',
  823. 'alt' => '',
  824. 'rel' => '',
  825. 'prefix' => '',
  826. 'suffix' => '',
  827. 'target' => '',
  828. 'help' => '',
  829. 'trim' => 0,
  830. 'max_length' => '',
  831. 'word_boundary' => 1,
  832. 'ellipsis' => 1,
  833. 'html' => 0,
  834. 'strip_tags' => 0,
  835. ),
  836. 'empty' => '',
  837. 'hide_empty' => 0,
  838. 'empty_zero' => 0,
  839. 'hide_alter_empty' => 1,
  840. 'type' => 'separator',
  841. 'separator' => ', ',
  842. 'exclude' => 0,
  843. 'id' => 'name',
  844. 'table' => 'cvterm',
  845. 'field' => 'name',
  846. 'relationship' => 'none',
  847. ),
  848. ));
  849. $handler->override_option('filters', array(
  850. 'type_id' => array(
  851. 'operator' => '=',
  852. 'value' => '',
  853. 'group' => '0',
  854. 'exposed' => TRUE,
  855. 'expose' => array(
  856. 'use_operator' => 0,
  857. 'operator' => 'type_id_op',
  858. 'identifier' => 'type_id',
  859. 'label' => 'Type',
  860. 'remember' => 0,
  861. ),
  862. 'case' => 1,
  863. 'id' => 'type_id',
  864. 'table' => 'nd_reagent',
  865. 'field' => 'type_id',
  866. 'relationship' => 'none',
  867. 'values_form_type' => 'select',
  868. 'multiple' => 1,
  869. 'optional' => 0,
  870. 'show_all' => 0,
  871. 'agg' => array(
  872. 'records_with' => 1,
  873. 'aggregates_with' => 1,
  874. ),
  875. ),
  876. 'search_results' => array(
  877. 'operator' => '=',
  878. 'value' => '',
  879. 'group' => '0',
  880. 'exposed' => FALSE,
  881. 'expose' => array(
  882. 'operator' => FALSE,
  883. 'label' => '',
  884. ),
  885. 'id' => 'search_results',
  886. 'table' => 'views',
  887. 'field' => 'search_results',
  888. 'relationship' => 'none',
  889. 'apply_button' => 'Show',
  890. 'no_results_text' => 'Click "Show" to see a list of all reagents matching the entered criteria. If you leave a any of the criteria blank then the reagents will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all reagents will be listed.',
  891. ),
  892. 'name' => array(
  893. 'operator' => '~',
  894. 'value' => '',
  895. 'group' => '0',
  896. 'exposed' => TRUE,
  897. 'expose' => array(
  898. 'use_operator' => 0,
  899. 'operator' => 'name_op',
  900. 'identifier' => 'name',
  901. 'label' => 'Name Contains',
  902. 'remember' => 0,
  903. ),
  904. 'case' => 0,
  905. 'id' => 'name',
  906. 'table' => 'nd_reagent',
  907. 'field' => 'name',
  908. 'relationship' => 'none',
  909. 'agg' => array(
  910. 'records_with' => 1,
  911. 'aggregates_with' => 1,
  912. ),
  913. ),
  914. ));
  915. $handler->override_option('access', array(
  916. 'type' => 'perm',
  917. 'perm' => 'access content',
  918. ));
  919. $handler->override_option('cache', array(
  920. 'type' => 'none',
  921. ));
  922. $handler->override_option('title', 'Reagents');
  923. $handler->override_option('header', 'Click "Show" to see a list of all reagents matching the entered criteria. If you leave a any of the criteria blank then the reagents will be not be filtered based on that field. Furthermore, if you leave all criteria blank then all reagents will be listed.');
  924. $handler->override_option('header_format', '2');
  925. $handler->override_option('header_empty', 0);
  926. $handler->override_option('empty', 'No reagents match the current criteria.');
  927. $handler->override_option('empty_format', '2');
  928. $handler->override_option('items_per_page', 50);
  929. $handler->override_option('use_pager', '1');
  930. $handler->override_option('style_plugin', 'table');
  931. $handler = $view->new_display('page', 'Page', 'page_1');
  932. $handler->override_option('path', 'chado/natdiv_reagents');
  933. $handler->override_option('menu', array(
  934. 'type' => 'normal',
  935. 'title' => 'Reagents',
  936. 'description' => 'Reagents used in natural diversity experiments',
  937. 'weight' => '10',
  938. 'name' => 'navigation',
  939. ));
  940. $handler->override_option('tab_options', array(
  941. 'type' => 'none',
  942. 'title' => '',
  943. 'description' => '',
  944. 'weight' => 0,
  945. 'name' => 'navigation',
  946. ));
  947. $views[$view->name] = $view;
  948. return $views;
  949. }
  950. */