modelGraph : better text indentation

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@5999 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2020-05-26 20:23:27 +00:00
parent 9ae8147bbd
commit 44bd9a80b0

View File

@@ -66,8 +66,8 @@ class modelgraph
$d .= " /** TABLE '$table' */\n"; $d .= " /** TABLE '$table' */\n";
$d .= " \"$table\" [\n"; $d .= " \"$table\" [\n";
$d .= " shape = \"plaintext\"\n"; $d .= " shape = \"plaintext\"\n";
$d .= " label = <"; $d .= " label = <\n";
$d .= "<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\">\n"; $d .= " <TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\">\n";
// Display the name of the table as title // Display the name of the table as title
$d .= " <TR><TD COLSPAN=\"3\" BGCOLOR=\"#00B0E0\">"; $d .= " <TR><TD COLSPAN=\"3\" BGCOLOR=\"#00B0E0\">";
$d .= "$table</TD></TR>\n"; $d .= "$table</TD></TR>\n";
@@ -76,7 +76,7 @@ class modelgraph
foreach ($schema["fields"] as $field => $params) foreach ($schema["fields"] as $field => $params)
{ {
$d .= " <TR>\n"; $d .= " <TR>\n";
$d .= "<TD SIDES=\"TBL\" PORT=\"OUT-$field\">"; $d .= " <TD SIDES=\"TBL\" PORT=\"OUT-$field\">";
if (key_exists ($field, $schema["foreign"])) if (key_exists ($field, $schema["foreign"]))
{ {
// Foreign Key // Foreign Key
@@ -90,16 +90,16 @@ class modelgraph
else else
$d .= "&#9671;"; $d .= "&#9671;";
$d .= "</TD>\n"; $d .= "</TD>\n";
$d .= "<TD ALIGN=\"LEFT\" SIDES=\"TB\">"; $d .= " <TD ALIGN=\"LEFT\" SIDES=\"TB\">";
$d .= $field; $d .= $field;
$d .= "</TD>\n"; $d .= "</TD>\n";
$d .= "<TD ALIGN=\"LEFT\" PORT=\"IN-$field\" SIDES=\"TBR\">"; $d .= " <TD ALIGN=\"LEFT\" PORT=\"IN-$field\" SIDES=\"TBR\">";
$d .= $params[0]; $d .= $params[0];
$d .= "</TD>\n"; $d .= "</TD>\n";
$d .= "</TR>\n"; $d .= " </TR>\n";
$i++; $i++;
} }
$d .= "</TABLE>>\n"; $d .= " </TABLE>>\n";
$d .= " ];\n"; $d .= " ];\n";
} }
// Generate the links between the tables // Generate the links between the tables