Commit e688dfe6 authored by Dries's avatar Dries

- Fixed prefix problem with the book module. Patch by Moshe.

- Usability improvements to the user module: removed some redundant menu
  items by taking advantage of the column sorting, added status messages
  and so on.  Patch by Moshe plus some fixes.

- Made the profile module use the table() function.  Patch by Moshe.

- Fixed breadcrumb spacing.  Patch by Moshe.

- Fixed colspan problem with node overview table.  Patch by Stefan.

- Fixed inconsistency with table sorting.  Patch 0122 by Al.
parent 2ff32224
......@@ -35,6 +35,9 @@ function tablesort($cell, $header) {
$image = "&nbsp;<img border=\"0\" src=\"". theme("image", "arrow-". $ts["sort"]. ".gif"). "\"></img>";
$dir = array("asc" => "ascending", "desc" => "descending");
$title = t("sort ". $dir[$ts["sort"]]);
} else {
// If the user clicks a different header, we want to sort ascending initially.
$ts["sort"] = "asc";
}
$cell["data"] = l($cell["data"] . $image, $_GET["q"], array("title" => $title), "sort=". $ts["sort"]. "&order=". urlencode($cell["data"]). $ts["query_string"]);
......
......@@ -33,6 +33,9 @@ th {
#pager div {
padding: 0.5em;
}
.breadcrumb {
padding-bottom: .5em
}
.book {
margin-bottom: 2em;
}
......
......@@ -650,7 +650,7 @@ function book_page() {
function book_print($id = "", $depth = 1) {
global $base_url;
$result = db_query("SELECT n.nid FROM {node} n INNER JOIN book b ON n.nid = b.nid WHERE n.status = 1 AND n.nid = %d AND (n.moderate = 0 OR n.revisions IS NOT NULL) ORDER BY b.weight, n.title", $id);
$result = db_query("SELECT n.nid FROM {node} n INNER JOIN {book} b ON n.nid = b.nid WHERE n.status = 1 AND n.nid = %d AND (n.moderate = 0 OR n.revisions IS NOT NULL) ORDER BY b.weight, n.title", $id);
while ($page = db_fetch_object($result)) {
// load the node:
......
......@@ -650,7 +650,7 @@ function book_page() {
function book_print($id = "", $depth = 1) {
global $base_url;
$result = db_query("SELECT n.nid FROM {node} n INNER JOIN book b ON n.nid = b.nid WHERE n.status = 1 AND n.nid = %d AND (n.moderate = 0 OR n.revisions IS NOT NULL) ORDER BY b.weight, n.title", $id);
$result = db_query("SELECT n.nid FROM {node} n INNER JOIN {book} b ON n.nid = b.nid WHERE n.status = 1 AND n.nid = %d AND (n.moderate = 0 OR n.revisions IS NOT NULL) ORDER BY b.weight, n.title", $id);
while ($page = db_fetch_object($result)) {
// load the node:
......
......@@ -689,7 +689,7 @@ function node_admin_nodes() {
}
if ($pager = pager_display(NULL, 50, 0, "admin")) {
$rows[] = array(array("data" => $pager, "colspan" => 6));
$rows[] = array(array("data" => $pager, "colspan" => 7));
}
$output .= "<h3>". $filters[$filter][0] ."</h3>";
......
......@@ -689,7 +689,7 @@ function node_admin_nodes() {
}
if ($pager = pager_display(NULL, 50, 0, "admin")) {
$rows[] = array(array("data" => $pager, "colspan" => 6));
$rows[] = array(array("data" => $pager, "colspan" => 7));
}
$output .= "<h3>". $filters[$filter][0] ."</h3>";
......
......@@ -62,17 +62,17 @@ function profile_settings() {
$profile_required_fields = variable_get("profile_required_fields", array());
$profile_register_fields = variable_get("profile_register_fields", array());
$output = "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= "<tr><th>field</th><th>enable</th><th>public</th><th>required</th><th>show in registration form</th></tr>\n";
$header = array (t("field"), t("enable"), t("public"), t("required"), t("show in registration form"));
$i=0;
foreach ($profile_fields as $key => $field) {
$output .= "<tr><td>$field[1]</td>";
$output .= "<td style=\"text-align: center;\">". form_checkbox("", "profile_private_fields][", $key, in_array($key, $profile_private_fields)) ."</td>";
$output .= "<td style=\"text-align: center;\">". form_checkbox("", "profile_public_fields][", $key, in_array($key, $profile_public_fields)) ."</td>";
$output .= "<td style=\"text-align: center;\">". form_checkbox("", "profile_required_fields][", $key, in_array($key, $profile_required_fields)) ."</td>";
$output .= "<td style=\"text-align: center;\">". form_checkbox("", "profile_register_fields][", $key, in_array($key, $profile_register_fields)) ."</td>";
$output .= "</tr>\n";
$row[$i][] = $field[1];
$row[$i][] = form_checkbox("", "profile_private_fields][", $key, in_array($key, $profile_private_fields));
$row[$i][] = form_checkbox("", "profile_public_fields][", $key, in_array($key, $profile_public_fields));
$row[$i][] = form_checkbox("", "profile_required_fields][", $key, in_array($key, $profile_required_fields));
$row[$i][] = form_checkbox("", "profile_register_fields][", $key, in_array($key, $profile_register_fields));
$i++;
}
$output .= "</table>\n";
$output .= table($header, $row);
$output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writable and visible from the web."));
$output .= form_textfield(t("Avatar maximum dimensions"), "profile_avatar_dimensions", variable_get("profile_avatar_dimensions", "85x85"), 10, 10, t("Maximum dimensions for avatars."));
......
......@@ -62,17 +62,17 @@ function profile_settings() {
$profile_required_fields = variable_get("profile_required_fields", array());
$profile_register_fields = variable_get("profile_register_fields", array());
$output = "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
$output .= "<tr><th>field</th><th>enable</th><th>public</th><th>required</th><th>show in registration form</th></tr>\n";
$header = array (t("field"), t("enable"), t("public"), t("required"), t("show in registration form"));
$i=0;
foreach ($profile_fields as $key => $field) {
$output .= "<tr><td>$field[1]</td>";
$output .= "<td style=\"text-align: center;\">". form_checkbox("", "profile_private_fields][", $key, in_array($key, $profile_private_fields)) ."</td>";
$output .= "<td style=\"text-align: center;\">". form_checkbox("", "profile_public_fields][", $key, in_array($key, $profile_public_fields)) ."</td>";
$output .= "<td style=\"text-align: center;\">". form_checkbox("", "profile_required_fields][", $key, in_array($key, $profile_required_fields)) ."</td>";
$output .= "<td style=\"text-align: center;\">". form_checkbox("", "profile_register_fields][", $key, in_array($key, $profile_register_fields)) ."</td>";
$output .= "</tr>\n";
$row[$i][] = $field[1];
$row[$i][] = form_checkbox("", "profile_private_fields][", $key, in_array($key, $profile_private_fields));
$row[$i][] = form_checkbox("", "profile_public_fields][", $key, in_array($key, $profile_public_fields));
$row[$i][] = form_checkbox("", "profile_required_fields][", $key, in_array($key, $profile_required_fields));
$row[$i][] = form_checkbox("", "profile_register_fields][", $key, in_array($key, $profile_register_fields));
$i++;
}
$output .= "</table>\n";
$output .= table($header, $row);
$output .= form_textfield(t("Avatar image path"), "profile_avatar_path", variable_get("profile_avatar_path", "misc/avatars/"), 30, 255, t("Path for avatar directory; it must be writable and visible from the web."));
$output .= form_textfield(t("Avatar maximum dimensions"), "profile_avatar_dimensions", variable_get("profile_avatar_dimensions", "85x85"), 10, 10, t("Maximum dimensions for avatars."));
......
This diff is collapsed.
This diff is collapsed.
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