Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | add_option_dropbutton_to_uc_order_actions-2882818-7.patch | 1.86 KB | anrikun |
| |||
#6 | theme_uc_order_actions-2882818-6.patch | 1.79 KB | anrikun |
|
Comments
Comment #2
TR CreditAttribution: TR commentedYou can already do what you want with hook_uc_order_actions_alter().
Comment #3
anrikun CreditAttribution: anrikun commentedhook_uc_order_actions_alter() does not allow to change the way order actions are rendered. Please have a look at function uc_order_actions ().
Comment #4
TR CreditAttribution: TR commentedSo 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.
Comment #5
anrikun CreditAttribution: anrikun commentedChanging 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.
Comment #6
anrikun CreditAttribution: anrikun commentedSolution 1: Provide a theme_uc_order_actions function
Comment #7
anrikun CreditAttribution: anrikun commented(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.
Comment #8
anrikun CreditAttribution: anrikun commented