Permalink
Browse files

Show commands in navigation

  • Loading branch information...
1 parent 946eb15 commit 7341756579239c8475ec53a520213c29fd064a19 @vrana committed May 20, 2010
Showing with 13 additions and 3 deletions.
  1. +10 −3 adminer/include/adminer.inc.php
  2. +3 −0 adminer/static/default.css
@@ -566,11 +566,18 @@ function navigation($missing) {
* @return null
*/
function tablesPrint($tables) {
- echo "<p id='tables'>\n";
+ echo "<ul id='tables'>\n";
+ $i = 1;
foreach ($tables as $table => $type) {
- echo '<a href="' . h(ME) . 'select=' . urlencode($table) . '">' . bold(lang('select'), $_GET["select"] == $table) . '</a> ';
- echo '<a href="' . h(ME) . 'table=' . urlencode($table) . '">' . bold($this->tableName(array("Name" => $table)), $_GET["table"] == $table) . "</a><br>\n"; //! Adminer::tableName may work with full table status
+ echo "<li onmouseover=\"toggle('table-$i');\" onmouseout=\"toggle('table-$i');\"><a href='" . h(ME) . "table=" . urlencode($table) . "'>" . bold($this->tableName(array("Name" => $table)), $_GET["table"] == $table) . "</a>"; //! Adminer::tableName may work with full table status
+ echo "<span id='table-$i' class='hidden'>";
+ echo ' <a href="' . h(ME) . 'select=' . urlencode($table) . '">' . bold(lang('select'), $_GET["select"] == $table) . '</a>';
+ echo ' <a href="' . h(ME) . 'create=' . urlencode($table) . '">' . bold(lang('alter'), $_GET["create"] == $table) . '</a>';
+ echo ' <a href="' . h(ME) . 'edit=' . urlencode($table) . '">' . bold(lang('insert'), $_GET["edit"] == $table) . '</a>';
+ echo "</span>\n";
+ $i++;
}
+ echo "</ul>\n";
}
}
@@ -18,6 +18,7 @@ td img { max-width: 200px; max-height: 200px; }
code { background: #eee; }
tr:hover td, tr:hover th { background: #ddf; }
pre { margin: 1em 0 0; }
+ul { margin: 1em 0 0; }
.version { color: #777; font-size: 67%; }
.js .hidden { display: none; }
.nowrap td, .nowrap th, td.nowrap { white-space: pre; }
@@ -38,6 +39,8 @@ pre { margin: 1em 0 0; }
.type { width: 15ex; width: auto\9; }
#menu { position: absolute; margin: 10px 0 0; padding: 0 0 30px 0; top: 2em; left: 0; width: 19em; overflow: auto; overflow-y: hidden; white-space: nowrap; }
#menu p { padding: .8em 1em; margin: 0; border-bottom: 1px solid #ccc; }
+#tables { padding: 0 0 0 1em; }
+#tables li { list-style-type: none; }
#content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
#lang { position: absolute; top: 0; left: 0; line-height: 1.8em; padding: .3em 1em; }
#breadcrumb { white-space: nowrap; position: absolute; top: 0; left: 21em; background: #eee; height: 2em; line-height: 1.8em; padding: 0 1em; margin: 0 0 0 -18px; }

0 comments on commit 7341756

Please sign in to comment.