Fix #683: wrong number of affected elements in bulk action modal

This commit is contained in:
Eliot Berriot 2019-01-25 10:31:53 +01:00
parent 32816a3425
commit 702329b99f
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1 @@
Fixed wrong number of affected elements in bulk action modal (#683)

View File

@ -36,8 +36,8 @@
<p slot="modal-header"> <p slot="modal-header">
<translate <translate
key="1" key="1"
:translate-n="checked.length" :translate-n="affectedObjectsCount"
:translate-params="{count: checked.length, action: currentActionName}" :translate-params="{count: affectedObjectsCount, action: currentActionName}"
translate-plural="Do you want to launch %{ action } on %{ count } elements?"> translate-plural="Do you want to launch %{ action } on %{ count } elements?">
Do you want to launch %{ action } on %{ count } element? Do you want to launch %{ action } on %{ count } element?
</translate> </translate>
@ -271,6 +271,12 @@ export default {
return { return {
refresh: this.$gettext('Refresh table content') refresh: this.$gettext('Refresh table content')
} }
},
affectedObjectsCount () {
if (this.selectAll) {
return this.objectsData.count
}
return this.checked.length
} }
}, },
watch: { watch: {