Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] No menu must be selected for menu items batch processing #600

Open
joomlapl-bot opened this issue Oct 21, 2024 · 0 comments
Open

[5.2] No menu must be selected for menu items batch processing #600

joomlapl-bot opened this issue Oct 21, 2024 · 0 comments

Comments

@joomlapl-bot
Copy link
Collaborator

PR w związku ze zmianą oryginału joomla/joomla-cms#44286 Poniżej zmiany w oryginale:

Click to expand the diff!
diff --git a/administrator/components/com_menus/tmpl/items/default_batch_body.php b/administrator/components/com_menus/tmpl/items/default_batch_body.php
index 71f9df278611b..266830db1368f 100644
--- a/administrator/components/com_menus/tmpl/items/default_batch_body.php
+++ b/administrator/components/com_menus/tmpl/items/default_batch_body.php
@@ -10,7 +10,6 @@
 
 defined('_JEXEC') or die;
 
-use Joomla\CMS\Factory;
 use Joomla\CMS\HTML\HTMLHelper;
 use Joomla\CMS\Language\Multilanguage;
 use Joomla\CMS\Language\Text;
@@ -24,7 +23,6 @@
 ];
 $published = (int) $this->state->get('filter.published');
 $clientId  = (int) $this->state->get('filter.client_id');
-$menuType  = Factory::getApplication()->getUserState('com_menus.items.menutype', '');
 
 if ($clientId == 1) {
     /** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
@@ -34,23 +32,22 @@
 }
 ?>
 <div class="p-3">
-    <?php if (strlen($menuType) && $menuType != '*') : ?>
-        <?php if ($clientId != 1) : ?>
-    <div class="row">
+    <?php if ($clientId != 1) : ?>
+        <div class="row">
             <?php if (Multilanguage::isEnabled()) : ?>
+                <div class="form-group col-md-6">
+                    <div class="controls">
+                        <?php echo LayoutHelper::render('joomla.html.batch.language', []); ?>
+                    </div>
+                </div>
+            <?php endif; ?>
             <div class="form-group col-md-6">
                 <div class="controls">
-                    <?php echo LayoutHelper::render('joomla.html.batch.language', []); ?>
+                    <?php echo LayoutHelper::render('joomla.html.batch.access', []); ?>
                 </div>
             </div>
-            <?php endif; ?>
-        <div class="form-group col-md-6">
-            <div class="controls">
-                <?php echo LayoutHelper::render('joomla.html.batch.access', []); ?>
-            </div>
         </div>
-    </div>
-        <?php endif; ?>
+    <?php endif; ?>
     <div class="row">
         <?php if ($published >= 0) : ?>
             <div class="form-group col-md-6">
@@ -82,17 +79,12 @@
             <p><?php echo Text::_('COM_MENUS_SELECT_MENU_FILTER_NOT_TRASHED'); ?></p>
         <?php endif; ?>
     </div>
-    <?php else : ?>
-    <div class="row">
-        <p><?php echo Text::_('COM_MENUS_SELECT_MENU_FIRST'); ?></p>
-    </div>
-    <?php endif; ?>
-</div>
-<?php if ((strlen($menuType) && $menuType != '*' && $clientId == 0) || ($published >= 0 && $clientId == 1)) : ?>
-<div class="btn-toolbar p-3">
-    <joomla-toolbar-button task="item.batch" class="ms-auto">
-        <button type="button" class="btn btn-success"><?php echo Text::_('JGLOBAL_BATCH_PROCESS'); ?></button>
-    </joomla-toolbar-button>
 </div>
+<?php if ($clientId == 0 || ($published >= 0 && $clientId == 1)) : ?>
+    <div class="btn-toolbar p-3">
+        <joomla-toolbar-button task="item.batch" class="ms-auto">
+            <button type="button" class="btn btn-success"><?php echo Text::_('JGLOBAL_BATCH_PROCESS'); ?></button>
+        </joomla-toolbar-button>
+    </div>
 <?php endif; ?>
 
diff --git a/administrator/language/en-GB/com_menus.ini b/administrator/language/en-GB/com_menus.ini
index c205c860eda17..05210e29cdcc2 100644
--- a/administrator/language/en-GB/com_menus.ini
+++ b/administrator/language/en-GB/com_menus.ini
@@ -176,6 +176,7 @@ COM_MENUS_SELECT_A_MENUITEM="Select a Menu Item"
 COM_MENUS_SELECT_MENU="- Select Menu -"
 COM_MENUS_SELECT_MENU_FILTER="Select Menu"
 COM_MENUS_SELECT_MENU_FILTER_NOT_TRASHED="Filter the list by a state other than trashed or clear the filter."
+; Deprecated, will be removed with 6.0
 COM_MENUS_SELECT_MENU_FIRST="To use batch processing, please first select a Menu in the manager."
 COM_MENUS_SELECT_MENU_FIRST_EXPORT="To use export, please first select a valid Menu in the manager."
 COM_MENUS_SUBMENU_ITEMS="Menu Items"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants