Tripal v1.0 (6.x-1.0)
|
00001 <?php 00002 00028 function tripal_natural_diversity_views_data() { 00029 $data = array(); 00030 00031 if (module_exists('tripal_views')) { 00032 $tables = array( 00033 'nd_experiment', 00034 'nd_geolocation', 00035 'nd_protocol', 00036 'nd_reagent' 00037 ); 00038 foreach ($tables as $tablename) { 00039 $priority = 9; 00040 00041 // check to see if the table is integrated. If it is then integrate it's 00042 // corresponding 'chado_[table]' table. 00043 if (!tripal_views_is_integrated($tablename, $priority)) { 00044 $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, TRUE, $priority); 00045 00046 // Add specialty handlers 00047 switch ($tablename) { 00048 case 'nd_geolocation': 00049 $table_integration_array['fields']['description']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_string'; 00050 $table_integration_array['fields']['geodetic_datum']['handlers']['filter']['name'] = 'tripal_views_handler_filter_select_string'; 00051 $table_integration_array['fields']['latitude']['handlers']['filter']['name'] = 'chado_views_handler_filter_float'; 00052 $table_integration_array['fields']['longitude']['handlers']['filter']['name'] = 'chado_views_handler_filter_float'; 00053 $table_integration_array['fields']['altitude']['handlers']['filter']['name'] = 'chado_views_handler_filter_float'; 00054 break; 00055 } 00056 00057 tripal_views_integration_add_entry($table_integration_array); 00058 } 00059 } 00060 00061 $tables = array( 00062 'nd_experiment_contact', 00063 'nd_experiment_dbxref', 00064 'nd_experiment_genotype', 00065 'nd_experiment_phenotype', 00066 'nd_experiment_project', 00067 'nd_experiment_protocol', 00068 'nd_experiment_pub', 00069 'nd_experiment_stock', 00070 'nd_experiment_stock_dbxref', 00071 'nd_experiment_stockprop', 00072 'nd_experimentprop', 00073 'nd_geolocationprop', 00074 'nd_protocol_reagent', 00075 'nd_protocolprop', 00076 'nd_reagent_relationship', 00077 'nd_reagentprop' 00078 ); 00079 foreach ($tables as $tablename) { 00080 $priority = 9; 00081 if (!tripal_views_is_integrated($tablename, $priority)) { 00082 $table_integration_array = tripal_views_get_integration_array_for_chado_table($tablename, FALSE, $priority); 00083 tripal_views_integration_add_entry($table_integration_array); 00084 } 00085 } 00086 } 00087 00088 return $data; 00089 } 00090 00099 function tripal_natural_diversity_views_handlers() { 00100 return array( 00101 'info' => array( 00102 'path' => drupal_get_path('module', 'tripal_natural_diversity') . '/views/handlers', 00103 ), 00104 'handlers' => array( 00105 'views_handler_field_chado_relationship_all' => array( 00106 'parent' => 'views_handler_field_prerender_list', 00107 ), 00108 'views_handler_field_chado_relationship_by_type' => array( 00109 'parent' => 'views_handler_field_prerender_list', 00110 ), 00111 ), 00112 ); 00113 } 00114 00120 function tripal_natural_diversity_views_default_views() { 00121 $views = array(); 00122 00123 00124 if (!module_exists('tripal_views')) { 00125 return $views; 00126 } 00127 00128 00129 // Experiment Listing 00130 $view = new view; 00131 $view->name = 'natdiv_experiment_listing'; 00132 $view->description = 'A listing of all natural diversity experiments'; 00133 $view->tag = 'chado default'; 00134 $view->base_table = 'nd_experiment'; 00135 $view->core = 6; 00136 $view->api_version = '2'; 00137 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ 00138 $handler = $view->new_display('default', 'Defaults', 'default'); 00139 $handler->override_option('fields', array( 00140 'name' => array( 00141 'label' => 'Type', 00142 'alter' => array( 00143 'alter_text' => 0, 00144 'text' => '', 00145 'make_link' => 0, 00146 'path' => '', 00147 'absolute' => 0, 00148 'link_class' => '', 00149 'alt' => '', 00150 'rel' => '', 00151 'prefix' => '', 00152 'suffix' => '', 00153 'target' => '', 00154 'help' => '', 00155 'trim' => 0, 00156 'max_length' => '', 00157 'word_boundary' => 1, 00158 'ellipsis' => 1, 00159 'html' => 0, 00160 'strip_tags' => 0, 00161 ), 00162 'empty' => '', 00163 'hide_empty' => 0, 00164 'empty_zero' => 0, 00165 'hide_alter_empty' => 1, 00166 'type' => 'separator', 00167 'separator' => ', ', 00168 'exclude' => 0, 00169 'id' => 'name', 00170 'table' => 'cvterm', 00171 'field' => 'name', 00172 'relationship' => 'none', 00173 ), 00174 'description' => array( 00175 'label' => 'Location Experiment Performed', 00176 'alter' => array( 00177 'alter_text' => 0, 00178 'text' => '', 00179 'make_link' => 0, 00180 'path' => '', 00181 'absolute' => 0, 00182 'link_class' => '', 00183 'alt' => '', 00184 'rel' => '', 00185 'prefix' => '', 00186 'suffix' => '', 00187 'target' => '', 00188 'help' => '', 00189 'trim' => 0, 00190 'max_length' => '', 00191 'word_boundary' => 1, 00192 'ellipsis' => 1, 00193 'html' => 0, 00194 'strip_tags' => 0, 00195 ), 00196 'empty' => '', 00197 'hide_empty' => 0, 00198 'empty_zero' => 0, 00199 'hide_alter_empty' => 1, 00200 'type' => 'separator', 00201 'separator' => ', ', 00202 'exclude' => 0, 00203 'id' => 'description', 00204 'table' => 'nd_geolocation', 00205 'field' => 'description', 00206 'relationship' => 'none', 00207 ), 00208 )); 00209 $handler->override_option('sorts', array( 00210 'name' => array( 00211 'order' => 'ASC', 00212 'id' => 'name', 00213 'table' => 'cvterm', 00214 'field' => 'name', 00215 'relationship' => 'none', 00216 ), 00217 'description' => array( 00218 'order' => 'ASC', 00219 'id' => 'description', 00220 'table' => 'nd_geolocation', 00221 'field' => 'description', 00222 'relationship' => 'none', 00223 ), 00224 )); 00225 $handler->override_option('filters', array( 00226 'type_id' => array( 00227 'operator' => '=', 00228 'value' => '', 00229 'group' => '0', 00230 'exposed' => TRUE, 00231 'expose' => array( 00232 'use_operator' => 0, 00233 'operator' => 'type_id_op', 00234 'identifier' => 'type_id', 00235 'label' => 'Experiment Type', 00236 'remember' => 0, 00237 ), 00238 'case' => 1, 00239 'id' => 'type_id', 00240 'table' => 'nd_experiment', 00241 'field' => 'type_id', 00242 'relationship' => 'none', 00243 'values_form_type' => 'select', 00244 'multiple' => 1, 00245 'optional' => 0, 00246 'show_all' => 0, 00247 'agg' => array( 00248 'records_with' => 1, 00249 'aggregates_with' => 1, 00250 ), 00251 ), 00252 'description' => array( 00253 'operator' => '=', 00254 'value' => array(), 00255 'group' => '0', 00256 'exposed' => TRUE, 00257 'expose' => array( 00258 'use_operator' => 0, 00259 'operator' => 'description_op', 00260 'identifier' => 'geolocation', 00261 'label' => 'Location Experiment Performed', 00262 'remember' => 0, 00263 ), 00264 'case' => 1, 00265 'id' => 'description', 00266 'table' => 'nd_geolocation', 00267 'field' => 'description', 00268 'relationship' => 'none', 00269 'agg' => array( 00270 'records_with' => 1, 00271 'aggregates_with' => 1, 00272 ), 00273 'values_form_type' => 'select', 00274 'multiple' => 1, 00275 'optional' => 0, 00276 ), 00277 'search_results' => array( 00278 'operator' => '=', 00279 'value' => '', 00280 'group' => '0', 00281 'exposed' => FALSE, 00282 'expose' => array( 00283 'operator' => FALSE, 00284 'label' => '', 00285 ), 00286 'id' => 'search_results', 00287 'table' => 'views', 00288 'field' => 'search_results', 00289 'relationship' => 'none', 00290 'apply_button' => 'Show', 00291 '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.', 00292 ), 00293 )); 00294 $handler->override_option('access', array( 00295 'type' => 'perm', 00296 'perm' => 'access content', 00297 )); 00298 $handler->override_option('cache', array( 00299 'type' => 'none', 00300 )); 00301 $handler->override_option('title', 'Natural Diversity Experiments'); 00302 $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.'); 00303 $handler->override_option('header_format', '2'); 00304 $handler->override_option('header_empty', 0); 00305 $handler->override_option('empty', 'No natural diversity experiments match the current criteria.'); 00306 $handler->override_option('empty_format', '2'); 00307 $handler->override_option('items_per_page', 50); 00308 $handler->override_option('use_pager', '1'); 00309 $handler->override_option('style_plugin', 'table'); 00310 $handler->override_option('style_options', array( 00311 'grouping' => '', 00312 'override' => 1, 00313 'sticky' => 0, 00314 'order' => 'asc', 00315 'summary' => '', 00316 'columns' => array( 00317 'name' => 'name', 00318 'description' => 'description', 00319 ), 00320 'info' => array( 00321 'name' => array( 00322 'sortable' => 1, 00323 'separator' => '', 00324 ), 00325 'description' => array( 00326 'sortable' => 1, 00327 'separator' => '', 00328 ), 00329 ), 00330 'default' => '-1', 00331 )); 00332 $handler = $view->new_display('page', 'Page', 'page_1'); 00333 $handler->override_option('path', 'chado/natdiv_experiments'); 00334 $handler->override_option('menu', array( 00335 'type' => 'normal', 00336 'title' => 'Natural Diversity Experiments', 00337 '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.', 00338 'weight' => '10', 00339 'name' => 'navigation', 00340 )); 00341 $handler->override_option('tab_options', array( 00342 'type' => 'none', 00343 'title' => '', 00344 'description' => '', 00345 'weight' => 0, 00346 'name' => 'navigation', 00347 )); 00348 $views[$view->name] = $view; 00349 00350 // List geolocations 00351 $view = new view; 00352 $view->name = 'geolocation_listing'; 00353 $view->description = 'A listing of locations where natural diversity experiments took place.'; 00354 $view->tag = 'chado default'; 00355 $view->base_table = 'nd_geolocation'; 00356 $view->core = 6; 00357 $view->api_version = '2'; 00358 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ 00359 $handler = $view->new_display('default', 'Defaults', 'default'); 00360 $handler->override_option('fields', array( 00361 'description' => array( 00362 'label' => 'Name', 00363 'alter' => array( 00364 'alter_text' => 0, 00365 'text' => '', 00366 'make_link' => 0, 00367 'path' => '', 00368 'absolute' => 0, 00369 'link_class' => '', 00370 'alt' => '', 00371 'rel' => '', 00372 'prefix' => '', 00373 'suffix' => '', 00374 'target' => '', 00375 'help' => '', 00376 'trim' => 0, 00377 'max_length' => '', 00378 'word_boundary' => 1, 00379 'ellipsis' => 1, 00380 'html' => 0, 00381 'strip_tags' => 0, 00382 ), 00383 'empty' => '', 00384 'hide_empty' => 0, 00385 'empty_zero' => 0, 00386 'hide_alter_empty' => 1, 00387 'type' => 'separator', 00388 'separator' => ', ', 00389 'exclude' => 0, 00390 'id' => 'description', 00391 'table' => 'nd_geolocation', 00392 'field' => 'description', 00393 'relationship' => 'none', 00394 ), 00395 'latitude' => array( 00396 'label' => 'Latitude', 00397 'alter' => array( 00398 'alter_text' => 0, 00399 'text' => '', 00400 'make_link' => 0, 00401 'path' => '', 00402 'absolute' => 0, 00403 'link_class' => '', 00404 'alt' => '', 00405 'rel' => '', 00406 'prefix' => '', 00407 'suffix' => '', 00408 'target' => '', 00409 'help' => '', 00410 'trim' => 0, 00411 'max_length' => '', 00412 'word_boundary' => 1, 00413 'ellipsis' => 1, 00414 'html' => 0, 00415 'strip_tags' => 0, 00416 ), 00417 'empty' => '', 00418 'hide_empty' => 0, 00419 'empty_zero' => 0, 00420 'hide_alter_empty' => 1, 00421 'type' => 'separator', 00422 'separator' => ', ', 00423 'exclude' => 0, 00424 'id' => 'latitude', 00425 'table' => 'nd_geolocation', 00426 'field' => 'latitude', 00427 'relationship' => 'none', 00428 ), 00429 'longitude' => array( 00430 'label' => 'Longitude', 00431 'alter' => array( 00432 'alter_text' => 0, 00433 'text' => '', 00434 'make_link' => 0, 00435 'path' => '', 00436 'absolute' => 0, 00437 'link_class' => '', 00438 'alt' => '', 00439 'rel' => '', 00440 'prefix' => '', 00441 'suffix' => '', 00442 'target' => '', 00443 'help' => '', 00444 'trim' => 0, 00445 'max_length' => '', 00446 'word_boundary' => 1, 00447 'ellipsis' => 1, 00448 'html' => 0, 00449 'strip_tags' => 0, 00450 ), 00451 'empty' => '', 00452 'hide_empty' => 0, 00453 'empty_zero' => 0, 00454 'hide_alter_empty' => 1, 00455 'type' => 'separator', 00456 'separator' => ', ', 00457 'exclude' => 0, 00458 'id' => 'longitude', 00459 'table' => 'nd_geolocation', 00460 'field' => 'longitude', 00461 'relationship' => 'none', 00462 ), 00463 'altitude' => array( 00464 'label' => 'Altitude', 00465 'alter' => array( 00466 'alter_text' => 0, 00467 'text' => '', 00468 'make_link' => 0, 00469 'path' => '', 00470 'absolute' => 0, 00471 'link_class' => '', 00472 'alt' => '', 00473 'rel' => '', 00474 'prefix' => '', 00475 'suffix' => '', 00476 'target' => '', 00477 'help' => '', 00478 'trim' => 0, 00479 'max_length' => '', 00480 'word_boundary' => 1, 00481 'ellipsis' => 1, 00482 'html' => 0, 00483 'strip_tags' => 0, 00484 ), 00485 'empty' => '', 00486 'hide_empty' => 0, 00487 'empty_zero' => 0, 00488 'hide_alter_empty' => 1, 00489 'type' => 'separator', 00490 'separator' => ', ', 00491 'exclude' => 0, 00492 'id' => 'altitude', 00493 'table' => 'nd_geolocation', 00494 'field' => 'altitude', 00495 'relationship' => 'none', 00496 ), 00497 'geodetic_datum' => array( 00498 'label' => 'Geodetic Datum', 00499 'alter' => array( 00500 'alter_text' => 0, 00501 'text' => '', 00502 'make_link' => 0, 00503 'path' => '', 00504 'absolute' => 0, 00505 'link_class' => '', 00506 'alt' => '', 00507 'rel' => '', 00508 'prefix' => '', 00509 'suffix' => '', 00510 'target' => '', 00511 'help' => '', 00512 'trim' => 0, 00513 'max_length' => '', 00514 'word_boundary' => 1, 00515 'ellipsis' => 1, 00516 'html' => 0, 00517 'strip_tags' => 0, 00518 ), 00519 'empty' => '', 00520 'hide_empty' => 0, 00521 'empty_zero' => 0, 00522 'hide_alter_empty' => 1, 00523 'type' => 'separator', 00524 'separator' => ', ', 00525 'exclude' => 0, 00526 'id' => 'geodetic_datum', 00527 'table' => 'nd_geolocation', 00528 'field' => 'geodetic_datum', 00529 'relationship' => 'none', 00530 ), 00531 )); 00532 $handler->override_option('filters', array( 00533 'geodetic_datum' => array( 00534 'operator' => '=', 00535 'value' => array(), 00536 'group' => '0', 00537 'exposed' => TRUE, 00538 'expose' => array( 00539 'use_operator' => 0, 00540 'operator' => 'geodetic_datum_op', 00541 'identifier' => 'geodetic_datum', 00542 'label' => 'Geodetic Datum', 00543 'remember' => 0, 00544 ), 00545 'case' => 1, 00546 'id' => 'geodetic_datum', 00547 'table' => 'nd_geolocation', 00548 'field' => 'geodetic_datum', 00549 'relationship' => 'none', 00550 'agg' => array( 00551 'records_with' => 1, 00552 'aggregates_with' => 1, 00553 ), 00554 'values_form_type' => 'select', 00555 'multiple' => 1, 00556 'optional' => 0, 00557 ), 00558 'latitude' => array( 00559 'operator' => '=', 00560 'value' => array( 00561 'value' => '', 00562 'min' => '', 00563 'max' => '', 00564 ), 00565 'group' => '0', 00566 'exposed' => TRUE, 00567 'expose' => array( 00568 'use_operator' => 1, 00569 'operator' => 'latitude_op', 00570 'identifier' => 'latitude', 00571 'label' => 'Latitude', 00572 'optional' => 0, 00573 'remember' => 0, 00574 ), 00575 'case' => 1, 00576 'id' => 'latitude', 00577 'table' => 'nd_geolocation', 00578 'field' => 'latitude', 00579 'relationship' => 'none', 00580 'agg' => array( 00581 'records_with' => 1, 00582 'aggregates_with' => 1, 00583 ), 00584 ), 00585 'longitude' => array( 00586 'operator' => '=', 00587 'value' => array( 00588 'value' => '', 00589 'min' => '', 00590 'max' => '', 00591 ), 00592 'group' => '0', 00593 'exposed' => TRUE, 00594 'expose' => array( 00595 'use_operator' => 1, 00596 'operator' => 'longitude_op', 00597 'identifier' => 'longitude', 00598 'label' => 'Longitude', 00599 'optional' => 0, 00600 'remember' => 0, 00601 ), 00602 'case' => 1, 00603 'id' => 'longitude', 00604 'table' => 'nd_geolocation', 00605 'field' => 'longitude', 00606 'relationship' => 'none', 00607 'agg' => array( 00608 'records_with' => 1, 00609 'aggregates_with' => 1, 00610 ), 00611 ), 00612 'altitude' => array( 00613 'operator' => '=', 00614 'value' => array( 00615 'value' => '', 00616 'min' => '', 00617 'max' => '', 00618 ), 00619 'group' => '0', 00620 'exposed' => TRUE, 00621 'expose' => array( 00622 'use_operator' => 1, 00623 'operator' => 'altitude_op', 00624 'identifier' => 'altitude', 00625 'label' => 'Altitude', 00626 'optional' => 0, 00627 'remember' => 0, 00628 ), 00629 'case' => 0, 00630 'id' => 'altitude', 00631 'table' => 'nd_geolocation', 00632 'field' => 'altitude', 00633 'relationship' => 'none', 00634 'agg' => array( 00635 'records_with' => 1, 00636 'aggregates_with' => 1, 00637 ), 00638 ), 00639 'description' => array( 00640 'operator' => '~', 00641 'value' => '', 00642 'group' => '0', 00643 'exposed' => TRUE, 00644 'expose' => array( 00645 'use_operator' => 0, 00646 'operator' => 'description_op', 00647 'identifier' => 'description', 00648 'label' => 'Name Contains', 00649 'remember' => 0, 00650 ), 00651 'case' => 0, 00652 'id' => 'description', 00653 'table' => 'nd_geolocation', 00654 'field' => 'description', 00655 'relationship' => 'none', 00656 'agg' => array( 00657 'records_with' => 1, 00658 'aggregates_with' => 1, 00659 ), 00660 'values_form_type' => 'textfield', 00661 'multiple' => 0, 00662 'optional' => 0, 00663 ), 00664 )); 00665 $handler->override_option('access', array( 00666 'type' => 'perm', 00667 'perm' => 'access content', 00668 )); 00669 $handler->override_option('cache', array( 00670 'type' => 'none', 00671 )); 00672 $handler->override_option('title', 'Geographical Locations'); 00673 $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.'); 00674 $handler->override_option('header_format', '2'); 00675 $handler->override_option('header_empty', 0); 00676 $handler->override_option('empty', 'No locations matched the current criteria.'); 00677 $handler->override_option('empty_format', '2'); 00678 $handler->override_option('items_per_page', 50); 00679 $handler->override_option('use_pager', '1'); 00680 $handler->override_option('style_plugin', 'table'); 00681 $handler->override_option('style_options', array( 00682 'grouping' => '', 00683 'override' => 1, 00684 'sticky' => 0, 00685 'order' => 'asc', 00686 'summary' => '', 00687 'columns' => array( 00688 'description' => 'description', 00689 'latitude' => 'latitude', 00690 'longitude' => 'longitude', 00691 'altitude' => 'altitude', 00692 'geodetic_datum' => 'geodetic_datum', 00693 ), 00694 'info' => array( 00695 'description' => array( 00696 'sortable' => 1, 00697 'separator' => '', 00698 ), 00699 'latitude' => array( 00700 'sortable' => 1, 00701 'separator' => '', 00702 ), 00703 'longitude' => array( 00704 'sortable' => 1, 00705 'separator' => '', 00706 ), 00707 'altitude' => array( 00708 'sortable' => 1, 00709 'separator' => '', 00710 ), 00711 'geodetic_datum' => array( 00712 'sortable' => 1, 00713 'separator' => '', 00714 ), 00715 ), 00716 'default' => 'description', 00717 )); 00718 $handler = $view->new_display('page', 'Page', 'page_1'); 00719 $handler->override_option('path', 'chado/natdiv_geolocations'); 00720 $handler->override_option('menu', array( 00721 'type' => 'normal', 00722 'title' => 'Locations', 00723 'description' => 'Geographical locations in which natural diversity experiments might be performed.', 00724 'weight' => '10', 00725 'name' => 'navigation', 00726 )); 00727 $handler->override_option('tab_options', array( 00728 'type' => 'none', 00729 'title' => '', 00730 'description' => '', 00731 'weight' => 0, 00732 'name' => 'navigation', 00733 )); 00734 $views[$view->name] = $view; 00735 00736 // List protocols 00737 $view = new view; 00738 $view->name = 'natdiv_protocol_listing'; 00739 $view->description = 'A listing of protocols used for natural diversity experiments'; 00740 $view->tag = 'chado default'; 00741 $view->base_table = 'nd_protocol'; 00742 $view->core = 6; 00743 $view->api_version = '2'; 00744 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ 00745 $handler = $view->new_display('default', 'Defaults', 'default'); 00746 $handler->override_option('fields', array( 00747 'name' => array( 00748 'label' => 'Name', 00749 'alter' => array( 00750 'alter_text' => 0, 00751 'text' => '', 00752 'make_link' => 0, 00753 'path' => '', 00754 'absolute' => 0, 00755 'link_class' => '', 00756 'alt' => '', 00757 'rel' => '', 00758 'prefix' => '', 00759 'suffix' => '', 00760 'target' => '', 00761 'help' => '', 00762 'trim' => 0, 00763 'max_length' => '', 00764 'word_boundary' => 1, 00765 'ellipsis' => 1, 00766 'html' => 0, 00767 'strip_tags' => 0, 00768 ), 00769 'empty' => '', 00770 'hide_empty' => 0, 00771 'empty_zero' => 0, 00772 'hide_alter_empty' => 1, 00773 'type' => 'separator', 00774 'separator' => ', ', 00775 'exclude' => 0, 00776 'id' => 'name', 00777 'table' => 'nd_protocol', 00778 'field' => 'name', 00779 'relationship' => 'none', 00780 ), 00781 )); 00782 $handler->override_option('filters', array( 00783 'name' => array( 00784 'operator' => '~', 00785 'value' => '', 00786 'group' => '0', 00787 'exposed' => TRUE, 00788 'expose' => array( 00789 'use_operator' => 0, 00790 'operator' => 'name_op', 00791 'identifier' => 'name', 00792 'label' => 'Name Contains', 00793 'remember' => 0, 00794 ), 00795 'case' => 0, 00796 'id' => 'name', 00797 'table' => 'nd_protocol', 00798 'field' => 'name', 00799 'relationship' => 'none', 00800 'agg' => array( 00801 'records_with' => 1, 00802 'aggregates_with' => 1, 00803 ), 00804 ), 00805 'search_results' => array( 00806 'operator' => '=', 00807 'value' => '', 00808 'group' => '0', 00809 'exposed' => FALSE, 00810 'expose' => array( 00811 'operator' => FALSE, 00812 'label' => '', 00813 ), 00814 'id' => 'search_results', 00815 'table' => 'views', 00816 'field' => 'search_results', 00817 'relationship' => 'none', 00818 'apply_button' => 'Show', 00819 '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.', 00820 ), 00821 )); 00822 $handler->override_option('access', array( 00823 'type' => 'perm', 00824 'perm' => 'access content', 00825 )); 00826 $handler->override_option('cache', array( 00827 'type' => 'none', 00828 )); 00829 $handler->override_option('title', 'Protocols'); 00830 $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.'); 00831 $handler->override_option('header_format', '2'); 00832 $handler->override_option('header_empty', 0); 00833 $handler->override_option('empty', 'No protocols match the current criteria.'); 00834 $handler->override_option('empty_format', '2'); 00835 $handler->override_option('items_per_page', 50); 00836 $handler->override_option('use_pager', '1'); 00837 $handler->override_option('style_plugin', 'table'); 00838 $handler->override_option('style_options', array( 00839 'grouping' => '', 00840 'override' => 1, 00841 'sticky' => 0, 00842 'order' => 'asc', 00843 'summary' => '', 00844 'columns' => array( 00845 'name' => 'name', 00846 ), 00847 'info' => array( 00848 'name' => array( 00849 'sortable' => 1, 00850 'separator' => '', 00851 ), 00852 ), 00853 'default' => 'name', 00854 )); 00855 $handler = $view->new_display('page', 'Page', 'page_1'); 00856 $handler->override_option('path', 'chado/natdiv_protocols'); 00857 $handler->override_option('menu', array( 00858 'type' => 'normal', 00859 'title' => 'Protocols', 00860 'description' => 'The protcols used for natural diversity experiments', 00861 'weight' => '10', 00862 'name' => 'navigation', 00863 )); 00864 $handler->override_option('tab_options', array( 00865 'type' => 'none', 00866 'title' => '', 00867 'description' => '', 00868 'weight' => 0, 00869 'name' => 'navigation', 00870 )); 00871 $views[$view->name] = $view; 00872 00873 // List Reagents 00874 $view = new view; 00875 $view->name = 'natdiv_reagent_listing'; 00876 $view->description = 'A listing of reagents used in natural diversity experiments'; 00877 $view->tag = 'chado default'; 00878 $view->base_table = 'nd_reagent'; 00879 $view->core = 6; 00880 $view->api_version = '2'; 00881 $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ 00882 $handler = $view->new_display('default', 'Defaults', 'default'); 00883 $handler->override_option('fields', array( 00884 'name_1' => array( 00885 'label' => 'Name', 00886 'alter' => array( 00887 'alter_text' => 0, 00888 'text' => '', 00889 'make_link' => 0, 00890 'path' => '', 00891 'absolute' => 0, 00892 'link_class' => '', 00893 'alt' => '', 00894 'rel' => '', 00895 'prefix' => '', 00896 'suffix' => '', 00897 'target' => '', 00898 'help' => '', 00899 'trim' => 0, 00900 'max_length' => '', 00901 'word_boundary' => 1, 00902 'ellipsis' => 1, 00903 'html' => 0, 00904 'strip_tags' => 0, 00905 ), 00906 'empty' => '', 00907 'hide_empty' => 0, 00908 'empty_zero' => 0, 00909 'hide_alter_empty' => 1, 00910 'type' => 'separator', 00911 'separator' => ', ', 00912 'exclude' => 0, 00913 'id' => 'name_1', 00914 'table' => 'nd_reagent', 00915 'field' => 'name', 00916 'relationship' => 'none', 00917 ), 00918 'name' => array( 00919 'label' => 'Type', 00920 'alter' => array( 00921 'alter_text' => 0, 00922 'text' => '', 00923 'make_link' => 0, 00924 'path' => '', 00925 'absolute' => 0, 00926 'link_class' => '', 00927 'alt' => '', 00928 'rel' => '', 00929 'prefix' => '', 00930 'suffix' => '', 00931 'target' => '', 00932 'help' => '', 00933 'trim' => 0, 00934 'max_length' => '', 00935 'word_boundary' => 1, 00936 'ellipsis' => 1, 00937 'html' => 0, 00938 'strip_tags' => 0, 00939 ), 00940 'empty' => '', 00941 'hide_empty' => 0, 00942 'empty_zero' => 0, 00943 'hide_alter_empty' => 1, 00944 'type' => 'separator', 00945 'separator' => ', ', 00946 'exclude' => 0, 00947 'id' => 'name', 00948 'table' => 'cvterm', 00949 'field' => 'name', 00950 'relationship' => 'none', 00951 ), 00952 )); 00953 $handler->override_option('filters', array( 00954 'type_id' => array( 00955 'operator' => '=', 00956 'value' => '', 00957 'group' => '0', 00958 'exposed' => TRUE, 00959 'expose' => array( 00960 'use_operator' => 0, 00961 'operator' => 'type_id_op', 00962 'identifier' => 'type_id', 00963 'label' => 'Type', 00964 'remember' => 0, 00965 ), 00966 'case' => 1, 00967 'id' => 'type_id', 00968 'table' => 'nd_reagent', 00969 'field' => 'type_id', 00970 'relationship' => 'none', 00971 'values_form_type' => 'select', 00972 'multiple' => 1, 00973 'optional' => 0, 00974 'show_all' => 0, 00975 'agg' => array( 00976 'records_with' => 1, 00977 'aggregates_with' => 1, 00978 ), 00979 ), 00980 'search_results' => array( 00981 'operator' => '=', 00982 'value' => '', 00983 'group' => '0', 00984 'exposed' => FALSE, 00985 'expose' => array( 00986 'operator' => FALSE, 00987 'label' => '', 00988 ), 00989 'id' => 'search_results', 00990 'table' => 'views', 00991 'field' => 'search_results', 00992 'relationship' => 'none', 00993 'apply_button' => 'Show', 00994 '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.', 00995 ), 00996 'name' => array( 00997 'operator' => '~', 00998 'value' => '', 00999 'group' => '0', 01000 'exposed' => TRUE, 01001 'expose' => array( 01002 'use_operator' => 0, 01003 'operator' => 'name_op', 01004 'identifier' => 'name', 01005 'label' => 'Name Contains', 01006 'remember' => 0, 01007 ), 01008 'case' => 0, 01009 'id' => 'name', 01010 'table' => 'nd_reagent', 01011 'field' => 'name', 01012 'relationship' => 'none', 01013 'agg' => array( 01014 'records_with' => 1, 01015 'aggregates_with' => 1, 01016 ), 01017 ), 01018 )); 01019 $handler->override_option('access', array( 01020 'type' => 'perm', 01021 'perm' => 'access content', 01022 )); 01023 $handler->override_option('cache', array( 01024 'type' => 'none', 01025 )); 01026 $handler->override_option('title', 'Reagents'); 01027 $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.'); 01028 $handler->override_option('header_format', '2'); 01029 $handler->override_option('header_empty', 0); 01030 $handler->override_option('empty', 'No reagents match the current criteria.'); 01031 $handler->override_option('empty_format', '2'); 01032 $handler->override_option('items_per_page', 50); 01033 $handler->override_option('use_pager', '1'); 01034 $handler->override_option('style_plugin', 'table'); 01035 $handler = $view->new_display('page', 'Page', 'page_1'); 01036 $handler->override_option('path', 'chado/natdiv_reagents'); 01037 $handler->override_option('menu', array( 01038 'type' => 'normal', 01039 'title' => 'Reagents', 01040 'description' => 'Reagents used in natural diversity experiments', 01041 'weight' => '10', 01042 'name' => 'navigation', 01043 )); 01044 $handler->override_option('tab_options', array( 01045 'type' => 'none', 01046 'title' => '', 01047 'description' => '', 01048 'weight' => 0, 01049 'name' => 'navigation', 01050 )); 01051 $views[$view->name] = $view; 01052 01053 return $views; 01054 } 01055