summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSashi202019-03-28 16:31:02 +0530
committerSashi202019-03-28 16:31:02 +0530
commit08f13958d245fe0d628ebd05618fcc4462c09b75 (patch)
tree3a477cf3670aa049262fa495d13bede63df287b7
parentf7e323084ad4bd9a86b4e825b4767bdbe56cc561 (diff)
downloadDWSIM_lab_migration_module-08f13958d245fe0d628ebd05618fcc4462c09b75.tar.gz
DWSIM_lab_migration_module-08f13958d245fe0d628ebd05618fcc4462c09b75.tar.bz2
DWSIM_lab_migration_module-08f13958d245fe0d628ebd05618fcc4462c09b75.zip
Modify labs in progess from list to table view
-rwxr-xr-xlab_details.inc30
1 files changed, 22 insertions, 8 deletions
diff --git a/lab_details.inc b/lab_details.inc
index 0c9d07f..e091852 100755
--- a/lab_details.inc
+++ b/lab_details.inc
@@ -18,7 +18,7 @@ function lab_migration_completed_labs_all()
$i = 1;
while ($row = $result->fetchObject())
{
- $approval_date = date("Y", $row->approval_date);
+ $approval_date = date("Y", $row->expected_completion_date);
$preference_rows[] = array(
$i,
$row->university,
@@ -55,15 +55,29 @@ function lab_migration_labs_progress_all()
}
else
{
- //$result = db_query($query);
- $page_content .= "<ol>";
+ $preference_rows = array();
+ $i = 1;
while ($row = $result->fetchObject())
{
- $page_content .= "<li>";
- $page_content .= $row->university . " ({$row->lab_title})";
- $page_content .= "</li>";
+ $approval_date = date("Y", $row->approval_date);
+ $preference_rows[] = array(
+ $i,
+ $row->university,
+ $row->lab_title,
+ $approval_date
+ );
+ $i++;
}
- $page_content .= "</ol>";
+ $preference_header = array(
+ 'No',
+ 'Institute',
+ 'Lab',
+ 'Year'
+ );
+ $page_content .= theme('table', array(
+ 'header' => $preference_header,
+ 'rows' => $preference_rows
+ ));
}
return $page_content;
- }
+ } \ No newline at end of file