From 9f8216378e94287ae14e9712d1b5bec983fa3965 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Fri, 20 Sep 2019 10:33:44 +0200 Subject: [PATCH] Only show the "Test plural forms"-button on the qu edit page when the current language requires more than 2 plural forms (references #261) --- changelog/52_UNRELEASED_2019-xx-xx.md | 2 +- views/quantityunitform.blade.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog/52_UNRELEASED_2019-xx-xx.md b/changelog/52_UNRELEASED_2019-xx-xx.md index 5ac98039..5af86ded 100644 --- a/changelog/52_UNRELEASED_2019-xx-xx.md +++ b/changelog/52_UNRELEASED_2019-xx-xx.md @@ -59,7 +59,7 @@ - Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar) - Boolean settings provided via environment variables (so the strings `true` and `false`) are now parsed correctly (thanks @mduret) - All uploaded pictures (currently for products and recipes) are now automatically downscaled to the appropriate size when serving them to improve page load times -- It's now possible to test plural forms of quantity units (button on the quantity unit edit page) +- It's now possible to test plural forms of quantity units (button on the quantity unit edit page, only visible if the current language requires more than 2 plural forms) ### API improvements & non-breaking changes - New endpoint `/stock/shoppinglist/add-product` to add a product to a shopping list (thanks @Forceu) diff --git a/views/quantityunitform.blade.php b/views/quantityunitform.blade.php index d5f2dd38..9083298d 100644 --- a/views/quantityunitform.blade.php +++ b/views/quantityunitform.blade.php @@ -57,7 +57,10 @@ )) + + @if(intval($pluralCount) > 2) + @endif