Nodequeue has a configuration option to reverse the order of the queue in the admin view:

Ordinarily queues are arranged with the front of the queue (where items will be removed) on top and the back (where items will be added) on the bottom. If checked, this will display the queue such that items will be added to the top and removed from the bottom.

Would be great if this functionality could be added to Entityqueue, since presenting the queue like this seems to make more sense to some content editors.

Comments

maseyuk’s picture

This would be very handy if it could be added

RajabNatshah’s picture

+1 Agree with that. It make more sense for editors.
Working on it.

josebc’s picture

Status: Active » Needs review
FileSize
4.82 KB

patch

RajabNatshah’s picture

+1 Grate work ........ Testing :)

RajabNatshah’s picture

Passed On travis-ci
8.x-4.x-entityqueue Update testing for qntityqueue
https://travis-ci.org/Vardot/varbase/jobs/170579651

Feature: Add default [entityqueue] module testing content and configuration.

@javascript @check @local @development @staging @production
Scenario: Check if we do have the eneityqueue module installed in the system.
  Given I am a logged in user with the "webmaster" user
   When I go to "/admin/modules"
    And I wait
   Then I should see "Entityqueue"
    And the "Entityqueue" checkbox should be checked

@javascript @init @local @development
Scenario: Create "Test Content" content type.
  Given I am a logged in user with the "webmaster" user
   When I go to "/admin/structure/types/add"
    And I wait
   Then I should see "Add content type"
   When I fill in "Test Content" for "Name"
    And I fill in "test_content" for "Machine-readable name"
    And I press "Save and manage fields"
    And I wait
   Then I should see "The content type Test Content has been added."

@javascript @init @local @development
Scenario: Add Entity Queue "Test Queue" and use "Test Content" content type.
  Given I am a logged in user with the "webmaster" user
   When I go to "/admin/structure/entityqueue"
    And I wait
   Then I should see "Add entity queue"
   When I click "Add entity queue"
    And I wait
   Then I should see "Add Entity Queue"
   When I fill in "Test Queue" for "Name"
    And I fill in "test_queue" for "Machine-readable name"
    And I check the box "Test Content"
    And I press "Save"
    And I wait
   Then I should see "The entity queue Test Queue has been added."

@javascript @init @local @development
Scenario: Add Test content N1, N2, N3, N4 type of test content.
  Given I am a logged in user with the "webmaster" user
   When I go to "/node/add/test_content"
    And I wait
   Then I should see "Create Test Content"
   When I fill in "Test content N1" for "Title"
    And I fill in the rich text editor field "Body" with "Test content N1 Body"
    And I press "Save"
    And I wait
   Then I should see "Test Content Test content N1 has been created."
   
   When I go to "/node/add/test_content"
    And I wait
   Then I should see "Create Test Content"
   When I fill in "Test content N2" for "Title"
    And I fill in the rich text editor field "Body" with "Test content N2 Body"
    And I press "Save"
    And I wait
   Then I should see "Test Content Test content N2 has been created."

   When I go to "/node/add/test_content"
    And I wait
   Then I should see "Create Test Content"
   When I fill in "Test content N3" for "Title"
    And I fill in the rich text editor field "Body" with "Test content N3 Body"
    And I press "Save"
    And I wait
   Then I should see "Test Content Test content N3 has been created."



@javascript @init @local @development
Scenario: Add Test content N1, N2, N3, N4 nodes to the "Test Queue" entityqueue.
  Given I am a logged in user with the "webmaster" user
   When I go to "/admin/structure/entityqueue"
    And I wait
   Then I should see "Test Queue"

  # Add "Test content N1" to the location #1 in the "Test Queue"
   When I click "Edit items" in the "Test Queue" row
    And I wait
   Then I should see "Edit subqueue Test Queue"
   When I fill in "Test content N1" for "items[0][target_id]"
    And I press "Save"
   Then I should see "1 items" in the "Test Queue" row

  # Add "Test content N2" to the location #2 in the "Test Queue"
   When I click "Edit items" in the "Test Queue" row
    And I wait
   Then I should see "Edit subqueue Test Queue"
   When I fill in "Test content N2" for "items[1][target_id]"
    And I press "Save"
   Then I should see "2 items" in the "Test Queue" row

  # Add "Test content N3" to the location #3 in the "Test Queue"
   When I click "Edit items" in the "Test Queue" row
    And I wait
   Then I should see "Edit subqueue Test Queue"
   When I fill in "Test content N3" for "items[2][target_id]"
    And I press "Save"
   Then I should see "3 items" in the "Test Queue" row
