diff --git a/core/lib/Thelia/Core/Template/Element/BaseLoop.php b/core/lib/Thelia/Core/Template/Element/BaseLoop.php index 7344843ed..6d4e6ed92 100755 --- a/core/lib/Thelia/Core/Template/Element/BaseLoop.php +++ b/core/lib/Thelia/Core/Template/Element/BaseLoop.php @@ -410,6 +410,11 @@ abstract class BaseLoop } } + /** + * @param LoopResult $loopResult + * + * @return LoopResult + */ abstract public function parseResults(LoopResult $loopResult); /** diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/CategoryTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/CategoryTest.php index ce5f56747..c3fbe56d9 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/CategoryTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/CategoryTest.php @@ -53,6 +53,13 @@ class CategoryTest extends BaseLoopTestor public function testSearchById() { $category = CategoryQuery::create()->findOne(); + if(null === $category) { + $category = new \Thelia\Model\Category(); + $category->setParent(0); + $category->setVisible(1); + $category->setTitle('foo'); + $category->save(); + } $this->baseTestSearchById($category->getId()); } diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/ContentTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/ContentTest.php index 3a286200a..dbb705b03 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/ContentTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/ContentTest.php @@ -53,6 +53,13 @@ class ContentTest extends BaseLoopTestor public function testSearchById() { $content = ContentQuery::create()->findOne(); + if(null === $content) { + $content = new \Thelia\Model\Content(); + $content->setDefaultFolder(0); + $content->setVisible(1); + $content->setTitle('foo'); + $content->save(); + } $this->baseTestSearchById($content->getId()); } diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/FolderTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/FolderTest.php index 15ea3968c..a5210839e 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/FolderTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/FolderTest.php @@ -53,6 +53,13 @@ class FolderTest extends BaseLoopTestor public function testSearchById() { $folder = FolderQuery::create()->findOne(); + if(null === $folder) { + $folder = new \Thelia\Model\Folder(); + $folder->setParent(0); + $folder->setVisible(1); + $folder->setTitle('foo'); + $folder->save(); + } $this->baseTestSearchById($folder->getId()); } diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/ProductTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/ProductTest.php index 07e179cbd..e806a6971 100755 --- a/core/lib/Thelia/Tests/Core/Template/Loop/ProductTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/ProductTest.php @@ -54,6 +54,13 @@ class ProductTest extends BaseLoopTestor public function testSearchById() { $product = ProductQuery::create()->orderById(Criteria::ASC)->findOne(); + if(null === $product) { + $product = new \Thelia\Model\Product(); + $product->setDefaultCategory(0); + $product->setVisible(1); + $product->setTitle('foo'); + $product->save(); + } $this->baseTestSearchById($product->getId()); } diff --git a/core/lib/Thelia/Tests/Core/Template/Loop/TaxRuleTest.php b/core/lib/Thelia/Tests/Core/Template/Loop/TaxRuleTest.php index fa24d72ee..7e2da4b26 100644 --- a/core/lib/Thelia/Tests/Core/Template/Loop/TaxRuleTest.php +++ b/core/lib/Thelia/Tests/Core/Template/Loop/TaxRuleTest.php @@ -53,6 +53,11 @@ class TaxRuleTest extends BaseLoopTestor public function testSearchById() { $tr = TaxRuleQuery::create()->findOne(); + if(null === $tr) { + $tr = new \Thelia\Model\TaxRule(); + $tr->setTitle('foo'); + $tr->save(); + } $this->baseTestSearchById($tr->getId(), array('force_return' => true)); } diff --git a/templates/default/I18n/en_US.php b/templates/default/I18n/en_US.php index 19b58a6c4..24bf81612 100755 --- a/templates/default/I18n/en_US.php +++ b/templates/default/I18n/en_US.php @@ -152,6 +152,10 @@ return array ( 'Select Country' => 'Select Country', 'Create' => 'Create', 'Related' => 'Related', + 'Grid' => 'Grid', + 'List' => 'List', + 'Next' => 'Next', + 'Previous' => 'Previous', /* 'The page cannot be found' => 'The page cannot be found', 'What\'s your name?' => 'What\'s your name?', diff --git a/templates/default/I18n/es_ES.php b/templates/default/I18n/es_ES.php index 9e276a02b..427227f1c 100755 --- a/templates/default/I18n/es_ES.php +++ b/templates/default/I18n/es_ES.php @@ -152,6 +152,10 @@ return array ( 'Select Country' => '', 'Create' => '', 'Related' => '', + 'Grid' => '', + 'List' => '', + 'Next' => '', + 'Previous' => '', /* 'The page cannot be found' => '', 'What\'s your name?' => '', diff --git a/templates/default/I18n/fr_FR.php b/templates/default/I18n/fr_FR.php index a9f92fa95..b5f6a6290 100755 --- a/templates/default/I18n/fr_FR.php +++ b/templates/default/I18n/fr_FR.php @@ -152,6 +152,11 @@ return array ( 'Select Country' => 'Choisissez un pays', 'Create' => 'Créer', 'Related' => 'Liés', // voir le contexte pour l'accord + 'Grid' => 'Grille', + 'List' => 'Liste', + 'Next' => 'Suivant', + 'Previous' => 'Précédent', + /* 'The page cannot be found' => '', 'What\'s your name?' => '', diff --git a/templates/default/I18n/it_IT.php b/templates/default/I18n/it_IT.php index 9e276a02b..427227f1c 100755 --- a/templates/default/I18n/it_IT.php +++ b/templates/default/I18n/it_IT.php @@ -152,6 +152,10 @@ return array ( 'Select Country' => '', 'Create' => '', 'Related' => '', + 'Grid' => '', + 'List' => '', + 'Next' => '', + 'Previous' => '', /* 'The page cannot be found' => '', 'What\'s your name?' => '', diff --git a/templates/default/includes/toolbar.html b/templates/default/includes/toolbar.html index 33f5ba9e5..c512ba90a 100644 --- a/templates/default/includes/toolbar.html +++ b/templates/default/includes/toolbar.html @@ -30,8 +30,8 @@ {intl l="View as"}: - - + + @@ -42,9 +42,9 @@