Taken from work by wodenx in #1301430: Inclusive tax implementation is not flexible (attribute options), seems better to split this out and commit separately as this is a separate UI issue.

Comments

longwave’s picture

StatusFileSize
new4.71 KB

This patch uses the Unicode × character instead of an HTML entity, and changes two more uses for consistency.

wodenx’s picture

StatusFileSize
new8.68 KB

I was getting a line break in the qty column of the cart block (Bartik/Chrome). This patch wraps the qty in a <span class="uc-qty"> to enforce no wrapping (and removes the deprecated 'nowrap' attribute on the <td> tags). Also changes the '#markup' tags in the order view tables to use '#theme' => 'uc_qty'. Otherwise, seems to work well.

longwave’s picture

If the output is going to be wrapped in <span> I think the uc_paypal change needs to be reverted, as that expects plaintext output. That one is minor and it's arguable whether it should be themable or not anyway.

longwave’s picture

Actually could we just apply the class to the <td> tags directly and/or use #prefix/#suffix to apply a span where needed?

longwave’s picture

..or even simpler, just make the theme function use &nbsp; instead of a plain space.

wodenx’s picture

Well - I thought about applying to the td tags, and that would be fine, but would need to do it in several places instead of just one. &nbsp; is probably better than the span - but wouldn't we still have to revert the paypal change if we're using an html entity? And mightn't it be helpful to some themers to be able to control the appearance of quantities with CSS (as they can now with prices)? I don't have a strong opinion about it - just let me know what you think and I'll make the change.

longwave’s picture

I think a class on the <td> tag is better than a <span> inside the tag; less markup, and the <td> covers the entire table cell, the <span> covers just the inline text unless you change it to a block element, by which point you may as well be classing the <td>. As long as all our quantity-related tags have the same parent class it should be fine.

longwave’s picture

StatusFileSize
new8.17 KB

The attached patch keeps your #markup to #theme change, but reverts the PayPal change and adds CSS to fix the cart block. Fixing the nowrap attributes is outside the scope of what we're doing here, and there's already an open issue for it.

longwave’s picture

Status: Needs review » Fixed

Committed #8.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.