Moved add tax button, and tidied up tax column display

This commit is contained in:
Mike Jolley 2014-07-22 11:54:59 +01:00
parent 3b71920d1c
commit 0c5be5f054
3 changed files with 43 additions and 26 deletions

File diff suppressed because one or more lines are too long

View File

@ -766,9 +766,6 @@ ul.wc_coupon_list_block {
font-size: 1em;
}
}
th.line_tax {
white-space: nowrap;
}
.quantity {
text-align: center;
input {
@ -848,18 +845,38 @@ ul.wc_coupon_list_block {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAARklEQVQYGWP8//8/AzGACV3Rnj17/oMwujiGQnQFMD7RChlBbsRmFcwkEO3i4sJImonIumGmg0xBFifaRKIVgj2DbAUuNgCfThpracSKqwAAAABJRU5ErkJggg==) no-repeat center;
}
}
.delete-order-tax {
.ir;
display: inline-block;
margin: 0;
&:before {
.icon;
content: "\e013";
color: #999;
th.line_tax {
white-space: nowrap;
}
.line_tax {
padding: 8px 18px 8px 8px;
.line_tax_wrapper {
position: relative;
display: block;
}
.delete-order-tax {
.ir;
font-size: 12px;
visibility: hidden;
float: right;
margin: 2px -18px 0 0;
&:before {
.icon( "\e013" );
color:white;
background-color: #000;
-webkit-border-radius:100%;
border-radius:100%;
border: 1px solid #000;
box-shadow:0 1px 2px rgba(0,0,0,0.2);
}
&:hover:before {
border-color: @red;
background-color: @red;
}
}
&:hover {
&:before {
color: @red;
.delete-order-tax {
visibility: visible;
}
}
}

View File

@ -35,17 +35,17 @@ if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {
foreach ( $order_taxes as $tax_id => $tax_item ) :
$tax_class = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] );
$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
$column_label = ! empty( $tax_item['label'] ) ? $tax_item['label'] : __( 'Tax', 'woocommerce' );
?>
<th class="line_tax">
<span><?php echo esc_attr( $tax_class_name ); ?> </span>
<span class="tips" data-tip="<?php
echo esc_attr( $tax_item['label'] . ' (' . $tax_item['name'] . ')' );
?>">[?]</span>
<input type="hidden" name="order_taxes[<?php echo $tax_id; ?>]" value="<?php echo esc_attr( $tax_item['rate_id'] ); ?>">
<a class="delete-order-tax" href="#" data-rate_id="<?php echo $tax_id; ?>"></a>
<th class="line_tax tips" data-tip="<?php
echo esc_attr( $tax_item['name'] . ' (' . $tax_class_name . ')' );
?>">
<span class="line_tax_wrapper">
<?php echo esc_attr( $column_label ); ?>
<input type="hidden" name="order_taxes[<?php echo $tax_id; ?>]" value="<?php echo esc_attr( $tax_item['rate_id'] ); ?>">
<a class="delete-order-tax" href="#" data-rate_id="<?php echo $tax_id; ?>"></a>
</span>
</th>
<?php
endforeach;
endif;
@ -155,6 +155,9 @@ if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {
</p>
<p class="add-items">
<button type="button" class="button add-line-item"><?php _e( 'Add line item(s)', 'woocommerce' ); ?></button>
<?php if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) : ?>
<button type="button" class="button add-order-tax"><?php _e( 'Add Tax', 'woocommerce' ); ?></button>
<?php endif; ?>
<button type="button" class="button refund-items"><?php _e( 'Refund', 'woocommerce' ); ?></button>
<button type="button" class="button button-primary calculate-action"><?php _e( 'Calculate Total', 'woocommerce' ); ?></button>
</p>
@ -163,9 +166,6 @@ if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) {
<button type="button" class="button add-order-item"><?php _e( 'Add product(s)', 'woocommerce' ); ?></button>
<button type="button" class="button add-order-fee"><?php _e( 'Add fee', 'woocommerce' ); ?></button>
<button type="button" class="button add-order-shipping"><?php _e( 'Add shipping cost', 'woocommerce' ); ?></button>
<?php if ( 'yes' == get_option( 'woocommerce_calc_taxes' ) ) : ?>
<button type="button" class="button add-order-tax"><?php _e( 'Add Tax', 'woocommerce' ); ?></button>
<?php endif; ?>
<button type="button" class="button cancel-action"><?php _e( 'Cancel', 'woocommerce' ); ?></button>
<button type="button" class="button button-primary save-action"><?php _e( 'Save', 'woocommerce' ); ?></button>
</div>