Link to descending order

This commit is contained in:
Jakub Vrana 2012-04-30 18:08:42 -07:00
parent b16bb54219
commit 70fb696fbd
3 changed files with 5 additions and 3 deletions

View file

@ -265,9 +265,9 @@ if (!$columns) {
$rank++; $rank++;
$names[$key] = $name; $names[$key] = $name;
$column = idf_escape($key); $column = idf_escape($key);
echo '<th><a href="' . h(remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key) $href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
. ($order[0] == $column || $order[0] == $key || (!$order && count($group) < count($select) && $group[0] == $column) ? '&desc%5B0%5D=1' : '') // $order[0] == $key - COUNT(*) echo '<th><a href="' . h($href) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions echo "<a href='" . h("$href&desc%5B0%5D=1") . "' title='" . lang('descending') . "' class='text'> ↓</a>";
} }
$functions[$key] = $val["fun"]; $functions[$key] = $val["fun"];
next($select); next($select);

View file

@ -3,6 +3,7 @@ body { color: #000; background: #fff; font: 90%/1.25 Verdana, Arial, Helvetica,
a { color: blue; } a { color: blue; }
a:visited { color: navy; } a:visited { color: navy; }
a:hover { color: red; } a:hover { color: red; }
a.text { text-decoration: none; }
h1 { font-size: 150%; margin: 0; padding: .8em 1em; border-bottom: 1px solid #999; font-weight: normal; color: #777; background: #eee; } h1 { font-size: 150%; margin: 0; padding: .8em 1em; border-bottom: 1px solid #999; font-weight: normal; color: #777; background: #eee; }
h2 { font-size: 150%; margin: 0 0 20px -18px; padding: .8em 1em; border-bottom: 1px solid #000; color: #000; font-weight: normal; background: #ddf; } h2 { font-size: 150%; margin: 0 0 20px -18px; padding: .8em 1em; border-bottom: 1px solid #000; color: #000; font-weight: normal; background: #ddf; }
h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; } h3 { font-weight: normal; font-size: 130%; margin: 1em 0 0; }

View file

@ -1,6 +1,7 @@
Adminer 3.4.0-dev: Adminer 3.4.0-dev:
Print current time next to executed SQL queries Print current time next to executed SQL queries
Highlight code in SQL command by CodeMirror Highlight code in SQL command by CodeMirror
Link to descending order
Link to original table in EXPLAIN of SELECT * FROM table t Link to original table in EXPLAIN of SELECT * FROM table t
Replace JSMin by better JavaScript minifier Replace JSMin by better JavaScript minifier
Don't use AJAX links and forms Don't use AJAX links and forms