Sfoglia il codice sorgente

Moved all default views to the navigation menu under Biological data

Lacey Sanderson 12 anni fa
parent
commit
93c6bcbb7d

+ 2 - 2
tripal_analysis/tripal_analysis.views.inc

@@ -436,11 +436,11 @@ function tripal_analysis_views_default_views() {
     'default' => 'name',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'analyses');
+  $handler->override_option('path', 'chado/analyses');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Analyses',
-    'description' => '',
+    'description' => 'An analysis is a particular type of a computational analysis; it may be a blast of one sequence against another, or an all by all blast, or a different kind of analysis altogether. It is a single unit of computation.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 2 - 2
tripal_contact/tripal_contact.views.inc

@@ -329,11 +329,11 @@ function tripal_contact_views_default_views() {
     'default' => 'name',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'contacts');
+  $handler->override_option('path', 'chado/contacts');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Contacts',
-    'description' => '',
+    'description' => 'Contacts can be persons, institutes, groups, or organizations.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 3 - 3
tripal_feature/tripal_feature.views.inc

@@ -574,11 +574,11 @@ function tripal_feature_views_default_views() {
     'default' => '-1',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'features');
+  $handler->override_option('path', 'chado/features');
   $handler->override_option('menu', array(
     'type' => 'normal',
-    'title' => 'Features View',
-    'description' => '',
+    'title' => 'Features',
+    'description' => 'A feature is a biological sequence or a section of a biological sequence, or a collection of such sections. Examples include genes, exons, transcripts, regulatory regions, polypeptides, protein domains, chromosome sequences, sequence variations, cross-genome match regions such as hits and HSPs and so on.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 2 - 2
tripal_genetic/tripal_genetic.views.inc

@@ -305,11 +305,11 @@ function tripal_genetic_views_default_views() {
     'default' => 'uniquename',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'genotypes');
+  $handler->override_option('path', 'chado/genotypes');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Genotypes',
-    'description' => '',
+    'description' => 'A genotype is defined by a collection of features, mutations, balancers, deficiencies, haplotype blocks, or engineered constructs.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 3 - 3
tripal_library/tripal_library.views.inc

@@ -391,11 +391,11 @@ function tripal_library_views_default_views() {
     'default' => 'uniquename',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'libraries');
+  $handler->override_option('path', 'chado/libraries');
   $handler->override_option('menu', array(
     'type' => 'normal',
-    'title' => 'Sequence Libraries',
-    'description' => '',
+    'title' => 'Libraries',
+    'description' => 'A library is a collection of features of a given type. For example, a cDNA or BAC clone library.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 8 - 8
tripal_natural_diversity/tripal_natural_diversity.views.inc

@@ -313,11 +313,11 @@ function tripal_natural_diversity_views_default_views() {
     'default' => '-1',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'natdiv_experiments');
+  $handler->override_option('path', 'chado/natdiv_experiments');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Natural Diversity Experiments',
-    'description' => '',
+    '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.',
     'weight' => '10',
     'name' => 'navigation',
   ));
@@ -333,7 +333,7 @@ function tripal_natural_diversity_views_default_views() {
   // List geolocations
   $view = new view;
   $view->name = 'geolocation_listing';
-  $view->description = 'A listing of locations where natural diversity experiments took place';
+  $view->description = 'A listing of locations where natural diversity experiments took place.';
   $view->tag = 'chado default';
   $view->base_table = 'nd_geolocation';
   $view->core = 6;
@@ -699,11 +699,11 @@ function tripal_natural_diversity_views_default_views() {
     'default' => 'description',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'natdiv_geolocations');
+  $handler->override_option('path', 'chado/natdiv_geolocations');
   $handler->override_option('menu', array(
     'type' => 'normal',
-    'title' => 'Geographical Locations',
-    'description' => '',
+    'title' => 'Locations',
+    'description' => 'Geographical locations in which natural diversity experiments might be performed.',
     'weight' => '10',
     'name' => 'navigation',
   ));
@@ -836,7 +836,7 @@ function tripal_natural_diversity_views_default_views() {
     'default' => 'name',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'natdiv_protocols');
+  $handler->override_option('path', 'chado/natdiv_protocols');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Protocols',
@@ -1050,7 +1050,7 @@ function tripal_natural_diversity_views_default_views() {
   $handler->override_option('use_pager', '1');
   $handler->override_option('style_plugin', 'table');
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'natdiv_reagents');
+  $handler->override_option('path', 'chado/natdiv_reagents');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Reagents',

+ 2 - 2
tripal_organism/tripal_organism.views.inc

@@ -314,11 +314,11 @@ function tripal_organism_views_default_views() {
     'default' => '-1',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'organisms');
+  $handler->override_option('path', 'chado/organisms');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Organisms',
-    'description' => '',
+    'description' => 'A biological organism.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 2 - 2
tripal_phenotype/tripal_phenotype.views.inc

@@ -541,11 +541,11 @@ function tripal_phenotype_views_default_views() {
     'default' => 'uniquename',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'phenotypes');
+  $handler->override_option('path', 'chado/phenotypes');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Phenotypes',
-    'description' => '',
+    'description' => 'A phenotypic statement, or a single atomic phenotypic observation, is a controlled sentence describing observable effects of non-wild type function.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 2 - 2
tripal_project/tripal_project.views.inc

@@ -235,11 +235,11 @@ function tripal_project_views_default_views() {
     'default' => 'name',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'projects');
+  $handler->override_option('path', 'chado/projects');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Projects',
-    'description' => '',
+    'description' => 'A project is a collection of data resulting from a biological experiment.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 2 - 2
tripal_stock/tripal_stock.views.inc

@@ -552,11 +552,11 @@ function tripal_stock_views_default_views() {
     'default' => '-1',
   ));
   $handler = $view->new_display('page', 'Page', 'page_1');
-  $handler->override_option('path', 'stocks');
+  $handler->override_option('path', 'chado/stocks');
   $handler->override_option('menu', array(
     'type' => 'normal',
     'title' => 'Stocks',
-    'description' => '',
+    'description' => 'A stock is the physical entities, either living or preserved, held by collections and can be globally identified by the combination of organism, uniquename and stock type.',
     'weight' => '10',
     'name' => 'navigation',
   ));

+ 28 - 0
tripal_views/tripal_views.module

@@ -16,6 +16,14 @@ require_once "includes/tripal_views_integration_port.inc";
 function tripal_views_menu() {
   $items = array();
 
+  $items['chado'] = array(
+    'title' => 'Biological Data',
+    'description' => 'Listings of the various biological data available categorized by type.',
+    'page callback' => 'tripal_views_biological_data_page',
+    'access arguments' => array('access content'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+
   $items['admin/tripal/views'] = array(
     'title' => 'Views Integration',
     'description' => 'Integration with Drupal Views',
@@ -141,3 +149,23 @@ function tripal_views_coder_ignore() {
     'line prefix' => drupal_get_path('module', 'tripal_views'),
   );
 }
+
+/**
+ * A landing page for all views of chado content. Simply lists all menu items that
+ * are children of it.
+ */
+function tripal_views_biological_data_page() {
+  $output = '';
+
+  $item = menu_get_item();
+  $content = system_admin_menu_block($item);
+
+  $output .= '<dl class="admin-list">';
+  foreach ($content as $item) {
+    $output .= '<dt>'. l($item['title'], $item['href'], $item['localized_options']) .'</dt>';
+    $output .= '<dd>'. $item['description'] .'</dd>';
+  }
+  $output .= '</dl>';
+
+  return $output;
+}