|
@@ -45,46 +45,89 @@ function tripal_vocabulary_lookup_term_page($vocabulary, $accession) {
|
|
|
$headers = array();
|
|
|
$rows = array();
|
|
|
$term_name = $term['name'];
|
|
|
+ $accession = $term['vocabulary']['short_name'] . ':' . $term['accession'];
|
|
|
if ($term['url']) {
|
|
|
$term_name = l($term['name'], $term['url'], array('attributes' => array('target' => '_blank')));
|
|
|
}
|
|
|
+ $rows[] = array(
|
|
|
+ array(
|
|
|
+ 'data' => 'Term',
|
|
|
+ 'header' => TRUE,
|
|
|
+ 'width' => '20%',
|
|
|
+ ),
|
|
|
+ $accession,
|
|
|
+ );
|
|
|
+ $rows[] = array(
|
|
|
+ array(
|
|
|
+ 'data' => 'Name',
|
|
|
+ 'header' => TRUE,
|
|
|
+ 'width' => '20%',
|
|
|
+ ),
|
|
|
+ $term_name,
|
|
|
+ );
|
|
|
+ $rows[] = array(
|
|
|
+ array(
|
|
|
+ 'data' => 'Definition',
|
|
|
+ 'header' => TRUE,
|
|
|
+ 'width' => '20%',
|
|
|
+ ),
|
|
|
+ $term['definition'],
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+ $table = array(
|
|
|
+ 'header' => $headers,
|
|
|
+ 'rows' => $rows,
|
|
|
+ 'attributes' => array(),
|
|
|
+ 'sticky' => FALSE,
|
|
|
+ 'caption' => 'Term Details',
|
|
|
+ 'colgroups' => array(),
|
|
|
+ 'empty' => '',
|
|
|
+ );
|
|
|
+ $content = theme_table($table);
|
|
|
+
|
|
|
+
|
|
|
+ $rows = array();
|
|
|
$vocab_name = $term['vocabulary']['name'];
|
|
|
if ($term['vocabulary']['url']) {
|
|
|
$vocab_name = l($term['vocabulary']['name'], $term['vocabulary']['url'], array('attributes' => array('target' => '_blank')));
|
|
|
}
|
|
|
+ $short_name = $term['vocabulary']['short_name'];
|
|
|
+ $vocab_desc = $term['vocabulary']['description'];
|
|
|
$rows[] = array(
|
|
|
array(
|
|
|
'data' => 'Name',
|
|
|
'header' => TRUE,
|
|
|
'width' => '20%',
|
|
|
),
|
|
|
- $term_name,
|
|
|
+ $vocab_name,
|
|
|
);
|
|
|
$rows[] = array(
|
|
|
array(
|
|
|
- 'data' => 'Vocabulary',
|
|
|
+ 'data' => 'Short Name',
|
|
|
'header' => TRUE,
|
|
|
'width' => '20%',
|
|
|
),
|
|
|
- $vocab_name . ': ' . $term['vocabulary']['description']. '',
|
|
|
+ $short_name,
|
|
|
);
|
|
|
$rows[] = array(
|
|
|
array(
|
|
|
- 'data' => 'Definition',
|
|
|
+ 'data' => 'Description',
|
|
|
'header' => TRUE,
|
|
|
'width' => '20%',
|
|
|
),
|
|
|
- $term['definition'],
|
|
|
+ $vocab_desc,
|
|
|
);
|
|
|
+
|
|
|
$table = array(
|
|
|
'header' => $headers,
|
|
|
'rows' => $rows,
|
|
|
'attributes' => array(),
|
|
|
'sticky' => FALSE,
|
|
|
- 'caption' => '',
|
|
|
+ 'caption' => 'Term Vocabulary details',
|
|
|
'colgroups' => array(),
|
|
|
'empty' => '',
|
|
|
);
|
|
|
- $content = theme_table($table);
|
|
|
+ $content .= theme_table($table);
|
|
|
return $content;
|
|
|
}
|