Merge remote-tracking branch 'origin/master' into admin
Conflicts: core/lib/Thelia/Admin/Controller/BaseAdminController.php core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php core/lib/Thelia/Model/Admin.php core/lib/Thelia/Model/Customer.php
This commit is contained in:
138
templates/smarty-sample/connexion.html
Normal file
138
templates/smarty-sample/connexion.html
Normal file
@@ -0,0 +1,138 @@
|
||||
{include file="includes/header.html"}
|
||||
|
||||
{form name="thelia.customer.creation"}
|
||||
<form method="post" action="index_dev.php?action=createCustomer&view=connexion" {form_enctype form=$form} >
|
||||
|
||||
{form_field_hidden form=$form}
|
||||
|
||||
{form_field form=$form.title}
|
||||
{form_error form=$form.title}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label>
|
||||
<select name="{$name}">
|
||||
<option value="1">M.</option>
|
||||
<option value="2">Mme.</option>
|
||||
|
||||
</select>
|
||||
<br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.firstname}
|
||||
{form_error form=$form.firstname}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.lastname}
|
||||
{form_error form=$form.lastname}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.address1}
|
||||
{form_error form=$form.address1}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.address2}
|
||||
{form_error form=$form.address2}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.address3}
|
||||
{form_error form=$form.address3}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.zipcode}
|
||||
{form_error form=$form.zipcode}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.city}
|
||||
{form_error form=$form.city}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr} > <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.country}
|
||||
{form_error form=$form.country}
|
||||
{$message}
|
||||
{/form_error}
|
||||
|
||||
<label> <span>{intl l="{$label}"} : </span></label>
|
||||
<select name="{$name}">
|
||||
<option value="1">France</option>
|
||||
<option value="2">Belgium</option>
|
||||
|
||||
</select>
|
||||
<br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.phone}
|
||||
{form_error form=$form.phone}
|
||||
{$message}
|
||||
{/form_error}
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr}> <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.cellphone}
|
||||
{form_error form=$form.cellphone}
|
||||
{$message}
|
||||
{/form_error}
|
||||
<label> <span>{intl l="{$label}"} : </span></label><input type="text" name="{$name}" value="{$value}" {$attr}> <br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.email}
|
||||
{form_error form=$form.email}
|
||||
{#message}
|
||||
{/form_error}
|
||||
<label><span>{intl l="{$label}"}</span></label><input type="email" name="{$name}" value="{$value}" {$attr} ><br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.email_confirm}
|
||||
{form_error form=$form.email_confirm}
|
||||
{#message}
|
||||
{/form_error}
|
||||
<label><span>{intl l="{$label}"}</span></label><input type="email" name="{$name}" {$attr} ><br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.password}
|
||||
{form_error form=$form.password}
|
||||
{#message}
|
||||
{/form_error}
|
||||
<label><span>{intl l="{$label}"}</span></label><input type="password" name="{$name}" {$attr} ><br />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.password_confirm}
|
||||
{form_error form=$form.password_confirm}
|
||||
{#message}
|
||||
{/form_error}
|
||||
<label><span>{intl l="{$label}"}</span></label><input type="password" name="{$name}" {$attr} ><br />
|
||||
{/form_field}
|
||||
|
||||
<input type="submit" value="valider">
|
||||
</form>
|
||||
{/form}
|
||||
|
||||
{include file="includes/footer.html"}
|
||||
@@ -7,44 +7,32 @@ An image from asset directory :
|
||||
<div>
|
||||
{intl l='An internationalized string'}
|
||||
</div>
|
||||
{form name="thelia.customer.creation"}
|
||||
<form method="post" action="index_dev.php?action=createCustomer" {form_enctype form=$form} >
|
||||
|
||||
{form_field_hidden form=$form}
|
||||
{form_field form=$form.email}
|
||||
{intl l="{$label}"} : <input type="text" name="{$name}" {$attr} >
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form.name}
|
||||
{intl l='name'} : <input type="text" name="{$name}" >
|
||||
{/form_field}
|
||||
{form_field form=$form.age}
|
||||
{intl l='age'} : <input type="text" name="{$name}">
|
||||
{/form_field}
|
||||
<input type="submit" value="valider">
|
||||
</form>
|
||||
{/form}
|
||||
<div>
|
||||
jQuery data: <span id="jquery_block"></span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Category loop example</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloop1"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}, children: {$NB_CHILD}
|
||||
{ifloop rel="inner1"}
|
||||
<ul>
|
||||
{loop type="category" name="inner1" parent="{$ID}"}
|
||||
<li>Sub cat {$ID} (parent is {$PARENT}): {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
<p>Category loop example</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloop1"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}, children: {$NB_CHILD}
|
||||
{ifloop rel="inner1"}
|
||||
<ul>
|
||||
{loop type="category" name="inner1" parent="{$ID}"}
|
||||
<li>Sub cat {$ID} (parent is {$PARENT}): {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<p>Conditional example #1</p>
|
||||
|
||||
@@ -81,9 +69,7 @@ An image from asset directory :
|
||||
{elseloop rel="catloop2"}
|
||||
<p>... but catloop2 is still empty :-)</p>
|
||||
{/elseloop}
|
||||
{ifloop rel="catloop1"}
|
||||
<p>... and catloop1 is still NOT empty :-)</p>
|
||||
{/ifloop}
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -93,11 +79,63 @@ An image from asset directory :
|
||||
{/for}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<p>Loops also work with #</p>
|
||||
{loop type="category" name="catloop1"}
|
||||
#TITLE : {#DESCRIPTION|upper} #NOTATAG<br />
|
||||
{/loop}
|
||||
<p>Some pagination</p>
|
||||
<p>PAGE 1</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloopwithpagination1" limit="2" page="1"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
<p>PAGE 2</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloopwithpagination2" limit="2" page="2"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
<p>PAGE 1000</p>
|
||||
<ul>
|
||||
|
||||
{loop type="category" name="catloopwithpagination1000" limit="2" page="1000"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="catloopwithpagination1000"}
|
||||
NO RESULTS
|
||||
{/elseloop}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p>Some pagination with page choice</p>
|
||||
{assign var=current_page value=2}
|
||||
<p>PAGE {$current_page} :</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloopwithpaginationchoice" limit="2" page="{$current_page}"}
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
<p>page choice</p>
|
||||
{pageloop rel="catloopwithpaginationchoice"}
|
||||
{if ${PAGE} != {$current_page}}
|
||||
{if {$PAGE} > {$current_page}-10 AND {$PAGE} < {$current_page}+10}
|
||||
{$PAGE}
|
||||
{/if}
|
||||
{if {$PAGE} == {$current_page}-10 OR {$PAGE} == {$current_page}+10}
|
||||
...
|
||||
{/if}
|
||||
{if ({$PAGE} < {$current_page}-10 OR {$PAGE} > {$current_page}+10) AND ({$PAGE}%10 == 0 OR ${PAGE} == {$LAST} OR ${PAGE} == 1)}
|
||||
{$PAGE}
|
||||
{/if}
|
||||
{else}
|
||||
{ {$PAGE} }
|
||||
{/if}
|
||||
{if {$PAGE} != {$LAST}}
|
||||
-
|
||||
{/if}
|
||||
{/pageloop}
|
||||
</div>
|
||||
|
||||
{include file="includes/footer.html"}
|
||||
Reference in New Issue
Block a user