Project

General

Profile

« Previous | Next » 

Revision a1ce57ce

Added by Katja Luther about 5 years ago

ref #7755: rename baseURL for occurrences to occurrence/uuid

View differences:

modules/cdm_dataportal/cdm_dataportal.module
430 430
    // Expected callback arguments: uuid.
431 431
  );
432 432

  
433
  $items['cdm_dataportal/specimen'] = array(
433
  $items['cdm_dataportal/occurrence'] = array(
434 434
      'page callback' => 'cdm_dataportal_specimen_page_view',
435 435
      'access arguments' => array('access cdm content'),
436 436
      'type' => MENU_CALLBACK,
......
500 500
    'type' => MENU_DEFAULT_LOCAL_TASK,
501 501
  );
502 502

  
503
    $items['cdm_dataportal/search/blast'] = array(
504
        'title' => 'Blast', // will be passed through t()
505
        'page callback' => 'cdm_dataportal_view_search_blast',
506
        'access arguments' => array('access cdm content'),
507
        'type' => MENU_DEFAULT_LOCAL_TASK,
508
    );
509

  
503 510
  $items['cdm_dataportal/search/taxon_by_description'] = array(
504 511
    'title' => 'By content category', // will be passed through t()
505 512
    'page callback' => 'cdm_dataportal_view_search_taxon_by_description',
......
511 518
    'access arguments' => array('access cdm content'),
512 519
    'type' => MENU_CALLBACK,
513 520
  );
521

  
522

  
523
    $items['cdm_dataportal/search/results/specimen'] = array(
524
        'page callback' => 'cdm_dataportal_view_search_results_specimen',
525
        'access arguments' => array('access cdm content'),
526
        'type' => MENU_CALLBACK,
527
    );
514 528
  /*
515 529
   * MENU_CALLBACK at cdm_dataportal/registration-search is needed to make the
516 530
   * tabs in the subordinate paths work, accessing this 'page' will cause the
......
801 815

  
802 816
      if (variable_get('cdm_dataportal_show_advanced_search', 1)) {
803 817
        $block['content'] .= '<div>' . l(t('Advanced Search'), 'cdm_dataportal/search') . '</div>';
818
       // $block['content'] .= '<div>' . l(t('Blast Search'), 'cdm_dataportal/search/blast') . '</div>';
804 819
      }
805 820
      return $block;
806 821
    case '4':
......
1850 1865
 *
1851 1866
 * NOTE: The advance search form allows searching for taxa.
1852 1867
 */
1853
function cdm_dataportal_view_search_advanced() {
1868
function cdm_dataportal_view_search_advanced($arg) {
1869
    if (isset($arg)){
1870
        if ($arg == 'blast'){
1871
            return cdm_dataportal_view_search_blast();
1872
        }
1873
    }
1854 1874
  drupal_set_title(t('Advanced search'), PASS_THROUGH);
1855 1875
  return drupal_get_form('cdm_dataportal_search_taxon_form_advanced');
1856 1876
}
1857 1877

  
1878
/**
1879
 * Creates a page with the blast search form.
1880
 *
1881
 * NOTE: The advance search form allows searching for specimen in blast DB.
1882
 */
1883
function cdm_dataportal_view_search_blast() {
1884
    drupal_set_title(t('Blast search'), PASS_THROUGH);
1885
    return drupal_get_form('cdm_dataportal_search_blast_form');
1886
}
1887

  
1858 1888
/**
1859 1889
 * Creates a page with the search form for searching by taxon descriptions.
1860 1890
 */
......
1910 1940
    ));
1911 1941
}
1912 1942

  
1943
/**
1944
 * Executes the blast search and generates the result list of specimen.
1945
 */
1946
function cdm_dataportal_view_search_results_specimen() {
1947

  
1948
    $specimenPager = cdm_dataportal_search_blast_execute();
1949

  
1950
    return theme('cdm_search_specimen_results', array(
1951
        'pager' => $specimenPager,
1952
        'path' => 'cdm_dataportal/search/results/specimen',
1953
    ));
1954
}
1955

  
1956

  
1913 1957
/**
1914 1958
 * Executes the search for registrations and generates the result list..
1915 1959
 */
......
2037 2081
        return FALSE;
2038 2082
    }
2039 2083
    else {
2040
        return 'cdm_dataportal/specimen/' . $uuid;
2084
        return 'cdm_dataportal/occurrence/' . $uuid;
2041 2085
    }
2042 2086
}
2043 2087

  

Also available in: Unified diff