123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <?php
- require_once 'theme/tripal_genetic.theme.inc';
- require_once 'includes/tripal_genetic.admin.inc';
- function tripal_genetic_permission() {
- return array(
-
- );
- }
- function tripal_genetic_menu() {
- $items = array();
-
- $items['admin/tripal/legacy/tripal_genetic'] = array(
- 'title' => 'Genetics',
- 'description' => 'Genetic data including Genotypes.',
- 'page callback' => 'tripal_genetic_admin_genetics_listing',
- 'access arguments' => array('administer tripal genetic'),
- 'type' => MENU_NORMAL_ITEM,
- );
- $items['admin/tripal/legacy/tripal_genetic/help'] = array(
- 'title' => 'Help',
- 'description' => "A description of the Tripal genetic module including a short description of it's usage.",
- 'page callback' => 'theme',
- 'page arguments' => array('tripal_genetic_help'),
- 'access arguments' => array('administer tripal genetic'),
- 'type' => MENU_LOCAL_TASK,
- );
- $items['admin/tripal/legacy/tripal_genetic/views/genetics/enable'] = array(
- 'title' => 'Enable genetic Administrative View',
- 'page callback' => 'tripal_enable_view',
- 'page arguments' => array('tripal_genetic_admin_genetics', 'admin/tripal/legacy/tripal_genetic'),
- 'access arguments' => array('administer tripal genetic'),
- 'type' => MENU_CALLBACK,
- );
- return $items;
- }
- function tripal_genetic_search_biological_data_views() {
- return array(
- 'tripal_genetic_user_genotypes' => array(
- 'machine_name' => 'tripal_genetic_user_genotypes',
- 'human_name' => 'Genotypes',
- 'description' => 'Genetic variations such as SNPs, MNPs and indels.',
- 'link' => 'chado/genotype'
- ),
- );
- }
- function tripal_genetic_views_api() {
- return array(
- 'api' => 3.0,
- );
- }
- function tripal_genetic_theme($existing, $type, $theme, $path) {
- $core_path = drupal_get_path('module', 'tripal_core');
- $items = array(
- 'tripal_feature_genotypes' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_feature_genotypes',
- 'path' => "$path/theme/templates",
- ),
- 'tripal_stock_genotypes' => array(
- 'variables' => array('node' => NULL),
- 'template' => 'tripal_stock_genotypes',
- 'path' => "$path/theme/templates",
- ),
- 'tripal_genetic_help' => array(
- 'template' => 'tripal_genetic_help',
- 'variables' => array(NULL),
- 'path' => "$path/theme/templates",
- ),
- );
- return $items;
- }
- function tripal_genetic_node_view($node, $view_mode, $langcode) {
- if ($node->type == 'chado_feature') {
- if ($view_mode == 'full') {
-
-
-
-
- if (!array_key_exists('tripal_feature_nd_genotypes', $node->content)) {
- $node->content['tripal_feature_genotypes'] = array(
- '#theme' => 'tripal_feature_genotypes',
- '#node' => $node,
- '#tripal_toc_id' => 'genotypes',
- '#tripal_toc_title' => 'Genotypes',
- );
- }
- }
- }
- if ($node->type == 'chado_stock') {
- if ($view_mode == 'full') {
-
-
-
-
- if (!array_key_exists('tripal_stock_nd_genotypes', $node->content)) {
- $node->content['tripal_stock_genotypes'] = array(
- '#theme' => 'tripal_stock_genotypes',
- '#node' => $node,
- '#tripal_toc_id' => 'genotypes',
- '#tripal_toc_title' => 'Genotypes',
- );
- }
- }
- }
- }
|