? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
2 Nov 2016

Pull Request for Issue #12691.

Summary of Changes

Removes the notice from the issue.

Testing Instructions

  • Create some field groups
  • Create a Content field.
  • Select this Content field and Batch copy or move

Documentation Changes Required

avatar laoneo laoneo - open - 2 Nov 2016
avatar laoneo laoneo - change - 2 Nov 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2016
Category Administration Components
avatar laoneo laoneo - change - 2 Nov 2016
The description was changed
avatar laoneo laoneo - edited - 2 Nov 2016
avatar laoneo laoneo - change - 2 Nov 2016
Title
Define the batch commands
[com_fields] Define the batch commands
avatar laoneo laoneo - change - 2 Nov 2016
Title
Define the batch commands
[com_fields] Define the batch commands
avatar laoneo laoneo - edited - 2 Nov 2016
avatar infograf768
infograf768 - comment - 2 Nov 2016

That does not work here.

avatar infograf768
infograf768 - comment - 3 Nov 2016

@laoneo
That patch is done to the wrong file.
In fact, this will work (if we keep using categories...)

diff --git a/administrator/components/com_fields/models/field.php b/administrator/components/com_fields/models/field.php
index f2fee8e..8d8ae2e 100644
--- a/administrator/components/com_fields/models/field.php
+++ b/administrator/components/com_fields/models/field.php
@@ -27,4 +27,22 @@

    /**
+    * Batch copy/move command. If set to false,
+    * the batch copy/move command is not supported
+    *
+    * @var string
+    */
+   protected $batch_copymove = 'category_id';
+
+   /**
+    * Allowed batch commands
+    *
+    * @var array
+    */
+   protected $batch_commands = array(
+           'assetgroup_id' => 'batchAccess',
+           'language_id' => 'batchLanguage',
+   );
+
+   /**
     * Constructor.
     *
diff --git a/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php b/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php
index f54cf1e..8d2645c 100644
--- a/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php
+++ b/administrator/components/com_fields/views/fields/tmpl/default_batch_body.php
@@ -28,8 +28,10 @@
 </div>
 <div class="row-fluid">
-   <div class="control-group span6">
-       <div class="controls">
-           <?php echo JHtml::_('batch.item', $context . '.fields');?>
+   <?php if ($published >= 0) : ?>
+       <div class="control-group span6">
+           <div class="controls">
+               <?php echo JHtml::_('batch.item', $context . '.fields');?>
+           </div>
        </div>
-   </div>
+   <?php endif; ?>
 </div>
avatar laoneo
laoneo - comment - 3 Nov 2016

Thanks for the patch. I'v adapted it. Does it work now as expected as I couldn't reproduce the issue.

avatar infograf768
infograf768 - comment - 3 Nov 2016

Except for the indentation in default_batch_body (look above), it is fine.
But maintainers discussed and do agree that modifying com_categories as you did is not acceptable, so a solution has to be found there.

avatar laoneo
laoneo - comment - 3 Nov 2016

This PR has nothing to do with the other discussion. Lets try to focus.

avatar infograf768
infograf768 - comment - 3 Nov 2016

It has everything to do with it, as batch is implemented using com_categories.

avatar laoneo
laoneo - comment - 3 Nov 2016

What I wanted to say is that we should not discuss it over multiple issues.

avatar infograf768
infograf768 - comment - 3 Nov 2016

In the mean while, thanks for correcting the indent.

avatar zero-24
zero-24 - comment - 3 Nov 2016

I have just moved the since tags to __DEPLOY_VERSION__ ;)

avatar brianteeman brianteeman - test_item - 3 Nov 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 3 Nov 2016

I have tested this item successfully on 2ef5743


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12695.

avatar joomla-cms-bot joomla-cms-bot - change - 5 Dec 2016
Category Administration Components Administration com_fields Components
avatar Bakual
Bakual - comment - 7 Dec 2016

I think this isn't needed anymore as it should be fixed with #13019

avatar zero-24
zero-24 - comment - 7 Dec 2016

@laoneo you just reverted my changes here ? Can you apply the changes (missing spaces and __DEPLOY_VERSION__):

image

image

avatar laoneo laoneo - change - 7 Dec 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-12-07 10:25:32
Closed_By laoneo
avatar laoneo laoneo - close - 7 Dec 2016

Add a Comment

Login with GitHub to post a comment