Make the reports page much more real-estate friendly

This commit is contained in:
james 2007-12-10 18:23:00 +00:00
parent 92a57b0577
commit a38cda2c05

View File

@ -124,17 +124,17 @@
echo '<br />'; echo '<br />';
} }
echo '<table>';
$last_category = ''; $last_category = '';
$x=0; $x=0;
echo "<table class=\"tableedit\" border=1>";
while($i = mysql_fetch_object($q)) { while($i = mysql_fetch_object($q)) {
$trclass = ($x % 2 == 0) ? "even" : "odd"; $trclass = ($x % 2 == 0) ? "even" : "odd";
$x++; $x++;
if($last_category != $i->category) { if($last_category != $i->category) {
/* New category */ /* New category */
echo '<h4>'; echo '<tr><td colspan=\"2\"><h3>';
if($edit_mode == true) echo i18n('Category').': '; if($edit_mode == true) echo i18n('Category').': ';
echo "{$i->category}</h4>"; echo "{$i->category}</h3></td></tr>";
$last_category = $i->category; $last_category = $i->category;
} }
@ -149,12 +149,11 @@
if($edit_mode == false) if($edit_mode == false)
$name = "<a href=\"{$config['SFIABDIRECTORY']}/$url\">$name</a>"; $name = "<a href=\"{$config['SFIABDIRECTORY']}/$url\">$name</a>";
echo "<table width=\"100%\"><tr class=\"$trclass\"><td>"; echo "<tr class=\"$trclass\"><td>";
echo "<table><tr><td colspan=\"2\">";
if($edit_mode == true) if($edit_mode == true)
echo "<a title=\"Remove Report\" href=\"reports.php?action=unlink&id={$i->id}\"><img src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\" border=\"0\" alt=\"Remove Report\" /></a>&nbsp;"; echo "<a title=\"Remove Report\" href=\"reports.php?action=unlink&id={$i->id}\"><img src=\"".$config['SFIABDIRECTORY']."/images/16/button_cancel.".$config['icon_extension']."\" border=\"0\" alt=\"Remove Report\" /></a>&nbsp;";
echo $name.'</td></tr>'; echo $name.'</td>';
/* /*
if($i->reports_id > 0) { if($i->reports_id > 0) {
@ -168,9 +167,9 @@
} }
*/ */
echo "<tr><td width=\"20px\"></td><td><span style=\"font-size: 0.85em;\">{$i->comment}</span></td></tr>"; echo "<td><span style=\"font-size: 0.85em;\">{$i->comment}</span></td></tr>";
echo "</table></tr></td></table>";
} }
echo "</table>";
} }
@ -182,7 +181,7 @@
echo '<a href="reports.php?edit=1">'.i18n('Click here to edit your Report List').'</a>'; echo '<a href="reports.php?edit=1">'.i18n('Click here to edit your Report List').'</a>';
echo '<hr />'; echo '<hr />';
echo "<h4>".i18n("All Reports")."</h4>"; echo "<h3>".i18n("All Reports")."</h3>";
/* Print all the reports in a pulldown menu for generation */ /* Print all the reports in a pulldown menu for generation */
echo "<form method=\"get\" name=\"reportgen\" action=\"reports_gen.php\">"; echo "<form method=\"get\" name=\"reportgen\" action=\"reports_gen.php\">";
@ -215,7 +214,7 @@
<? <?
/* Create an add report box */ /* Create an add report box */
echo '<h4>'.i18n('Add a Report to your Report List').'</h4>'; echo '<h3>'.i18n('Add a Report to your Report List').'</h3>';
echo "<form method=\"post\" name=\"addreport\"action=\"reports.php\">"; echo "<form method=\"post\" name=\"addreport\"action=\"reports.php\">";
echo "<input type=\"hidden\" name=\"action\" value=\"add\">"; echo "<input type=\"hidden\" name=\"action\" value=\"add\">";
echo "<table>\n"; echo "<table>\n";
@ -275,10 +274,10 @@
echo '<hr />'; echo '<hr />';
echo '<h4>Descriptions for All Reports</h4>'; echo '<h3>Descriptions for All Reports</h3>';
echo i18n('Click on the report number to try the report with the default report options before you add it to your Report List'); echo i18n('Click on the report number to try the report with the default report options before you add it to your Report List');
echo '<br /><br />'; echo '<br /><br />';
echo "<table>\n"; echo "<table class=\"tableedit\">\n";
$x=0; $x=0;
foreach(array_merge($reports, $report_custom) as $r) { foreach(array_merge($reports, $report_custom) as $r) {
$trclass = ($x % 2 == 0) ? "even" : "odd"; $trclass = ($x % 2 == 0) ? "even" : "odd";
@ -290,7 +289,7 @@
$url = $r['custom_url']; $url = $r['custom_url'];
} }
echo "<td><a href=\"{$config['SFIABDIRECTORY']}/$url\">$x.</a></td>"; echo "<td><a href=\"{$config['SFIABDIRECTORY']}/$url\">$x.</a></td>";
echo "<td><table width=\"100%\"><tr>"; echo "<td><table cellspacing=0 cellpadding=0 width=\"100%\"><tr>";
echo "<td><b>{$r['name']}</b></td>"; echo "<td><b>{$r['name']}</b></td>";
echo "<td align=\"right\">Created By: {$r['creator']}</td></tr>"; echo "<td align=\"right\">Created By: {$r['creator']}</td></tr>";