Merge branch 'master' into loops
Conflicts: core/lib/Thelia/Admin/Controller/BaseAdminController.php core/lib/Thelia/Core/Template/Loop/Category.php core/lib/Thelia/Model/Admin.php core/lib/Thelia/Model/Customer.php templates/smarty-sample/index.html
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>{$LOOP_COUNT}/{$LOOP_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>
|
||||
|
||||
@@ -52,7 +40,7 @@ An image from asset directory :
|
||||
Hey ! Loop catloop2 is not empty:
|
||||
<ul>
|
||||
{loop type="category" name="catloop2" parent="12"}
|
||||
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
@@ -69,7 +57,7 @@ An image from asset directory :
|
||||
Loop catloop3 is not empty:
|
||||
<ul>
|
||||
{loop type="category" name="catloop3" parent="0"}
|
||||
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/ifloop}
|
||||
@@ -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,32 +79,27 @@ 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}
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<p>Some pagination</p>
|
||||
<p>PAGE 1</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloopwithpagination1" limit="2" page="1"}
|
||||
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
<p>PAGE 2</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloopwithpagination2" limit="2" page="2"}
|
||||
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
<p>PAGE 1000</p>
|
||||
<ul>
|
||||
|
||||
{loop type="category" name="catloopwithpagination1000" limit="2" page="1000"}
|
||||
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
|
||||
{elseloop rel="catloopwithpagination1000"}
|
||||
@@ -133,7 +114,7 @@ An image from asset directory :
|
||||
<p>PAGE {$current_page} :</p>
|
||||
<ul>
|
||||
{loop type="category" name="catloopwithpaginationchoice" limit="2" page="{$current_page}"}
|
||||
<li>{$LOOP_COUNT}/{$LOOP_TOTAL} : {$ID} {$TITLE}</li>
|
||||
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
<p>page choice</p>
|
||||
|
||||
Reference in New Issue
Block a user