1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- $library = $variables['node']->library;
- $options = array('return_array' => 1);
- $library = chado_expand_var($library, 'table', 'libraryprop', $options);
- $props = $library->libraryprop;
- $properties = array();
- foreach ($props as $prop) {
- if ($prop->type_id->name == 'Library Description') {
- continue;
- }
- $properties[] = $prop;
- }
- if(count($properties) > 0){
-
-
-
- $headers = array('Property Name', 'Value');
-
-
-
-
-
- $rows = array();
-
- foreach ($properties as $property){
- $property = chado_expand_var($property,'field','libraryprop.value');
- $rows[] = array(
- ucfirst(preg_replace('/_/', ' ', $property->type_id->name)),
- urldecode($property->value)
- );
- }
-
-
-
-
-
- $table = array(
- 'header' => $headers,
- 'rows' => $rows,
- 'attributes' => array(
- 'id' => 'tripal_library-table-properties',
- 'class' => 'tripal-data-table'
- ),
- 'sticky' => FALSE,
- 'caption' => '',
- 'colgroups' => array(),
- 'empty' => '',
- );
-
-
-
- print theme_table($table);
- }
|