Order admin. Closes #680.

This commit is contained in:
Mike Jolley 2012-02-21 12:53:36 +00:00
parent d03790c18b
commit fd459d702a
7 changed files with 29 additions and 349 deletions

View File

@ -13,6 +13,7 @@
add_filter('manage_edit-shop_order_columns', 'woocommerce_edit_order_columns');
function woocommerce_edit_order_columns($columns){
global $woocommerce;
$columns = array();
@ -22,13 +23,14 @@ function woocommerce_edit_order_columns($columns){
$columns["billing_address"] = __("Billing", 'woocommerce');
$columns["shipping_address"] = __("Shipping", 'woocommerce');
$columns["total_cost"] = __("Order Total", 'woocommerce');
$columns["comments"] = '<img alt="' . esc_attr__( 'Order Notes', 'woocommerce' ) . '" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" />';
$columns["note"] = '<img src="' . $woocommerce->plugin_url() . '/assets/images/note_head.png" alt="' . __("Customer Notes", 'woocommerce') . '" class="tips" tip="' . __("Customer Notes", 'woocommerce') . '" />';
$columns["order_date"] = __("Date", 'woocommerce');
$columns["order_actions"] = __("Actions", 'woocommerce');
return $columns;
}
/**
* Custom Columns for order page
**/
@ -36,7 +38,7 @@ add_action('manage_shop_order_posts_custom_column', 'woocommerce_custom_order_co
function woocommerce_custom_order_columns($column) {
global $post;
global $post, $woocommerce;
$order = new WC_Order( $post->ID );
switch ($column) {
@ -129,6 +131,14 @@ function woocommerce_custom_order_columns($column) {
</p><?php
break;
case "note" :
if ($order->customer_note)
echo '<img src="'.$woocommerce->plugin_url().'/assets/images/note.png" alt="yes" class="tips" tip="'. __('Yes', 'woocommerce') .'" />';
else
echo '<img src="'.$woocommerce->plugin_url().'/assets/images/note-off.png" alt="no" class="tips" tip="'. __('No', 'woocommerce') .'" />';
break;
}
}
@ -260,6 +270,7 @@ function woocommerce_custom_shop_order_sort($columns) {
'order_total' => 'order_total',
'order_date' => 'date'
);
unset($columns['comments']);
return wp_parse_args($custom, $columns);
}

File diff suppressed because one or more lines are too long

View File

@ -534,7 +534,7 @@ mark.amount {
margin: 3px 0;
}
.column-total_cost, .column-order_date {
width:150px !important;
width:9%;
}
.column-order_status {
width:90px;
@ -688,6 +688,18 @@ table.wp-list-table {
width: 46px;
text-align: left !important;
}
.column-note {
width: 46px;
text-align: center;
img {
margin: 0 auto;
}
}
th.column-note {
img {
padding-top: 2px !important;
}
}
.manage-column.column-featured img, .manage-column.column-product_type img {
padding-left: 2px;
}

BIN
assets/images/note-off.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

BIN
assets/images/note.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

BIN
assets/images/note_head.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

View File

@ -147,6 +147,8 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
* Added Bulgarian translation
* Fixed SKU sort in admin
* woocommerce_file_download_path hook
* Order screen has icons showing customer notes + order notes
* Fixed category hierarchy (typo)
= 1.4.4 - 18/02/2012 =
* Fix for remove coupon links after ajax update of shipping