tripal_natural_diversity.views_default.inc 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. <?php
  2. /**
  3. * @file
  4. * Describes default natural diversity views
  5. */
  6. /**
  7. * Implements hook_views_default_views().
  8. *
  9. * @ingroup tripal_legacy_natural_diversity
  10. */
  11. function tripal_natural_diversity_views_default_views() {
  12. $views = array();
  13. // Experiment Listing
  14. $view = tripal_natural_diversity_defaultview_admin_natdiv_exp();
  15. $view = tripal_make_view_compatible_with_external($view);
  16. $views[$view->name] = $view;
  17. // List geolocations
  18. $view = tripal_natural_diversity_defaultview_admin_geolocations();
  19. $view = tripal_make_view_compatible_with_external($view);
  20. $views[$view->name] = $view;
  21. // List protocols
  22. $view = tripal_natural_diversity_defaultview_admin_protocols();
  23. $view = tripal_make_view_compatible_with_external($view);
  24. $views[$view->name] = $view;
  25. // List Reagents
  26. $view = tripal_natural_diversity_defaultview_admin_reagents();
  27. $view = tripal_make_view_compatible_with_external($view);
  28. $views[$view->name] = $view;
  29. return $views;
  30. }
  31. /**
  32. * Describes the default experiment administration view
  33. *
  34. * @ingroup tripal_legacy_natural_diversity
  35. */
  36. function tripal_natural_diversity_defaultview_admin_natdiv_exp() {
  37. $view = new view();
  38. $view->name = 'tripal_natural_diversity_admin_natdiv_exp';
  39. $view->description = 'DO NOT DISABLE';
  40. $view->tag = 'tripal admin';
  41. $view->base_table = 'nd_experiment';
  42. $view->human_name = 'NatDiv Experiment Admin';
  43. $view->core = 7;
  44. $view->api_version = '3.0';
  45. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  46. /* Display: Defaults */
  47. $handler = $view->new_display('default', 'Defaults', 'default');
  48. $handler->display->display_options['title'] = 'Natural Diversity Experiments';
  49. $handler->display->display_options['use_more_always'] = FALSE;
  50. $handler->display->display_options['access']['type'] = 'perm';
  51. $handler->display->display_options['cache']['type'] = 'none';
  52. $handler->display->display_options['query']['type'] = 'views_query';
  53. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  54. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  55. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of natural diversity experiments that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of experiments or to find a specific experiment.';
  56. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  57. $handler->display->display_options['pager']['type'] = 'full';
  58. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  59. $handler->display->display_options['pager']['options']['offset'] = '0';
  60. $handler->display->display_options['pager']['options']['id'] = '0';
  61. $handler->display->display_options['pager']['options']['quantity'] = '9';
  62. $handler->display->display_options['style_plugin'] = 'table';
  63. $handler->display->display_options['style_options']['grouping'] = '';
  64. $handler->display->display_options['style_options']['columns'] = array(
  65. 'name' => 'name',
  66. 'description' => 'description',
  67. );
  68. $handler->display->display_options['style_options']['default'] = '-1';
  69. $handler->display->display_options['style_options']['info'] = array(
  70. 'name' => array(
  71. 'sortable' => 1,
  72. 'separator' => '',
  73. ),
  74. 'description' => array(
  75. 'sortable' => 1,
  76. 'separator' => '',
  77. ),
  78. );
  79. /* No results behavior: Global: Text area */
  80. $handler->display->display_options['empty']['text']['id'] = 'area';
  81. $handler->display->display_options['empty']['text']['table'] = 'views';
  82. $handler->display->display_options['empty']['text']['field'] = 'area';
  83. $handler->display->display_options['empty']['text']['content'] = 'No natural diversity experiments match the current criteria.';
  84. $handler->display->display_options['empty']['text']['format'] = '2';
  85. /* Field: Chado Cvterm: Name */
  86. $handler->display->display_options['fields']['name']['id'] = 'name';
  87. $handler->display->display_options['fields']['name']['table'] = 'cvterm';
  88. $handler->display->display_options['fields']['name']['field'] = 'name';
  89. $handler->display->display_options['fields']['name']['label'] = 'Type';
  90. /* Field: Chado Nd Geolocation: Description */
  91. $handler->display->display_options['fields']['description']['id'] = 'description';
  92. $handler->display->display_options['fields']['description']['table'] = 'nd_geolocation';
  93. $handler->display->display_options['fields']['description']['field'] = 'description';
  94. $handler->display->display_options['fields']['description']['label'] = 'Location Experiment Performed';
  95. /* Sort criterion: Chado Nd Experiment: Id */
  96. $handler->display->display_options['sorts']['nd_experiment_id']['id'] = 'nd_experiment_id';
  97. $handler->display->display_options['sorts']['nd_experiment_id']['table'] = 'nd_experiment';
  98. $handler->display->display_options['sorts']['nd_experiment_id']['field'] = 'nd_experiment_id';
  99. $handler->display->display_options['sorts']['nd_experiment_id']['order'] = 'DESC';
  100. /* Filter criterion: Chado Nd Experiment: Type Id */
  101. $handler->display->display_options['filters']['type_id']['id'] = 'type_id';
  102. $handler->display->display_options['filters']['type_id']['table'] = 'nd_experiment';
  103. $handler->display->display_options['filters']['type_id']['field'] = 'type_id';
  104. $handler->display->display_options['filters']['type_id']['group'] = '0';
  105. $handler->display->display_options['filters']['type_id']['value'] = 'All';
  106. $handler->display->display_options['filters']['type_id']['exposed'] = TRUE;
  107. $handler->display->display_options['filters']['type_id']['expose']['operator_id'] = 'type_id_op';
  108. $handler->display->display_options['filters']['type_id']['expose']['label'] = 'Experiment Type';
  109. $handler->display->display_options['filters']['type_id']['expose']['operator'] = 'type_id_op';
  110. $handler->display->display_options['filters']['type_id']['expose']['identifier'] = 'type_id';
  111. /* Filter criterion: Chado Nd Geolocation: Description */
  112. $handler->display->display_options['filters']['description']['id'] = 'description';
  113. $handler->display->display_options['filters']['description']['table'] = 'nd_geolocation';
  114. $handler->display->display_options['filters']['description']['field'] = 'description';
  115. $handler->display->display_options['filters']['description']['value'] = array();
  116. $handler->display->display_options['filters']['description']['group'] = '0';
  117. $handler->display->display_options['filters']['description']['exposed'] = TRUE;
  118. $handler->display->display_options['filters']['description']['expose']['operator_id'] = 'description_op';
  119. $handler->display->display_options['filters']['description']['expose']['label'] = 'Location Experiment Performed';
  120. $handler->display->display_options['filters']['description']['expose']['operator'] = 'description_op';
  121. $handler->display->display_options['filters']['description']['expose']['identifier'] = 'geolocation';
  122. /** MANUALLY ADD since filter handler no exporting correctly */
  123. $handler->display->display_options['filters']['type_id']['expose']['values_form_type'] = 'select';
  124. $handler->display->display_options['filters']['type_id']['expose']['select_multiple'] = FALSE;
  125. $handler->display->display_options['filters']['type_id']['expose']['select_optional'] = TRUE;
  126. $handler->display->display_options['filters']['type_id']['expose']['max_length'] = 40;
  127. /* Display: Page */
  128. $handler = $view->new_display('page', 'Page', 'page_1');
  129. $handler->display->display_options['path'] = 'admin/tripal/legacy/tripal_natdiv/experiments';
  130. $handler->display->display_options['menu']['type'] = 'default tab';
  131. $handler->display->display_options['menu']['title'] = 'Experiments';
  132. $handler->display->display_options['menu']['description'] = 'A single assay resulting in a single genotype or phenotype.';
  133. $handler->display->display_options['menu']['weight'] = '-10';
  134. $handler->display->display_options['menu']['context'] = 0;
  135. $handler->display->display_options['menu']['context_only_inline'] = 0;
  136. $handler->display->display_options['tab_options']['weight'] = '0';
  137. /** MANUALLY ADD since filter handler no exporting correctly
  138. $handler->display->display_options['filters']['type_id']['expose']['values_form_type'] = 'select';
  139. $handler->display->display_options['filters']['type_id']['expose']['select_multiple'] = FALSE;
  140. $handler->display->display_options['filters']['type_id']['expose']['select_optional'] = TRUE;
  141. $handler->display->display_options['filters']['type_id']['expose']['max_length'] = 40;
  142. */
  143. return $view;
  144. }
  145. /**
  146. * Describes the default geological locations administration view
  147. *
  148. * @ingroup tripal_legacy_natural_diversity
  149. */
  150. function tripal_natural_diversity_defaultview_admin_geolocations() {
  151. $view = new view();
  152. $view->name = 'tripal_natural_diversity_admin_geolocs';
  153. $view->description = 'DO NOT DISABLE';
  154. $view->tag = 'tripal admin';
  155. $view->base_table = 'nd_geolocation';
  156. $view->human_name = 'NatDiv Locations Admin';
  157. $view->core = 7;
  158. $view->api_version = '3.0';
  159. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  160. /* Display: Defaults */
  161. $handler = $view->new_display('default', 'Defaults', 'default');
  162. $handler->display->display_options['title'] = 'Geographical Locations';
  163. $handler->display->display_options['use_more_always'] = FALSE;
  164. $handler->display->display_options['access']['type'] = 'perm';
  165. $handler->display->display_options['cache']['type'] = 'none';
  166. $handler->display->display_options['query']['type'] = 'views_query';
  167. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  168. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  169. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of natural diversity experiment locations that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of locations or to find a specific location.';
  170. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  171. $handler->display->display_options['pager']['type'] = 'full';
  172. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  173. $handler->display->display_options['pager']['options']['offset'] = '0';
  174. $handler->display->display_options['pager']['options']['id'] = '0';
  175. $handler->display->display_options['pager']['options']['quantity'] = '9';
  176. $handler->display->display_options['style_plugin'] = 'table';
  177. $handler->display->display_options['style_options']['grouping'] = '';
  178. $handler->display->display_options['style_options']['columns'] = array(
  179. 'description' => 'description',
  180. 'latitude' => 'latitude',
  181. 'longitude' => 'longitude',
  182. 'altitude' => 'altitude',
  183. 'geodetic_datum' => 'geodetic_datum',
  184. );
  185. $handler->display->display_options['style_options']['default'] = 'description';
  186. $handler->display->display_options['style_options']['info'] = array(
  187. 'description' => array(
  188. 'sortable' => 1,
  189. 'separator' => '',
  190. ),
  191. 'latitude' => array(
  192. 'sortable' => 1,
  193. 'separator' => '',
  194. ),
  195. 'longitude' => array(
  196. 'sortable' => 1,
  197. 'separator' => '',
  198. ),
  199. 'altitude' => array(
  200. 'sortable' => 1,
  201. 'separator' => '',
  202. ),
  203. 'geodetic_datum' => array(
  204. 'sortable' => 1,
  205. 'separator' => '',
  206. ),
  207. );
  208. /* No results behavior: Global: Text area */
  209. $handler->display->display_options['empty']['text']['id'] = 'area';
  210. $handler->display->display_options['empty']['text']['table'] = 'views';
  211. $handler->display->display_options['empty']['text']['field'] = 'area';
  212. $handler->display->display_options['empty']['text']['content'] = 'No locations matched the current criteria.';
  213. $handler->display->display_options['empty']['text']['format'] = '2';
  214. /* Field: Chado Nd Geolocation: Description */
  215. $handler->display->display_options['fields']['description']['id'] = 'description';
  216. $handler->display->display_options['fields']['description']['table'] = 'nd_geolocation';
  217. $handler->display->display_options['fields']['description']['field'] = 'description';
  218. $handler->display->display_options['fields']['description']['label'] = 'Name';
  219. /* Field: Chado Nd Geolocation: Latitude */
  220. $handler->display->display_options['fields']['latitude']['id'] = 'latitude';
  221. $handler->display->display_options['fields']['latitude']['table'] = 'nd_geolocation';
  222. $handler->display->display_options['fields']['latitude']['field'] = 'latitude';
  223. /* Field: Chado Nd Geolocation: Longitude */
  224. $handler->display->display_options['fields']['longitude']['id'] = 'longitude';
  225. $handler->display->display_options['fields']['longitude']['table'] = 'nd_geolocation';
  226. $handler->display->display_options['fields']['longitude']['field'] = 'longitude';
  227. /* Field: Chado Nd Geolocation: Altitude */
  228. $handler->display->display_options['fields']['altitude']['id'] = 'altitude';
  229. $handler->display->display_options['fields']['altitude']['table'] = 'nd_geolocation';
  230. $handler->display->display_options['fields']['altitude']['field'] = 'altitude';
  231. /* Field: Chado Nd Geolocation: Geodetic Datum */
  232. $handler->display->display_options['fields']['geodetic_datum']['id'] = 'geodetic_datum';
  233. $handler->display->display_options['fields']['geodetic_datum']['table'] = 'nd_geolocation';
  234. $handler->display->display_options['fields']['geodetic_datum']['field'] = 'geodetic_datum';
  235. /* Sort criterion: Chado Nd Geolocation: Id */
  236. $handler->display->display_options['sorts']['nd_geolocation_id']['id'] = 'nd_geolocation_id';
  237. $handler->display->display_options['sorts']['nd_geolocation_id']['table'] = 'nd_geolocation';
  238. $handler->display->display_options['sorts']['nd_geolocation_id']['field'] = 'nd_geolocation_id';
  239. $handler->display->display_options['sorts']['nd_geolocation_id']['order'] = 'DESC';
  240. /* Filter criterion: Chado Nd Geolocation: Geodetic Datum */
  241. $handler->display->display_options['filters']['geodetic_datum']['id'] = 'geodetic_datum';
  242. $handler->display->display_options['filters']['geodetic_datum']['table'] = 'nd_geolocation';
  243. $handler->display->display_options['filters']['geodetic_datum']['field'] = 'geodetic_datum';
  244. $handler->display->display_options['filters']['geodetic_datum']['group'] = '0';
  245. $handler->display->display_options['filters']['geodetic_datum']['exposed'] = TRUE;
  246. $handler->display->display_options['filters']['geodetic_datum']['expose']['label'] = 'Geodetic Datum';
  247. $handler->display->display_options['filters']['geodetic_datum']['expose']['identifier'] = 'geodetic_datum';
  248. $handler->display->display_options['filters']['geodetic_datum']['expose']['remember_roles'] = array(
  249. 2 => '2',
  250. 1 => 0,
  251. 3 => 0,
  252. );
  253. /* Filter criterion: Chado Nd Geolocation: Latitude */
  254. $handler->display->display_options['filters']['latitude']['id'] = 'latitude';
  255. $handler->display->display_options['filters']['latitude']['table'] = 'nd_geolocation';
  256. $handler->display->display_options['filters']['latitude']['field'] = 'latitude';
  257. $handler->display->display_options['filters']['latitude']['value'] = '';
  258. $handler->display->display_options['filters']['latitude']['group'] = '0';
  259. $handler->display->display_options['filters']['latitude']['exposed'] = TRUE;
  260. $handler->display->display_options['filters']['latitude']['expose']['label'] = 'Latitude';
  261. $handler->display->display_options['filters']['latitude']['expose']['identifier'] = 'latitude';
  262. $handler->display->display_options['filters']['latitude']['expose']['remember_roles'] = array(
  263. 2 => '2',
  264. 1 => 0,
  265. 3 => 0,
  266. );
  267. /* Filter criterion: Chado Nd Geolocation: Longitude */
  268. $handler->display->display_options['filters']['longitude']['id'] = 'longitude';
  269. $handler->display->display_options['filters']['longitude']['table'] = 'nd_geolocation';
  270. $handler->display->display_options['filters']['longitude']['field'] = 'longitude';
  271. $handler->display->display_options['filters']['longitude']['value'] = '';
  272. $handler->display->display_options['filters']['longitude']['group'] = '0';
  273. $handler->display->display_options['filters']['longitude']['exposed'] = TRUE;
  274. $handler->display->display_options['filters']['longitude']['expose']['label'] = 'Longitude';
  275. $handler->display->display_options['filters']['longitude']['expose']['identifier'] = 'longitude';
  276. $handler->display->display_options['filters']['longitude']['expose']['remember_roles'] = array(
  277. 2 => '2',
  278. 1 => 0,
  279. 3 => 0,
  280. );
  281. /* Filter criterion: Chado Nd Geolocation: Altitude */
  282. $handler->display->display_options['filters']['altitude']['id'] = 'altitude';
  283. $handler->display->display_options['filters']['altitude']['table'] = 'nd_geolocation';
  284. $handler->display->display_options['filters']['altitude']['field'] = 'altitude';
  285. $handler->display->display_options['filters']['altitude']['value'] = '';
  286. $handler->display->display_options['filters']['altitude']['group'] = '0';
  287. $handler->display->display_options['filters']['altitude']['exposed'] = TRUE;
  288. $handler->display->display_options['filters']['altitude']['expose']['label'] = 'Altitude';
  289. $handler->display->display_options['filters']['altitude']['expose']['identifier'] = 'altitude';
  290. $handler->display->display_options['filters']['altitude']['expose']['remember_roles'] = array(
  291. 2 => '2',
  292. 1 => 0,
  293. 3 => 0,
  294. );
  295. /* Filter criterion: Chado Nd Geolocation: Description */
  296. $handler->display->display_options['filters']['description']['id'] = 'description';
  297. $handler->display->display_options['filters']['description']['table'] = 'nd_geolocation';
  298. $handler->display->display_options['filters']['description']['field'] = 'description';
  299. $handler->display->display_options['filters']['description']['operator'] = 'contains';
  300. $handler->display->display_options['filters']['description']['group'] = '0';
  301. $handler->display->display_options['filters']['description']['exposed'] = TRUE;
  302. $handler->display->display_options['filters']['description']['expose']['label'] = 'Description Contains';
  303. $handler->display->display_options['filters']['description']['expose']['identifier'] = 'description';
  304. $handler->display->display_options['filters']['description']['expose']['remember_roles'] = array(
  305. 2 => '2',
  306. 1 => 0,
  307. 3 => 0,
  308. );
  309. /* Display: Page */
  310. $handler = $view->new_display('page', 'Page', 'page_1');
  311. $handler->display->display_options['path'] = 'admin/tripal/legacy/tripal_natdiv/locations';
  312. $handler->display->display_options['menu']['type'] = 'tab';
  313. $handler->display->display_options['menu']['title'] = 'Locations';
  314. $handler->display->display_options['menu']['description'] = 'Geographical locations in which natural diversity experiments might be performed.';
  315. $handler->display->display_options['menu']['weight'] = '-8';
  316. $handler->display->display_options['menu']['name'] = 'management';
  317. $handler->display->display_options['menu']['context'] = 0;
  318. $handler->display->display_options['menu']['context_only_inline'] = 0;
  319. return $view;
  320. }
  321. /**
  322. * Describes the default reagents administration view
  323. *
  324. * @ingroup tripal_legacy_natural_diversity
  325. */
  326. function tripal_natural_diversity_defaultview_admin_reagents() {
  327. $view = new view();
  328. $view->name = 'tripal_natural_diversity_admin_reagents';
  329. $view->description = 'DO NOT DISABLE';
  330. $view->tag = 'tripal admin';
  331. $view->base_table = 'nd_reagent';
  332. $view->human_name = 'NatDiv Reagent Admin';
  333. $view->core = 6;
  334. $view->api_version = '3.0';
  335. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  336. /* Display: Defaults */
  337. $handler = $view->new_display('default', 'Defaults', 'default');
  338. $handler->display->display_options['title'] = 'Reagents';
  339. $handler->display->display_options['use_more_always'] = FALSE;
  340. $handler->display->display_options['access']['type'] = 'perm';
  341. $handler->display->display_options['cache']['type'] = 'none';
  342. $handler->display->display_options['query']['type'] = 'views_query';
  343. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  344. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  345. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of natural diversity protocol reagents that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of reagents or to find a specific reagent.';
  346. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  347. $handler->display->display_options['pager']['type'] = 'full';
  348. $handler->display->display_options['pager']['options']['items_per_page'] = '25';
  349. $handler->display->display_options['pager']['options']['offset'] = '0';
  350. $handler->display->display_options['pager']['options']['id'] = '0';
  351. $handler->display->display_options['pager']['options']['quantity'] = '9';
  352. $handler->display->display_options['style_plugin'] = 'table';
  353. /* No results behavior: Global: Text area */
  354. $handler->display->display_options['empty']['text']['id'] = 'area';
  355. $handler->display->display_options['empty']['text']['table'] = 'views';
  356. $handler->display->display_options['empty']['text']['field'] = 'area';
  357. $handler->display->display_options['empty']['text']['content'] = 'No reagents match the current criteria.';
  358. $handler->display->display_options['empty']['text']['format'] = '2';
  359. /* Field: Chado Nd Reagent: Name */
  360. $handler->display->display_options['fields']['name_1']['id'] = 'name_1';
  361. $handler->display->display_options['fields']['name_1']['table'] = 'nd_reagent';
  362. $handler->display->display_options['fields']['name_1']['field'] = 'name';
  363. /* Field: Chado Cvterm: Name */
  364. $handler->display->display_options['fields']['name']['id'] = 'name';
  365. $handler->display->display_options['fields']['name']['table'] = 'cvterm';
  366. $handler->display->display_options['fields']['name']['field'] = 'name';
  367. $handler->display->display_options['fields']['name']['label'] = 'Type';
  368. /* Sort criterion: Chado Nd Reagent: Id */
  369. $handler->display->display_options['sorts']['nd_reagent_id']['id'] = 'nd_reagent_id';
  370. $handler->display->display_options['sorts']['nd_reagent_id']['table'] = 'nd_reagent';
  371. $handler->display->display_options['sorts']['nd_reagent_id']['field'] = 'nd_reagent_id';
  372. $handler->display->display_options['sorts']['nd_reagent_id']['order'] = 'DESC';
  373. /* Filter criterion: Chado Nd Reagent: Type Id */
  374. $handler->display->display_options['filters']['type_id']['id'] = 'type_id';
  375. $handler->display->display_options['filters']['type_id']['table'] = 'nd_reagent';
  376. $handler->display->display_options['filters']['type_id']['field'] = 'type_id';
  377. $handler->display->display_options['filters']['type_id']['value'] = 'All';
  378. $handler->display->display_options['filters']['type_id']['group'] = '0';
  379. $handler->display->display_options['filters']['type_id']['exposed'] = TRUE;
  380. $handler->display->display_options['filters']['type_id']['expose']['operator_id'] = 'type_id_op';
  381. $handler->display->display_options['filters']['type_id']['expose']['label'] = 'Type';
  382. $handler->display->display_options['filters']['type_id']['expose']['operator'] = 'type_id_op';
  383. $handler->display->display_options['filters']['type_id']['expose']['identifier'] = 'type_id';
  384. $handler->display->display_options['filters']['type_id']['expose']['remember_roles'] = array(
  385. 2 => '2',
  386. 1 => 0,
  387. 3 => 0,
  388. );
  389. /* Filter criterion: Chado Nd Reagent: Name */
  390. $handler->display->display_options['filters']['name']['id'] = 'name';
  391. $handler->display->display_options['filters']['name']['table'] = 'nd_reagent';
  392. $handler->display->display_options['filters']['name']['field'] = 'name';
  393. $handler->display->display_options['filters']['name']['operator'] = 'contains';
  394. $handler->display->display_options['filters']['name']['group'] = '0';
  395. $handler->display->display_options['filters']['name']['exposed'] = TRUE;
  396. $handler->display->display_options['filters']['name']['expose']['operator_id'] = 'name_op';
  397. $handler->display->display_options['filters']['name']['expose']['label'] = 'Name Contains';
  398. $handler->display->display_options['filters']['name']['expose']['operator'] = 'name_op';
  399. $handler->display->display_options['filters']['name']['expose']['identifier'] = 'name';
  400. $handler->display->display_options['filters']['name']['expose']['remember_roles'] = array(
  401. 2 => '2',
  402. 1 => 0,
  403. 3 => 0,
  404. );
  405. /** MANUALLY ADD since filter handler no exporting correctly */
  406. $handler->display->display_options['filters']['type_id']['expose']['values_form_type'] = 'select';
  407. $handler->display->display_options['filters']['type_id']['expose']['select_multiple'] = FALSE;
  408. $handler->display->display_options['filters']['type_id']['expose']['select_optional'] = TRUE;
  409. $handler->display->display_options['filters']['type_id']['expose']['max_length'] = 40;
  410. /* Display: Page */
  411. $handler = $view->new_display('page', 'Page', 'page_1');
  412. $handler->display->display_options['path'] = 'admin/tripal/legacy/tripal_natdiv/reagents';
  413. $handler->display->display_options['menu']['type'] = 'tab';
  414. $handler->display->display_options['menu']['title'] = 'Reagents';
  415. $handler->display->display_options['menu']['description'] = 'Reagents used in natural diversity experiments';
  416. $handler->display->display_options['menu']['weight'] = '0';
  417. $handler->display->display_options['menu']['name'] = 'management';
  418. $handler->display->display_options['menu']['context'] = 0;
  419. $handler->display->display_options['menu']['context_only_inline'] = 0;
  420. /** MANUALLY ADD since filter handler no exporting correctly
  421. $handler->display->display_options['filters']['type_id']['expose']['values_form_type'] = 'select';
  422. $handler->display->display_options['filters']['type_id']['expose']['select_multiple'] = FALSE;
  423. $handler->display->display_options['filters']['type_id']['expose']['select_optional'] = TRUE;
  424. $handler->display->display_options['filters']['type_id']['expose']['max_length'] = 40;
  425. */
  426. return $view;
  427. }
  428. /**
  429. * Describes the default protocols administration view
  430. *
  431. * @ingroup tripal_legacy_natural_diversity
  432. */
  433. function tripal_natural_diversity_defaultview_admin_protocols() {
  434. $view = new view();
  435. $view->name = 'tripal_natural_diversity_admin_protocols';
  436. $view->description = 'DO NOT DISABLE';
  437. $view->tag = 'tripal admin';
  438. $view->base_table = 'nd_protocol';
  439. $view->human_name = 'NatDiv Protocol Admin';
  440. $view->core = 7;
  441. $view->api_version = '3.0';
  442. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  443. /* Display: Defaults */
  444. $handler = $view->new_display('default', 'Defaults', 'default');
  445. $handler->display->display_options['title'] = 'Protocols';
  446. $handler->display->display_options['use_more_always'] = FALSE;
  447. $handler->display->display_options['access']['type'] = 'perm';
  448. $handler->display->display_options['cache']['type'] = 'none';
  449. $handler->display->display_options['query']['type'] = 'views_query';
  450. $handler->display->display_options['exposed_form']['type'] = 'input_required';
  451. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Search';
  452. $handler->display->display_options['exposed_form']['options']['text_input_required'] = 'Click search to see a listing of natural diversity experiment protocols that meet the filter requirements. Use the filters to restrict this set to a more reasonable number of protocols or to find a specific protocol.';
  453. $handler->display->display_options['exposed_form']['options']['text_input_required_format'] = 'full_html';
  454. $handler->display->display_options['pager']['type'] = 'none';
  455. $handler->display->display_options['style_plugin'] = 'table';
  456. $handler->display->display_options['style_options']['grouping'] = '';
  457. $handler->display->display_options['style_options']['columns'] = array(
  458. 'name' => 'name',
  459. );
  460. $handler->display->display_options['style_options']['default'] = 'name';
  461. $handler->display->display_options['style_options']['info'] = array(
  462. 'name' => array(
  463. 'sortable' => 1,
  464. 'separator' => '',
  465. ),
  466. );
  467. /* No results behavior: Global: Text area */
  468. $handler->display->display_options['empty']['text']['id'] = 'area';
  469. $handler->display->display_options['empty']['text']['table'] = 'views';
  470. $handler->display->display_options['empty']['text']['field'] = 'area';
  471. $handler->display->display_options['empty']['text']['content'] = 'No protocols match the current criteria.';
  472. $handler->display->display_options['empty']['text']['format'] = '2';
  473. /* Field: Chado Nd Protocol: Name */
  474. $handler->display->display_options['fields']['name']['id'] = 'name';
  475. $handler->display->display_options['fields']['name']['table'] = 'nd_protocol';
  476. $handler->display->display_options['fields']['name']['field'] = 'name';
  477. /* Sort criterion: Chado Nd Protocol: Id */
  478. $handler->display->display_options['sorts']['nd_protocol_id']['id'] = 'nd_protocol_id';
  479. $handler->display->display_options['sorts']['nd_protocol_id']['table'] = 'nd_protocol';
  480. $handler->display->display_options['sorts']['nd_protocol_id']['field'] = 'nd_protocol_id';
  481. $handler->display->display_options['sorts']['nd_protocol_id']['order'] = 'DESC';
  482. /* Filter criterion: Chado Nd Protocol: Name */
  483. $handler->display->display_options['filters']['name']['id'] = 'name';
  484. $handler->display->display_options['filters']['name']['table'] = 'nd_protocol';
  485. $handler->display->display_options['filters']['name']['field'] = 'name';
  486. $handler->display->display_options['filters']['name']['operator'] = 'contains';
  487. $handler->display->display_options['filters']['name']['group'] = '0';
  488. $handler->display->display_options['filters']['name']['exposed'] = TRUE;
  489. $handler->display->display_options['filters']['name']['expose']['operator_id'] = 'name_op';
  490. $handler->display->display_options['filters']['name']['expose']['label'] = 'Name Contains';
  491. $handler->display->display_options['filters']['name']['expose']['operator'] = 'name_op';
  492. $handler->display->display_options['filters']['name']['expose']['identifier'] = 'name';
  493. $handler->display->display_options['filters']['name']['expose']['remember_roles'] = array(
  494. 2 => '2',
  495. 1 => 0,
  496. 3 => 0,
  497. );
  498. /* Display: Page */
  499. $handler = $view->new_display('page', 'Page', 'page_1');
  500. $handler->display->display_options['path'] = 'admin/tripal/legacy/tripal_natdiv/protocols';
  501. $handler->display->display_options['menu']['type'] = 'tab';
  502. $handler->display->display_options['menu']['title'] = 'Protocols';
  503. $handler->display->display_options['menu']['description'] = 'The protcols used for natural diversity experiments';
  504. $handler->display->display_options['menu']['weight'] = '-5';
  505. $handler->display->display_options['menu']['name'] = 'management';
  506. $handler->display->display_options['menu']['context'] = 0;
  507. $handler->display->display_options['menu']['context_only_inline'] = 0;
  508. return $view;
  509. }