I'm not a fan of current order actions with icons that look outdated.
The problem is that there is no way to change the way order actions are rendered as theming is hard coded in uc_order_actions().
It would be a nice addition to introduce a theme function here.
This way it would be possible to turn action icons into ctool button links.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anrikun created an issue. See original summary.

TR’s picture

Status: Active » Closed (works as designed)

You can already do what you want with hook_uc_order_actions_alter().

anrikun’s picture

Status: Closed (works as designed) » Active

hook_uc_order_actions_alter() does not allow to change the way order actions are rendered. Please have a look at function uc_order_actions ().

TR’s picture

Status: Active » Closed (works as designed)

So what do you think will happen if you change the value of the 'icon' element in the actions array via the alter hook?

Regardless, the order admin page is a View, so if you don't like the contents of one of the columns then edit the View and use whatever you want in that column - there's nothing stopping you from accomplishing this with the current features of Ubercart.

This has all been changed in D8 as of several years ago, so no more icons. New features go into the current version, not the previous version - we're not going to add a feature in D7 that can't be propagated forward to D8, that would be a waste of effort. If you want to provide a patch that backports the D8 changes to D7, then we can consider that.

anrikun’s picture

Title: Allow to theme order actions » Backport the ability to theme order actions like in D8
Category: Feature request » Task
Status: Closed (works as designed) » Active

Changing icon value is not enough as there's still no way to change the way action links are rendered as a whole.
What I want is exactly what the D8 version of Ubercart provides.
So you're right, lets turn this into a backport task, keeping in mind that we should not change the way links are rendered by default for compatibility.
I'll submit a patch.

anrikun’s picture

Status: Active » Needs review
FileSize
1.79 KB

Solution 1: Provide a theme_uc_order_actions function

anrikun’s picture

(Better) solution 2: Add an option in uc_order_handler_field_order_actions to display actions as a CTools drop button
This provides the same behaviour as in D8 but as an option not to break current behaviour.

anrikun’s picture

Title: Backport the ability to theme order actions like in D8 » Backport the ability to render order actions as a CTools dropbutton like in D8