From 2d4dd7e6fb837e00a835cd3ed97e42091f59f039 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Tue, 5 Oct 2004 08:27:13 +0000 Subject: [PATCH] Pages update and tweaks. git-svn-id: http://svn.automattic.com/wordpress/trunk@1747 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 19 ++++++ wp-admin/edit-page-form.php | 33 +++++++--- wp-admin/edit-pages.php | 124 ++++++++++------------------------- wp-admin/post.php | 29 -------- wp-admin/upgrade-schema.php | 3 +- wp-admin/wp-admin.css | 5 +- wp-includes/version.php | 2 +- 7 files changed, 84 insertions(+), 131 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 20d1a9b59..61d68c327 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -707,4 +707,23 @@ function validate_current_theme() { return true; } +function parent_dropdown($parent = 0, $level = 0) { + global $wpdb; + $items = $wpdb->get_results("SELECT ID, post_parent, post_title FROM $wpdb->posts WHERE post_parent = $parent AND post_status = 'static' ORDER BY menu_order"); + if ($items) { + foreach ($items as $item) { + $pad = str_repeat(' ', $level * 3); + if ($item->ID == $current) + $current = ' selected="selected"'; + else + $current = ''; + + echo "\n\t"; + parent_dropdown($item->ID, $level + 1); + } + } else { + return false; + } +} + ?> \ No newline at end of file diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index dc5b29c43..bfc5f71e2 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -1,6 +1,6 @@
- +

- -
- +
- -
+
+ +
+ +
+
+
+ +
+
+
+ +
+
+
- +

- +

-
diff --git a/wp-admin/edit-pages.php b/wp-admin/edit-pages.php index 79fa5fe71..d69da60c1 100644 --- a/wp-admin/edit-pages.php +++ b/wp-admin/edit-pages.php @@ -8,35 +8,10 @@ require_once('admin-header.php'); get_currentuserinfo(); ?> -
- Create New Page

"; ?> -
+
+

-
-
-
- - - -
-
- -
- - - - - - - - - - - get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'static' AND post_author = $user_ID"); } else { @@ -44,84 +19,57 @@ if (isset($user_ID) && ('' != intval($user_ID))) { } if ($posts) { +?> +
+ + + + + + + + + + - - + + + +
g:i:s a'); ?> View $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "" . __('Edit') . ""; } ?> $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "" . __('Delete') . ""; } ?>
- - - +

- -get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id ORDER BY comment_date"); - if ($comments) { - ?> -

-
    -comment_ID); -?> - -
  1. > - - @ - - $authordata->user_level) or ($user_login == $authordata->user_login)) { - echo "[ comment_ID."\">" . __('Edit') . ""; - echo " - ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'OK\' to delete, \'Cancel\' to stop."), $comment->comment_author) . "')\">" . __('Delete') . " "; - if ( ('none' != $comment_status) && ($user_level >= 3) ) { - if ('approved' == wp_get_comment_status($comment->comment_ID)) { - echo " - ID."&comment=".$comment->comment_ID."\">" . __('Unapprove') . " "; - } else { - echo " - ID."&comment=".$comment->comment_ID."\">" . __('Approve') . " "; - } - } - echo "]"; - } // end if any comments to show - ?> -
    - - - ( - - / - - ) (IP: - - ) - - -
  2. - -'; - }//end if comments - ?> -
- + + 0) { + $action = 'post'; + get_currentuserinfo(); + //set defaults + $post_status = 'static'; + $comment_status = get_settings('default_comment_status'); + $ping_status = get_settings('default_ping_status'); + $post_pingback = get_settings('default_pingback_flag'); + + include('edit-page-form.php'); +} +?> + + \ No newline at end of file diff --git a/wp-admin/post.php b/wp-admin/post.php index 9fac3606b..90e537209 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -692,35 +692,6 @@ case 'editedcomment': do_action('edit_comment', $comment_ID); break; - case 'createpage': - $standalone = 0; - $title = __('Create New Page'); - require_once ('./admin-header.php'); - - if ($user_level > 0) { - $action = 'post'; - get_currentuserinfo(); - //set defaults - $post_status = 'static'; - $comment_status = get_settings('default_comment_status'); - $ping_status = get_settings('default_ping_status'); - $post_pingback = get_settings('default_pingback_flag'); - - include('edit-page-form.php'); - } else { -?> -
-

-You can also e-mail the admin to ask for a promotion.
-When you’re promoted, just reload this page and you’ll be able to blog. :)'), get_settings('admin_email')); ?> -

-
-posts ( post_content_filtered text NOT NULL, post_parent int(11) NOT NULL default '0', guid varchar(255) NOT NULL default '', + menu_order int(11) NOT NULL default '0', PRIMARY KEY (ID), - KEY post_date_gmt (post_date_gmt), KEY post_name (post_name), - KEY post_status (post_status) ); CREATE TABLE $wpdb->users ( ID int(10) unsigned NOT NULL auto_increment, diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index 5708d1483..6fa419ed8 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -47,7 +47,8 @@ body, td { fieldset { border: 1px solid #ddd; - padding: 2px; + padding: 3px; + -moz-border-radius: 5px; } fieldset label.selectit { @@ -467,7 +468,7 @@ textarea, input, select { height: 4em; } -#titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv { +#titlediv, #poststatusdiv, #commentstatusdiv, #slugdiv, #postpassworddiv, #namediv, #uridiv, #emaildiv, #pageparent { float: left; height: 6em; margin-right: 5px; diff --git a/wp-includes/version.php b/wp-includes/version.php index ae3602084..ffc233b2d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -2,6 +2,6 @@ // This just holds the version number, in a separate file so we can bump it without cluttering the CVS -$wp_version = '1.3-alpha-3'; +$wp_version = '1.3-alpha-4'; ?> \ No newline at end of file