Browse Source

Updates related to theming/templates

spficklin 12 years ago
parent
commit
d090b9f0a0

+ 13 - 2
tripal_library/tripal_library.module

@@ -235,6 +235,10 @@ function tripal_library_theme() {
        'arguments' => array('node' => NULL),
        'template' => 'tripal_library_properties',
     ),
+    'tripal_library_terms' => array(
+       'arguments' => array('node' => NULL),
+       'template' => 'tripal_library_terms',
+    ),
     'tripal_library_admin' => array(
       'template' => 'tripal_library_admin',  
       'arguments' =>  array(NULL),  
@@ -696,11 +700,14 @@ function tripal_library_block($op = 'list', $delta = '0', $edit = array()) {
   switch ($op) {
     case 'list':
 
-    $blocks['libreferences']['info'] = t('Tripal Library References');
+    $blocks['libreferences']['info'] = t('Tripal Library Cross References');
     $blocks['libreferences']['cache'] = BLOCK_NO_CACHE;
 
     $blocks['libbase']['info'] = t('Tripal Library Details');
     $blocks['libbase']['cache'] = BLOCK_NO_CACHE;
+    
+    $blocks['libterms']['info'] = t('Tripal Library Terms');
+    $blocks['libterms']['cache'] = BLOCK_NO_CACHE;
 
     $blocks['libsynonyms']['info'] = t('Tripal Library Synonyms');
     $blocks['libsynonyms']['cache'] = BLOCK_NO_CACHE;
@@ -724,7 +731,7 @@ function tripal_library_block($op = 'list', $delta = '0', $edit = array()) {
         $block = array();
         switch ($delta) {
           case 'libreferences':
-            $block['subject'] = t('References');
+            $block['subject'] = t('Cross References');
             $block['content'] = theme('tripal_library_references', $node);
             break;
           case 'libbase':
@@ -739,6 +746,10 @@ function tripal_library_block($op = 'list', $delta = '0', $edit = array()) {
             $block['subject'] = t('Properties');
             $block['content'] = theme('tripal_library_properties', $node);
             break;
+          case 'libterms':
+            $block['subject'] = t('Library Terms');
+            $block['content'] = theme('tripal_library_terms', $node);
+            break;
           case 'featurelibs':
             $block['subject'] = t('Libraries');
             $block['content'] = theme('tripal_feature_libraries', $node);

+ 1 - 1
tripal_project/includes/tripal_project.admin.inc

@@ -95,7 +95,7 @@ function get_tripal_project_admin_form_sync_set(&$form) {
       // if so, then skip it.
       $sql = "SELECT * FROM {chado_project} WHERE project_id = %d";
       if (!db_fetch_object(db_query($sql, $project->project_id))) {
-        $proj_boxes[$project->project_id] = "$project->genus $project->species ($project->common_name)";
+        $proj_boxes[$project->project_id] = $project->name;
         $added++;
       }
     }

+ 8 - 2
tripal_stock/tripal_stock.module

@@ -977,7 +977,10 @@ function tripal_stock_preprocess_tripal_stock_relationships(&$variables) {
   // number of relationships are present this significantly slows the
   // query, therefore we will manually perform the query
   $sql = "
-    SELECT S.name, S.uniquename, S.stock_id, CS.nid, CVT.name as rel_type, CVTs.name as obj_type
+    SELECT 
+      S.name, S.uniquename, S.stock_id, CS.nid, 
+      CVT.name as rel_type, CVTs.name as obj_type,
+      SR.value
     FROM stock_relationship SR
       INNER JOIN stock S on SR.object_id = S.stock_id
       INNER JOIN cvterm CVT on SR.type_id = CVT.cvterm_id
@@ -987,7 +990,10 @@ function tripal_stock_preprocess_tripal_stock_relationships(&$variables) {
   ";
   $as_subject = chado_query($sql, $stock->stock_id);
   $sql = "
-    SELECT S.name, S.uniquename,  S.stock_id, CS.nid, CVT.name as rel_type, CVTs.name as sub_type
+    SELECT 
+      S.name, S.uniquename,  S.stock_id, CS.nid, 
+      CVT.name as rel_type, CVTs.name as sub_type,
+      SR.value
     FROM stock_relationship SR
       INNER JOIN stock S on SR.subject_id = S.stock_id
       INNER JOIN cvterm CVT on SR.type_id = CVT.cvterm_id