Merge branch 'master' of github.com:thelia/thelia

This commit is contained in:
Etienne Roudeix
2013-07-08 14:15:44 +02:00
2 changed files with 43 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ class BaseAdminController extends ContainerAware
catch (AuthenticationTokenNotFoundException $ex) {
// No auth token -> perform login
return new RedirectResponse($this->generateUrl('/admin/login'));
return new RedirectResponse($this->generateUrl('admin/login'));
}
return $data;
@@ -134,7 +134,7 @@ class BaseAdminController extends ContainerAware
*/
public function generateUrl($route, $parameters = array(), $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH)
{
return "$route";
return "thelia2/$route";
//return $this->container->get('router')->generate($route, $parameters, $referenceType);
}

View File

@@ -19,7 +19,7 @@
<ul>
{loop name="prod" type="product" category="#ID" page="{$product_current_page}" limit="2"}
<li>
#REF
#ID:#REF
</li>
{/loop}
</ul>
@@ -52,4 +52,43 @@
{if {$PAGE} != {$LAST}}
-
{/if}
{/pageloop}
{/pageloop}
<hr>
Pagination before loop
<hr>
{assign var=product_current_page value={$smarty.get.$this_product_getter|default:1}}
{capture name="prod2"}
{loop name="prod2" type="product" page="{$product_current_page}" limit="2"}
<li>
#ID:#REF
</li>
{/loop}
{/capture}
{pageloop rel="prod2"}
{if ${PAGE} != {$product_current_page}}
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}=#PAGE">#PAGE</a>
{else}
{ #PAGE }
{/if}
{if {$PAGE} != {$LAST}}
-
{/if}
{/pageloop}
{$smarty.capture.prod2}
{pageloop rel="prod2"}
{if ${PAGE} != {$product_current_page}}
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}=#PAGE">#PAGE</a>
{else}
{ #PAGE }
{/if}
{if {$PAGE} != {$LAST}}
-
{/if}
{/pageloop}