Feature: Module Requirements - Standard Entity Queue Management - Have the option to Reverse order in admin view.
As a logged in user with a permisstioto manage entityqueues 
I well be able to view the order of entities in entity queues in a reverse order.
So that they will have a flipped order at the front-end.

@javascript @local @development
Scenario: Check that Reverse order in admin view is working.
  Given I am a logged in user with the "webmaster" user
   When I go to "/admin/structure/entityqueue"
    And I wait
   Then I should see "Test Queue"
   When I click "Edit items" in the "Test Queue" row
    And I wait
   Then I should see "Edit subqueue Test Queue"
    And I should see "Test content N1" value in the "edit-items-0-target-id" input element
    And I should see "Test content N2" value in the "edit-items-1-target-id" input element
    And I should see "Test content N3" value in the "edit-items-2-target-id" input element

   When I go to "/admin/structure/entityqueue/test_queue#edit-queue-settings"
    And I wait
   Then I should see "Edit Entity Queue"
   When I click "Queue settings"
    And I wait
   Then I should see "Restrict this queue to a minimum of"
    And I should see "Reverse order in admin view"
   When I check the box "Reverse order in admin view"
    And I press "Save"
    And I wait
   Then I should see "The entity queue Test Queue has been updated."
   When I go to "/admin/structure/entityqueue"
    And I wait
   Then I should see "Test Queue"
   When I click "Edit items" in the "Test Queue" row
    And I wait
   Then I should see "Edit subqueue Test Queue"
    And I should see "Test content N3" value in the "edit-items-0-target-id" input element
    And I should see "Test content N2" value in the "edit-items-1-target-id" input element
    And I should see "Test content N1" value in the "edit-items-2-target-id" input element
RajabNatshah’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community
Mohammed J. Razem’s picture

Title: 'Reverse order in admin view' option » Add "Reverse order in admin view" option

  • amateescu committed f755d8c on 8.x-1.x authored by josebc
    Issue #2478685 by josebc, RajabNatshah, amateescu: Add "Reverse order in...
amateescu’s picture

Status: Reviewed & tested by the community » Fixed
FileSize
5.24 KB
5.03 KB

I always found this option very confusing in Nodequeue, but since many people seem to like it, I have no problem with adding it to Entityqueue as well.

Cleaned up the patch a bit (see attached interdiff) and committed to 8.x-1.x. Thanks for working on and testing this!

josebc’s picture

Thanx for the attribution, I usually use this feature when we want to have a fall-back sorting behavior (ie. created date) so the view shows whatever is in the queue first then the rest according to the other criteria

amateescu’s picture

@josebc, I'm not really sure I understand your comment, since this feature is just about reversing the items in subqueue edit form and doesn't impact how views sorts the items at all. Maybe your comment was for a different issue?

RajabNatshah’s picture

It is the "Entityqueue: Content Queue Position (desc)" in views.
desc or Asc and to combine other SORT CRITERIA

This is linked to #2821631: Queue is always required when using "Limit to a specific entity queue".

Given I have an entity queue named "Test entityqueue" to queue "Test content" content type with a limit of "4"
And I have 4 content of type "Test content" been added to the "Test entityqueue"
And I have a view named "test entityqueue view" has a RELATIONSHIPS with entity queue "test entityqueue"
And the limit for the "test entityqueue view" is "16"
And SORT CRITERIA for the "test entityqueue view" is by "Entityqueue: Content Queue Position (desc)"
And SORT CRITERIA for the "test entityqueue view" is by "Content: Authored on (desc)"
And I have more than 16 content of "Test content"

When I place the "test entityqueue view" on a page
And I open the page which "test entityqueue view" in it
Then I should see the first 4 content order by the "Test entityqueue" in the "test entityqueue view"
And I should see the rest of content ordered by "created" in the "test entityqueue view"

A preview of Drupal 8 "Outside-In" with Entity Queues.
This is done utilizing Sportsleague distribution and Entityqueue module with the Contextual Links patch.
https://www.youtube.com/watch?v=vr-AqQmLoGs

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.