Problem/Motivation

Latest version of Gin Admin theme hides actions behind a more actions button unless it is identified as a #gin_action_item.

Proposed resolution

Add the #gin_action_item to the $workflow_submit_action element.

Comments

greenSkin created an issue. See original summary.

greenskin’s picture

Status: Active » Needs review
StatusFileSize
new481 bytes
johnv’s picture

Issue summary: View changes
johnv’s picture

Status: Needs review » Needs work

I tested Gin 8.x-3.0-rc12 (administration theme).
I installed it as default theme, not only as administrative theme.
I tested the following:
- node view mode (with Transition form as formatter): works fine without patch
- node edit view: action buttons are hidden/removed (but patch does not help)
- node workflow history tab: action buttons work fine without patch.
- block with workflow transition form (after adding block to theme layout).

So, in my system, all-but the edit mode work fine, but the patch does not help.
Do I need to do anything more?

rfmarcelino’s picture

#2 worked for me
Before:
before
After:
after

johnv’s picture

Title: Support Gin action item » Disable Gin Admin theme's MoreActions button
Version: 8.x-1.x-dev » 8.x-1.8
Status: Needs work » Reviewed & tested by the community

OK, I see now, I did not find the 'More actions button.
I guess this title is better.

johnv’s picture

  • johnv committed c1aeafd5 on 8.x-1.x
    Issue #3458569 by greenSkin, rfmarcelino: Disable Gin Admin theme's...
johnv’s picture

Status: Reviewed & tested by the community » Fixed
johnv’s picture

Component: Code » User interface
todea’s picture

Similar issue, we are using Workflow 8.x-1.7 and Gin 8.x-3.0-rc13. For the nodes where we use workflow, the Save & Delete actions are removed. Save is replaced w/ "Update workflow".

If we switch back to Claro as the admin theme, then save and delete properly display.

johnv’s picture

@todea, I am sorry, where do you see those buttons/tasks?
I cannot find the phrase 'Update workflow' in the repository. Is it the name of a transition label (admin/config/workflow/workflow/workflow1/transition_labels), or are you perhaps using core Workflows (mind the trailing 's') instead of this contrib module?

johnv’s picture

@todea, in my case, the buttons 'Save', 'Preview', 'Delete', are replaced by 1 button 'Save'. the Preview and Delete buttons are not visible (there is no 'more actions' dropdown menu). I guess this is not caused by the Workflow module.

todea’s picture

@johnv, yeah I'm not sure why this is happening. I am using this "workflow" module, version 8.x-1.7. I see a 'Update workflow' button label in src\Form\WorkflowTransitionForm.php. This occurs on the add/edit screen for an "event" node on our site.

todea’s picture

It looks like the issue was caused by having the "Workflow transition form" on our form display. When I change that display to check boxes or select list, then the normal node save/delete actions come back.

greenskin’s picture

Looks like something when building the transition form in WorkflowManager::getWorkflowTransitionForm() is causing the additional actions (e.g., preview, delete, etc) to disappear.

greenskin’s picture

Dug a little deeper and the issue with the missing actions looks to be with Gin and how it's altering actions for the content form. Gin is effectively setting the actions based on the transition form and not the actual node content form (see GinContentFormHelper::formAlter()). Because the workflow transition form is altered after the node form, the workflow transition actions take precedence for Gin. I'm not sure there's anything specific the workflow module can do here other than work with gin maintainers for a solution.

johnv’s picture

Title: Disable Gin Admin theme's MoreActions button » Support Gin Admin theme's MoreActions button

Indeed, GinContentFormHelper::formAlter() is the problem. It assumes that a button 'submit exists', which is not the case with workflow action buttons. Not sure yet why the 'preview' button has gone.
(There is a 'postponed' issue that requests a reshuffle of the action buttons, leaving the submit button untouched (except for the title perhaps). I cannot find is now. )

johnv’s picture

Status: Fixed » Needs work

Perhaps we need some modifiction in function _workflow_transition_form_get_action_buttons().

greenskin’s picture

Status: Needs work » Needs review
Related issues: +#3464716: Actions broken when using workflow transition form

Added an issue with a merge request in Gin's issue queue to ignore the workflow transition form IDs. That issue fixes the general missing actions, while the patch from #2 here resolves the drop button getting hidden behind "More actions".

matiasmiranda’s picture

johnv’s picture

Adding the above #3508072: Latest Gin admin theme button in "more actions" dropdown to related issues.
However, that is from 'Workflow buttons' module, which builds upon core 'Workflows' module, not this contrib 'Workflow' module.

johnv’s picture

Version: 8.x-1.8 » 2.1.0
Status: Needs review » Fixed

In the mean time, thisis added to the code base.
Thanks all

Status: Fixed » Closed (fixed)

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