Skip to content

Commit

Permalink
Tabs patch!
Browse files Browse the repository at this point in the history
CHANGES
-------

 + Introduced tabs. First, we extended the menu system to support tabs. Next, a tab was added for every link that was (1) an administrative action other than the implicit 'view' (2) relevant to that particular page only. This is illustrated by the fact that all tabs are verbs and that clicking a page's tab leads you to a subpage of that page.

 + Flattened the administration menu. The tabs helped simplify the navigation menu as I could separate 'actions' from 'navigation'. In addition, I removed the 'administer > configuration'-menu, renamed 'blocks' to 'sidebars' which I hope is a bit more descriptive, and made a couple more changes. Earlier, we already renamed 'taxonomy' to 'categorization' and we move 'statistics' under 'logs'.

 + Grouped settings. All settings have been grouped under 'administer > settings'.

TODO
----

 + Update core themes: only Xtemplate default supports tabs and even those look ugly.  Need help.

 + Update contributed modules.  The menu() hook changed drastically.  Updating your code adhere the new menu() function should be 90% of the work.  Moreover, ensure that your modue's admin links are still valid and that URLs to node get updated to the new scheme ('node/view/x' -> 'node/x').
  • Loading branch information
dbuytaert committed Jun 18, 2004
1 parent 5ad73c8 commit 54b77d6
Show file tree
Hide file tree
Showing 73 changed files with 4,351 additions and 3,044 deletions.
3 changes: 1 addition & 2 deletions database/database.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ CREATE TABLE menu (
path varchar(255) NOT NULL default '',
title varchar(255) NOT NULL default '',
weight tinyint(4) NOT NULL default '0',
visibility int(1) unsigned NOT NULL default '0',
status int(1) unsigned NOT NULL default '0',
type int(2) unsigned NOT NULL default '0',
PRIMARY KEY (mid)
) TYPE=MyISAM;

Expand Down
3 changes: 1 addition & 2 deletions database/database.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ CREATE TABLE menu (
path varchar(255) NOT NULL default '',
title varchar(255) NOT NULL default '',
weight smallint NOT NULL default '0',
visibility smallint NOT NULL default '0',
status smallint NOT NULL default '0',
type smallint NOT NULL default '0',
PRIMARY KEY (mid)
);

Expand Down
12 changes: 11 additions & 1 deletion database/updates.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ $sql_updates = array(
"2004-04-21" => "update_84",
"2004-04-27" => "update_85",
"2004-05-10" => "update_86",
"2004-05-18" => "update_87"
"2004-05-18" => "update_87",
"2004-06-11" => "update_88"
);

function update_32() {
Expand Down Expand Up @@ -1093,6 +1094,15 @@ function update_87() {
return $ret;
}

function update_88() {
$ret = array();
$ret[] = update_sql("ALTER TABLE {menu} DROP status");
$ret[] = update_sql("ALTER TABLE {menu} DROP visibility");
$ret[] = update_sql("ALTER TABLE {menu} ADD type INT(2) UNSIGNED DEFAULT '0' NOT NULL");
$ret[] = update_sql("DELETE FROM {menu}");
return $ret;
}

function update_sql($sql) {
$edit = $_POST["edit"];
$result = db_query($sql);
Expand Down
11 changes: 1 addition & 10 deletions includes/common.inc
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?php
/* $Id$ */

/**
* @defgroup common Core functions
*/

/**
* @name Page title
* @ingroup common
Expand Down Expand Up @@ -949,12 +945,7 @@ function format_name($object) {
$name = $object->name;
}

if (arg(0) == "admin" and user_access("administer users")) {
$output = l($name, "admin/user/edit/$object->uid", array("title" => t("Administer user profile.")));
}
else {
$output = l($name, "user/view/$object->uid", array("title" => t("View user profile.")));
}
$output = l($name, "user/$object->uid", array("title" => t("View user profile.")));
}
else if ($object->name) {
/*
Expand Down
Loading

0 comments on commit 54b77d6

Please sign in to comment.