'Job Name', 'header' => TRUE, 'width' => '20%', ), $node->loader_name ); // Submitted By $rows[] = array( array( 'data' => 'Submitted By', 'header' => TRUE ), $node->uid ); // Job Creation Date $rows[] = array( array( 'data' => 'Job Creation Date', 'header' => TRUE ), format_date($node->created, 'custom', "F j, Y, g:i a") ); // Last Updated $rows[] = array( array( 'data' => 'Last Updated', 'header' => TRUE ), format_date($node->changed, 'custom', "F j, Y, g:i a") ); // Template Name $rows[] = array( array( 'data' => 'Template Name', 'header' => TRUE ), $node->template->name ); // Data File $rows[] = array( array( 'data' => 'Data File', 'header' => TRUE ), $node->file ); // Job Status $rows[] = array( array( 'data' => 'Job Status', 'header' => TRUE ), $node->job_status ); //Job Progress if (isset($node->job)) { if (isset($node->job->progress)) { $rows[] = array( array( 'data' => 'Job Progress', 'header' => TRUE ), $node->job->progress . '% (' . l('view job', 'admin/tripal/tripal_jobs/view/' . $node->job_id) . ')' ); } } // the $table array contains the headers and rows array as well as other // options for controlling the display of the table. Additional // documentation can be found here: // https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7 $table = array( 'header' => $headers, 'rows' => $rows, 'attributes' => array( 'id' => 'tripal_bulk_loader-table-base', 'class' => 'tripal-data-table' ), 'sticky' => FALSE, 'caption' => '', 'colgroups' => array(), 'empty' => '', ); // once we have our table array structure defined, we call Drupal's theme_table() // function to generate the table. print theme_table($table); // add the "submit" button for adding a loading job to the Tripal jobs management system $form = drupal_get_form('tripal_bulk_loader_add_loader_job_form', $node); print drupal_render($form); // if we have inserted records then load the summary: if (!empty($node->inserted_records)) { print '

Loading Summary

'; // the $headers array is an array of fields to use as the colum headers. // additional documentation can be found here // https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7 $headers = array('Chado Table', 'Number of Records Inserted'); // the $rows array contains an array of rows where each row is an array // of values for each column of the table in that row. Additional documentation // can be found here: // https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7 $rows = array(); $total = 0; foreach ($node->inserted_records as $r) { $row = array(); $row[] = $r->table_inserted_into; $row[] = $r->num_inserted; $rows[] = $row; $total = $total + $r->num_inserted; } $rows[] = array('TOTAL',''.$total.''); // the $table array contains the headers and rows array as well as other // options for controlling the display of the table. Additional // documentation can be found here: // https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7 $table = array( 'header' => $headers, 'rows' => $rows, 'attributes' => array(), 'sticky' => FALSE, 'caption' => '', 'colgroups' => array(), 'empty' => '', ); // once we have our table array structure defined, we call Drupal's theme_table() // function to generate the table. print theme_table($table); } ?>
$node->template->template_id));