Skip to content

Commit

Permalink
Merge pull request #162 from Erikmitk/feature/reverse_list_sorting
Browse files Browse the repository at this point in the history
[3.x] Change ordering of document lists in the backend
  • Loading branch information
claussni authored Feb 25, 2020
2 parents 9c5be0c + eed3441 commit d68bd04
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Classes/Domain/Repository/DocumentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ public function getAllDocuments()
$query->matching($query->logicalAnd($constraints));
}

// order by start_date -> start_time...
$query->setOrderings(
array('transfer_date' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
array('uid' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING)
);

return $query->execute();
Expand All @@ -90,9 +89,8 @@ public function getNewDocuments()
$query->matching($query->logicalAnd($constraints));
}

// order by start_date -> start_time...
$query->setOrderings(
array('transfer_date' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
array('uid' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING)
);

return $query->execute();
Expand Down Expand Up @@ -127,6 +125,10 @@ public function getInProgressDocuments()

$query->matching($query->logicalAnd($constraints));

$query->setOrderings(
array('uid' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING)
);

return $query->execute();
}

Expand All @@ -147,9 +149,8 @@ public function getTemplates()
$query->matching($query->logicalAnd($constraints));
}

// order by start_date -> start_time...
$query->setOrderings(
array('transfer_date' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
array('uid' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING)
);

return $query->execute();
Expand Down

0 comments on commit d68bd04

Please sign in to comment.