Fix bulk move/group action log names when unsetting location/group #669
This commit is contained in:
parent
0093d48b84
commit
bc589cbe21
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Fix bulk move/group action log names when unsetting location/group #669](https://github.com/farmOS/farmOS/pull/669)
|
||||
|
||||
## [2.0.4] 2023-04-03
|
||||
|
||||
### Added
|
||||
|
|
|
@ -200,7 +200,10 @@ class AssetGroupActionForm extends ConfirmFormBase {
|
|||
// Generate a name for the log.
|
||||
$asset_names = farm_log_asset_names_summary($accessible_entities);
|
||||
$group_names = farm_log_asset_names_summary($groups);
|
||||
$log_name = $this->t('Group @assets into @groups', ['@assets' => $asset_names, '@groups' => $group_names]);
|
||||
$log_name = $this->t('Clear group membership of @assets', ['@assets' => $asset_names]);
|
||||
if (!empty($group_names)) {
|
||||
$log_name = $this->t('Group @assets into @groups', ['@assets' => $asset_names, '@groups' => $group_names]);
|
||||
}
|
||||
|
||||
// Create the log.
|
||||
$log = Log::create([
|
||||
|
|
|
@ -230,7 +230,10 @@ class AssetMoveActionForm extends ConfirmFormBase {
|
|||
// Generate a name for the log.
|
||||
$asset_names = farm_log_asset_names_summary($accessible_entities);
|
||||
$location_names = farm_log_asset_names_summary($locations);
|
||||
$log_name = $this->t('Move @assets to @locations', ['@assets' => $asset_names, '@locations' => $location_names]);
|
||||
$log_name = $this->t('Clear location of @assets', ['@assets' => $asset_names]);
|
||||
if (!empty($location_names)) {
|
||||
$log_name = $this->t('Move @assets to @locations', ['@assets' => $asset_names, '@locations' => $location_names]);
|
||||
}
|
||||
|
||||
// Create the log.
|
||||
$log = Log::create([
|
||||
|
|
Loading…
Reference in New Issue