This commit is contained in:
Franck Allimant
2013-11-06 11:16:46 +01:00
12 changed files with 62 additions and 7 deletions

View File

@@ -410,6 +410,11 @@ abstract class BaseLoop
}
}
/**
* @param LoopResult $loopResult
*
* @return LoopResult
*/
abstract public function parseResults(LoopResult $loopResult);
/**

View File

@@ -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());
}

View File

@@ -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());
}

View File

@@ -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());
}

View File

@@ -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());
}

View File

@@ -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));
}

View File

@@ -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?',

View File

@@ -152,6 +152,10 @@ return array (
'Select Country' => '',
'Create' => '',
'Related' => '',
'Grid' => '',
'List' => '',
'Next' => '',
'Previous' => '',
/*
'The page cannot be found' => '',
'What\'s your name?' => '',

View File

@@ -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?' => '',

View File

@@ -152,6 +152,10 @@ return array (
'Select Country' => '',
'Create' => '',
'Related' => '',
'Grid' => '',
'List' => '',
'Next' => '',
'Previous' => '',
/*
'The page cannot be found' => '',
'What\'s your name?' => '',

View File

@@ -30,8 +30,8 @@
<span class="view-mode">
<span class="view-mode-label">{intl l="View as"}:</span>
<span class="view-mode-btn">
<a href="{url path="{navigate to="current"}" mode='grid'}" data-toggle="view" role="button" class="btn btn-grid"><i class="icon-grid"></i></a>
<a href="{url path="{navigate to="current"}" mode="list"}" data-toggle="view" role="button" class="btn btn-list "><i class="icon-list"></i></a>
<a href="{url path="{navigate to="current"}" mode="grid"}" data-toggle="view" role="button" title="{intl l="Grid"}" rel="nofollow" class="btn btn-grid"><i class="icon-grid"></i></a>
<a href="{url path="{navigate to="current"}" mode="list"}" data-toggle="view" role="button" title="{intl l="List"}" rel="nofollow" class="btn btn-list"><i class="icon-list"></i></a>
</span>
</span><!-- /.view-mode -->
@@ -42,9 +42,9 @@
<ul class="pagination">
{if $product_page > 1}
<li><a href="{url path={navigate to="current"} page={$product_page-1} }" class="prev"><i class="icon-prev"></i></a></li>
<li><a href="{url path={navigate to="current"} page={$product_page-1} }" title="{intl l="Previous"}" class="prev"><i class="icon-prev"></i></a></li>
{else}
<li><a href="#" class="prev"><i class="icon-prev"></i></a></li>
<li><a href="#" title="{intl l="Previous"}" class="prev"><i class="icon-prev"></i></a></li>
{/if}
{pageloop rel="product_list"}
{if $PAGE != $CURRENT}
@@ -54,9 +54,9 @@
{/if}
{if $PAGE == $LAST}
{if $CURRENT < $LAST}
<li><a href="{url path={navigate to="current"} page={$CURRENT+1} }" class="next"><i class="icon-next"></i></a></li>
<li><a href="{url path={navigate to="current"} page={$CURRENT+1} }" title="{intl l="Next"}" class="next"><i class="icon-next"></i></a></li>
{else}
<li><a href="#" class="next"><i class="icon-next"></i></a></li>
<li><a href="#" title="{intl l="Next"}" class="next"><i class="icon-next"></i></a></li>
{/if}
{/if}

View File

@@ -143,7 +143,7 @@
<button type="submit" class="btn btn-coupon">{intl l="Ok"}</button>
</span>
</div>
{if $error}<span class="help-block"><i class="icon-remove"></i> {$message}</span>{/if}
{if $error}<span class="help-block">{$message}</span>{/if}
</div>
{/form_field}
<!-- /input-group -->