Commit 6ab85955 authored by Dries's avatar Dries

- Usability improvements to the 'create content' section.  Patch by Goba.
parent 1c03a576
......@@ -1248,6 +1248,7 @@ function node_add($type) {
}
}
$output = node_form($node);
drupal_set_breadcrumb(array(l(t("Home"), NULL), l(t("create content"), "node/add")));
}
else {
......@@ -1265,7 +1266,7 @@ function node_add($type) {
}
$output = t("Choose the appropriate item from the list:") ."<ul>$output</ul>";
drupal_set_breadcrumb(array(l(t("Home"), NULL)));
}
return $output;
......@@ -1360,6 +1361,10 @@ function node_preview($node, $error = NULL) {
}
$output .= node_form($node, $error);
$name = module_invoke($node->type, "node", "name");
drupal_set_breadcrumb(array(l(t("Home"), NULL), l(t("create content"), "node/add"), l(t("Submit %name", array("%name" => $name)), "node/add/$node->type")));
return $output;
}
}
......@@ -1493,7 +1498,7 @@ function node_page() {
switch ($op) {
case "add":
print theme("page", node_add(arg(2)), t("Submit %name", array("%name" => $name)));
print theme("page", node_add(arg(2)), arg(2) ? t("Submit %name", array("%name" => $name)) : t("create content"));
break;
case "edit":
print theme("page", node_edit(arg(2)), t("Edit %name", array("%name" => $name)));
......
......@@ -1248,6 +1248,7 @@ function node_add($type) {
}
}
$output = node_form($node);
drupal_set_breadcrumb(array(l(t("Home"), NULL), l(t("create content"), "node/add")));
}
else {
......@@ -1265,7 +1266,7 @@ function node_add($type) {
}
$output = t("Choose the appropriate item from the list:") ."<ul>$output</ul>";
drupal_set_breadcrumb(array(l(t("Home"), NULL)));
}
return $output;
......@@ -1360,6 +1361,10 @@ function node_preview($node, $error = NULL) {
}
$output .= node_form($node, $error);
$name = module_invoke($node->type, "node", "name");
drupal_set_breadcrumb(array(l(t("Home"), NULL), l(t("create content"), "node/add"), l(t("Submit %name", array("%name" => $name)), "node/add/$node->type")));
return $output;
}
}
......@@ -1493,7 +1498,7 @@ function node_page() {
switch ($op) {
case "add":
print theme("page", node_add(arg(2)), t("Submit %name", array("%name" => $name)));
print theme("page", node_add(arg(2)), arg(2) ? t("Submit %name", array("%name" => $name)) : t("create content"));
break;
case "edit":
print theme("page", node_edit(arg(2)), t("Edit %name", array("%name" => $name)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment