Repository navigation
Closed
Labels
Description
Bug report
Please note: All issues must be submitted in English. If not, they will be closed automatically.
What I did
In a project @maurohmartinez had to use two of our features together:
- multi-language entities
- CRUD dropdown buttons
What I expected to happen
Dropdown buttons to incorporate the Edit functionality.
What happened
Not that - they broke.
What I've already tried to fix it
Mauro has fixed them this way in the project. Can't say it's final because:
- when the dropdown is open, it pushes the Delete button off the dropdown;
- when the dropdown is not enabled, it make the whole CRUD look weird (it's maybe display block?!)
But it's a place to start!
CleanShot.2025-08-06.at.08.58.57.mp4
resources/views/vendor/backpack/crud/buttons/show.blade.php:
@if ($crud->hasAccess('show', $entry))
@if (!$crud->model->translationEnabled() || !\App\Services\LocalizationService::supportsMultipleLocales())
<a href="{{ url($crud->route.'/'.$entry->getKey().'/show') }}" bp-button="show" class="btn btn-sm btn-link">
<i class="la la-eye"></i> <span>{{ trans('backpack::crud.preview') }}</span>
</a>
@else
<div>
<a class="btn btn-sm btn-link dropdown-toggle text-primary pl-1" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ trans('backpack::crud.preview') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-header">{{ trans('backpack::crud.preview') }}:</li>
@foreach ($crud->model->getAvailableLocales() as $key => $locale)
<a class="dropdown-item" href="{{ url($crud->route.'/'.$entry->getKey().'/show') }}?_locale={{ $key }}">{{ $locale }}</a>
@endforeach
</ul>
</div>
@endif
@endifresources/views/vendor/backpack/crud/buttons/update.blade.php:
@if ($crud->hasAccess('update', $entry))
@if (!$crud->model->translationEnabled() || !\App\Services\LocalizationService::supportsMultipleLocales())
<a href="{{ url($crud->route.'/'.$entry->getKey().'/edit') }}" bp-button="update" class="btn btn-sm btn-link">
<i class="la la-edit"></i> <span>{{ trans('backpack::crud.edit') }}</span>
</a>
@else
<div>
<a class="btn btn-sm btn-link dropdown-toggle text-primary pl-1" data-toggle="dropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ trans('backpack::crud.edit') }} <span class="caret"></span>
</a>
<ul class="dropdown-menu dropdown-menu-right">
<li class="dropdown-header">{{ trans('backpack::crud.edit_translations') }}:</li>
@foreach ($crud->model->getAvailableLocales() as $key => $locale)
<a class="dropdown-item" href="{{ url($crud->route.'/'.$entry->getKey().'/edit') }}?_locale={{ $key }}">{{ $locale }}</a>
@endforeach
</ul>
</div>
@endif
@endifIs it a bug in the latest version of Backpack?
This is a bug in Backpack v6 latest yes.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsDone
Activity
tabacitu commentedon Aug 11, 2025
Additionally, now that we're implementing translatable into another live project, I think it would be MUCH easier for the admin to handle multi-language entities by NOT seeing all the complexity.
I would add a feature flag for this functionality, of having a dropdown with all languages in the Show & Update buttons. And I would make it DISABLED by default in v7. It would provide a MUCH better UX for the admin in the Show view to only see this:
instead of this:
They will STILL be able to translate, by going to that Show/Edit page and using the toggle:
So yes, it does become two-click instead of one-click. But most admins will NOT intend to translate all the time... (especially when we introduce AI-translation), so it's OK for this to be two-click... since it benefits the UI/UX of the Show operation in the 99% use case.
TLDR: I would create two new configs:
showLanguagesDirectlyInEditButton(default false in v7)showLanguagesDirectlyInShowButton(default false in v7)blondie63 commentedon Dec 23, 2025
Hi, @tabacitu some news about this issue ?
same of my Laravel-Backpack/community-forum#1432
pxpm commentedon Dec 26, 2025
Thanks @tabacitu
I've released a new version (7.0.15) that should have this issue tackled.
It supports both your suggestions, it works with dropdowns as before, but I also added an operation setting to disable that behavior completely.
Hope you enjoy it 👍
Cheers