Commit a1dc57a9 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

A few minor changes to project listing for Jay who wanted to see the

public bit. Moved the delete button to the project listing page since
it was wasting space and its rarely if ever used.
parent 779ecdbd
...@@ -173,7 +173,11 @@ echo "<p><center> ...@@ -173,7 +173,11 @@ echo "<p><center>
<A href='newgroup_form.php3?pid=$pid'>Yes</a> <A href='newgroup_form.php3?pid=$pid'>Yes</a>
</center>\n"; </center>\n";
echo "</center>\n"; if ($isadmin) {
echo "<p>
<A href='deleteproject.php3?pid=$pid'>
<font color=Red>Delete this project?</font></a>\n";
}
# #
# Standard Testbed Footer # Standard Testbed Footer
......
...@@ -83,15 +83,14 @@ function GENPLIST ($query_result) ...@@ -83,15 +83,14 @@ function GENPLIST ($query_result)
<td>(Approved?) Description</td> <td>(Approved?) Description</td>
<td>Leader</td> <td>Leader</td>
<td align=center>Days<br>Idle</td> <td align=center>Days<br>Idle</td>
<td align=center>Expts<br>Created</td> <td align=center colspan=2>Expts<br>Cr, Run</td>
<td align=center>Expts<br>Running</td>
<td align=center>Nodes</td>\n"; <td align=center>Nodes</td>\n";
# #
# Admin users get a "delete" option. # Admin users get other fields.
# #
if ($isadmin) { if ($isadmin) {
echo "<td align=center>Delete</td>\n"; echo "<td align=center>Pub?</td>\n";
} }
echo "</tr>\n"; echo "</tr>\n";
...@@ -103,6 +102,7 @@ function GENPLIST ($query_result) ...@@ -103,6 +102,7 @@ function GENPLIST ($query_result)
$created = $projectrow[created]; $created = $projectrow[created];
$expt_count = $projectrow[expt_count]; $expt_count = $projectrow[expt_count];
$expt_last = $projectrow[expt_last]; $expt_last = $projectrow[expt_last];
$public = $projectrow[public];
echo "<tr> echo "<tr>
<td><A href='showproject.php3?pid=$pid'>$pid</A></td> <td><A href='showproject.php3?pid=$pid'>$pid</A></td>
...@@ -135,24 +135,27 @@ function GENPLIST ($query_result) ...@@ -135,24 +135,27 @@ function GENPLIST ($query_result)
echo "<td>$idle_row[0]</td>\n"; echo "<td>$idle_row[0]</td>\n";
} }
echo "<td>$expt_count</td>\n";
# Number of Current Experiments. # Number of Current Experiments.
$count1 = $query_cur_expts =
DBQueryFatal("SELECT count(*) FROM experiments where pid='$pid'"); DBQueryFatal("SELECT count(*) FROM experiments where pid='$pid'");
$row1 = mysql_fetch_array($count1); $cur_expts_row = mysql_fetch_array($query_cur_expts);
# Number of nodes reserved. # Number of nodes reserved.
$count2 = $query_nodes_reserved =
DBQueryFatal("SELECT count(*) FROM reserved where pid='$pid'"); DBQueryFatal("SELECT count(*) FROM reserved where pid='$pid'");
$row2 = mysql_fetch_array($count2); $nodes_reserved_row = mysql_fetch_array($query_nodes_reserved);
echo "<td>$row1[0]</td><td>$row2[0]</td>\n"; echo "<td>$expt_count</td>\n";
echo "<td>$cur_expts_row[0]</td>\n";
echo "<td>$nodes_reserved_row[0]</td>\n";
if ($isadmin) { if ($isadmin) {
echo "<td align=center><A href='deleteproject.php3?pid=$pid'> if ($public) {
<img alt='o' src='redball.gif'></A> echo "<td align=center><img alt='Y' src='greenball.gif'></td>";
</td>\n"; }
else {
echo "<td align=center><img alt='N' src='redball.gif'></td>\n";
}
} }
echo "</tr>\n"; echo "</tr>\n";
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment