Project

General

Profile

« Previous | Next » 

Revision 7663cd0b

Added by Andreas Kohlbecker over 8 years ago

#4313 first implementation of the taxon experts tab

View differences:

modules/cdm_dataportal/cdm_dataportal.module
488 488
      'type' => MENU_CALLBACK,
489 489
      'weight' => 1,
490 490
      'page arguments' => array(2, "description")
491
      , // Expected callback arguments: name_uuid.
491
      , // Expected callback arguments: taxon_uuid.
492 492
    );
493 493

  
494 494
    $items['cdm_dataportal/taxon/%/all'] = array(
......
498 498
      'type' => MENU_CALLBACK,
499 499
      'weight' => 2,
500 500
      'page arguments' => array(2, "all")
501
      , // Expected callback arguments: name_uuid.
501
      , // Expected callback arguments: taxon_uuid.
502 502
    );
503 503

  
504 504
    $items['cdm_dataportal/taxon/%/description'] = array(
......
508 508
      'type' => MENU_DEFAULT_LOCAL_TASK,
509 509
      'weight' => 2,
510 510
      'page arguments' => array(2, "description")
511
      , // Expected callback arguments: name_uuid.
511
      , // Expected callback arguments: taxon_uuid.
512 512
    );
513 513

  
514 514
    $items['cdm_dataportal/taxon/%/synonymy'] = array(
......
518 518
      'type' => MENU_LOCAL_TASK,
519 519
      'weight' => 4,
520 520
      'page arguments' => array(2, "synonymy", 4)
521
      , // Expected callback arguments: name_uuid.
521
      , // Expected callback arguments: taxon_uuid and ...
522 522
    );
523 523
    $items['cdm_dataportal/taxon/%/images'] = array(
524 524
      'title' => theme('cdm_taxonpage_tab', array('tabname' => 'Images')),
......
527 527
      'type' => MENU_LOCAL_TASK,
528 528
      'weight' => 5,
529 529
      'page arguments' => array(2, "images")
530
      , // Expected callback arguments: name_uuid.
530
      , // Expected callback arguments: taxon_uuid.
531 531
    );
532 532

  
533 533
    $items['cdm_dataportal/taxon/%/specimens'] = array(
......
537 537
      'type' => MENU_LOCAL_TASK,
538 538
      'weight' => 6,
539 539
      'page arguments' => array(2, "specimens")
540
      , // Expected callback arguments: name_uuid.
540
      , // Expected callback arguments: taxon_uuid.
541 541
    );
542 542

  
543 543
    $items['cdm_dataportal/taxon/%/keys'] = array(
......
547 547
      'type' => MENU_LOCAL_TASK,
548 548
      'weight' => 6,
549 549
      'page arguments' => array(2, "keys")
550
      , // Expected callback arguments: name_uuid.
550
      , // Expected callback arguments: taxon_uuid.
551
    );
552

  
553
    $items['cdm_dataportal/taxon/%/experts'] = array(
554
        'title' => theme('cdm_taxonpage_tab', array('tabname' => 'Experts')),
555
        'page callback' => 'cdm_dataportal_taxon_page_view',
556
        'access arguments' => array('access content'),
557
        'type' => MENU_LOCAL_TASK,
558
        'weight' => 6,
559
        'page arguments' => array(2, "experts")
560
    , // Expected callback arguments: taxon_uuid.
551 561
    );
552 562
  }
553 563

  
......
805 815
  $form['val'] = array(
806 816
    '#type' => 'select',
807 817
    '#title' => t('Available classifications'),
808
    '#default_value' => get_taxonomictree_uuid_selected(),
818
    '#default_value' => get_current_classification_uuid(),
809 819
    '#options' => $options,
810 820
    '#attributes' => array('class' => array('highlite-first-child'))
811 821
  );
......
1306 1316
  ));
1307 1317

  
1308 1318
  // Check if the taxon id contained in the currently selected tree.
1309
  $taxon_in_current_tree = taxon_in_current_tree($uuid);
1319
  $taxon_in_current_classification = taxon_in_current_classification($uuid);
1310 1320

  
1311
  if (!$taxon_in_current_tree) {
1321
  if (!$taxon_in_current_classification) {
1312 1322
    $classifications = get_classifications_for_taxon($taxon);
1313 1323
    if (count($classifications) == 0) {
1314 1324
      drupal_set_message(check_plain(t('This concept of the taxon !taxonname is not contained as an accepted taxon in currently chosen classification.', array(
......
1464 1474
  $name_cache = cdm_ws_get(CDM_WS_NAME_NAMECAHE, array($taxon_name_uuid));
1465 1475
  $request_params = array();
1466 1476
  $request_params['query'] = $name_cache;
1467
  $request_params['tree'] = get_taxonomictree_uuid_selected();
1477
  $request_params['tree'] = get_current_classification_uuid();
1468 1478
  $request_params['doTaxa'] = 1;
1469 1479
  $request_params['doSynonyms'] = 1;
1470 1480
  $request_params['doTaxaByCommonNames'] = 0;
......
1482 1492
    $singleTaxon = array_pop($taxon_pager->records);
1483 1493
    if ($singleTaxon->class != "Taxon") {
1484 1494
      // It is a Synonym -> look for the accepted.
1485
      $accepted_taxa = cdm_ws_get(CDM_WS_PORTAL_TAXON_ACCEPTED, array($singleTaxon->uuid, get_taxonomictree_uuid_selected()));
1495
      $accepted_taxa = cdm_ws_get(CDM_WS_PORTAL_TAXON_ACCEPTED, array($singleTaxon->uuid, get_current_classification_uuid()));
1486 1496
      if (!empty($highlite_synonym_uuid)) {
1487 1497
        drupal_goto('cdm_dataportal/taxon/' . $accepted_taxa[0]->uuid . '/synonymy', array('query' => array('highlite' => $highlite_synonym_uuid)));
1488 1498
      }
......
1967 1977
 */
1968 1978
function _cdm_dataportal_acceptedByCurrentView($taxon) {
1969 1979

  
1970
  $defaultTreeUuid = get_taxonomictree_uuid_selected();
1980
  $defaultTreeUuid = get_current_classification_uuid();
1971 1981

  
1972 1982
  if (isset($taxon->taxonNodes)) {
1973 1983
    $taxonNodes = $taxon->taxonNodes;

Also available in: Unified diff