Merge branch 'master' of https://github.com/thelia/thelia into coupon

# By franck (6) and others
# Via franck (3) and others
* 'master' of https://github.com/thelia/thelia:
  Implemented "Remember Me" feature on admin. Started template management
  Added Templates events
  First version of installation wizard
  tax engine retriever
  allow address removal from front
  Insert pagination inside tfoot
  allow update customer address in front tempalte
  allow to create a new address
  allow to make an address as default on update action
  Finished attributes management
  Fixed action column alignment
  Fixed duplication parameter check regexp
  absoluteUrl prevetn duplicate parameters in generated URL
This commit is contained in:
gmorel
2013-09-16 10:01:34 +02:00
140 changed files with 18725 additions and 3379 deletions

View File

@@ -0,0 +1,15 @@
<div class="form-group">
{ifloop rel="free_attributes"}
<select name="free_attributes" id="free_attributes" class="form-control">
<option value="">Select an attribute...</option>
{loop name="free_attributes" type="attribute" template="$template_id" backend_context="1" lang="$edit_language_id"}
<option value="{$ID}">{$TITLE}</option>
{/loop}
</select>
<span class="help-block">{intl l='Select an attribute and click (+) to add it to this template'}</span>
{/ifloop}
{elseloop rel="free_attributes"}
<div class="alert alert-info">There is currently no available attributes.</div>
{/elseloop}
</div>

View File

@@ -4,7 +4,8 @@
<div class="span4 feed-list-item">
<h3>{$DATE}</h3>
<h2><a href="{$URL}" target="_blank" title="{intl l='Lire la suite'}">{$TITLE|strip_tags nofilter}</a></h2>
<p>{$DESCRIPTION|strip_tags|truncate:250:"...":true nofilter}</p>
{* we use unescape:"htmlall" to unescape var before truncate, to prevent a cut in the middel of an HTML entity, eg &ea... *}
<p>{$DESCRIPTION|strip_tags|unescape:"htmlall"|truncate:250:"...":true nofilter}</p>
<p><a class="btn" href="{$URL}" target="_blank">{intl l='Lire la suite »'}</a></p>
</div>
{/loop}

View File

@@ -1,3 +1,22 @@
tfoot{
.pagination{
margin: 0;
}
}
.table-condensed {
tfoot {
> tr {
> th,
> td {
padding: 20px 5px 5px;
}
}
}
}
.table-striped {
caption {
@@ -55,6 +74,13 @@
.table-left-aligned {
th, td {
text-align: left;
&.text-center {
text-align: center;
}
&.text-right {
text-align: right;
}
}
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {

View File

@@ -8,6 +8,7 @@
@import "modals.less";
@import "tables.less";
@import "tablesorter.less";
@import "wizard.less";
@import "bootstrap-editable.less";
@import "bootstrap-switch.less";

View File

@@ -0,0 +1,129 @@
.wizard {
background-color: #fff;
border: 1px solid #d4d4d4;
border-radius: 4px;
.box-shadow(0 1px 4px rgba(0, 0, 0, 0.065));
*zoom: 1;
margin-bottom: 20px;
&:before,
&:after {
display: table;
line-height: 0;
content: "";
clear: both;
}
ul {
padding: 0;
margin: 0;
list-style: none outside none;
}
li {
position: relative;
float: left;
height: 46px;
padding: 0 10px 0 30px;
margin: 0;
font-size: 15px;
line-height: 46px;
color: #999999;
cursor: default;
background: #ededed;
&.complete {
color: #468847;
background: #f3f4f5;
&:hover{
background: #e8e8e8;
.chevron:before {
border-left: 14px solid #e8e8e8;
}
}
a{
color: inherit;
text-decoration: none;
font-weight: normal;
}
.chevron:before {
border-left: 14px solid #f3f4f5;
}
}
&.active {
color: @link-color;
background: #fff;
.chevron:before {
border-left: 14px solid #fff;
}
}
.chevron {
position: absolute;
top: 0;
right: -14px;
display: block;
border: 24px solid transparent;
border-right: 0;
border-left: 14px solid #d4d4d4;
&:before {
position: absolute;
top: -24px;
right: 1px;
display: block;
border: 24px solid transparent;
border-right: 0;
border-left: 14px solid #ededed;
content: "";
}
}
.badge {
margin-right: 8px;
}
&:nth-child(1) {
z-index: 10;
padding-left: 20px;
border-radius: 4px 0 0 4px;
}
&:nth-child(2) {
z-index: 9;
}
&:nth-child(3) {
z-index: 8;
}
&:nth-child(4) {
z-index: 7;
}
&:nth-child(5) {
z-index: 6;
}
&:nth-child(6) {
z-index: 5;
}
&:nth-child(7) {
z-index: 4;
}
&:nth-child(8) {
z-index: 3;
}
&:nth-child(9) {
z-index: 2;
}
&:nth-child(10) {
z-index: 1;
}
}
}

View File

@@ -37,6 +37,10 @@
<p class="title title-without-tabs">{intl l='Attribute information'}</p>
{form_field form=$form field='id'}
<input type="hidden" name="{$name}" value="{$attribute_id}" />
{/form_field}
{* Be sure to get the attribute ID, even if the form could not be validated *}
<input type="hidden" name="attribute_id" value="{$attribute_id}" />
@@ -52,7 +56,7 @@
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{include file="includes/standard-description-form-fields.html"}
{include file="includes/standard-description-form-fields.html" form=$form}
</div>
<div class="col-md-6">
@@ -79,9 +83,10 @@
<tr>
<th>
{admin_sortable_header
current_order=$order
current_order=$attributeav_order
order='id'
reverse_order='id_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l='ID'}"
}
@@ -89,9 +94,10 @@
<th>
{admin_sortable_header
current_order=$order
current_order=$attributeav_order
order='alpha'
reverse_order='alpha_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l='Value'}"
}
@@ -99,9 +105,10 @@
<th class="text-center">
{admin_sortable_header
current_order=$order
current_order=$attributeav_order
order='manual'
reverse_order='manual_reverse'
request_parameter_name='attributeav_order'
path={url path='/admin/configuration/attributes/update' attribute_id=$attribute_id}
label="{intl l="Position"}"
}
@@ -114,12 +121,13 @@
</thead>
<tbody>
{loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$order}
{loop name="list" type="attribute_availability" attribute=$attribute_id backend_context="1" lang=$edit_language_id order=$attributeav_order}
<tr>
<td>{$ID}</td>
<td>
<input class="js-edit form-control" type="text" name="" value="{$TITLE}" />
{* FIXME : integrate this in the encolsing form to provide standard form processing *}
<input class="js-edit form-control" type="text" name="attribute_values[{$ID}]" value="{$TITLE}" />
</td>
<td class="text-center">
@@ -151,7 +159,7 @@
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product attribute has been created yet. Click the + button to create one."}
{intl l="No value has been created yet. Click the + button to create one."}
</div>
</td>
</tr>

View File

@@ -97,6 +97,17 @@
{module_include location='attributes_table_row'}
<td class="actions">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<div class="btn-group">
<a class="btn btn-default btn-xs attribute-remove-from-all" title="{intl l='Remove this attribute from all product templates'}" href="#remove_from_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-minus"></span>
</a>
<a class="btn btn-default btn-xs attribute-add-to-all" title="{intl l='Add this attribute to all product templates'}" href="#add_to_all_dialog" data-id="{$ID}" data-toggle="modal">
<span class="glyphicon glyphicon-plus"></span>
</a>
</div>
{/loop}
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.attributes.change"}
<a class="btn btn-default btn-xs attribute-change" title="{intl l='Change this product attribute'}" href="{url path='/admin/configuration/attributes/update' attribute_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
@@ -217,6 +228,47 @@
form_content = {$smarty.capture.delete_dialog nofilter}
}
{* Add to all dialog *}
{capture "add_to_all_dialog"}
<input type="hidden" name="attribute_id" id="attribute_add_to_all_id" value="" />
{module_include location='attribute_add_to_all_form'}
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "add_to_all_dialog"
dialog_title = {intl l="Add to all product templates"}
dialog_message = {intl l="Do you really want to add this attribute to all product templates ?"}
form_action = {url path='/admin/configuration/attributes/add-to-all-templates'}
form_content = {$smarty.capture.add_to_all_dialog nofilter}
}
{* Remove from all dialog *}
{capture "remove_from_all_dialog"}
<input type="hidden" name="attribute_id" id="attribute_remove_from_all_id" value="" />
{module_include location='attribute_add_to_all_form'}
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "remove_from_all_dialog"
dialog_title = {intl l="Remove from all product templates"}
dialog_message = {intl l="Do you really want to remove this attribute from all product templates ? You'll loose all product related data for this attribute."}
form_action = {url path='/admin/configuration/attributes/remove-from-all-templates'}
form_content = {$smarty.capture.remove_from_all_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
@@ -233,6 +285,14 @@
$('#attribute_delete_id').val($(this).data('id'));
});
$('a.attribute-add-to-all').click(function(ev) {
$('#attribute_add_to_all_id').val($(this).data('id'));
});
$('a.attribute-remove-from-all').click(function(ev) {
$('#attribute_remove_from_all_id').val($(this).data('id'));
});
// JS stuff for creation form
{include
file = "includes/generic-js-dialog.html"

View File

@@ -82,7 +82,7 @@
}
</th>
<th>{intl l='Actions'}</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>

View File

@@ -111,7 +111,7 @@
{module_include location='currencies_table_header'}
<th class="text-right">{intl l='Actions'}</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>

View File

@@ -11,9 +11,9 @@
<div class="customer">
<div id="wrapper" class="container">
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/customers'}">{intl l="Customers"}</a></li>
</ul>
@@ -58,7 +58,7 @@
<th>{intl l='order amount'}</th>
<th>{intl l='Actions'}</th>
<th class="actions">{intl l='Actions'}</th>
</tr>
</thead>
@@ -102,6 +102,39 @@
</tr>
{/loop}
</tbody>
<tfoot>
<tr>
<td colspan="6">
<div class="text-center">
<ul class="pagination pagination-centered">
{if $customer_page != 1}
<li><a href="{url path="/admin/customers" page="1"}">&laquo;</a></li>
{else}
<li class="disabled"><a href="#">&laquo;</a></li>
{/if}
{pageloop rel="customer_list"}
{if $PAGE != $CURRENT}
<li><a href="{url path="/admin/customers" page="{$PAGE}"}">{$PAGE}</a></li>
{else}
<li class="active"><a href="#">{$PAGE}</a></li>
{/if}
{/pageloop}
{if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/customers" page="$PAGE"}">&raquo;</a></li>
{else}
<li class="disabled"><a href="#">&raquo;</a></li>
{/if}
</ul>
</div>
</td>
</tr>
</tfoot>
{/ifloop}
</table>
</div>
@@ -110,35 +143,6 @@
{module_include location='customer_bottom'}
<div class="row">
<div class="col-md-12 text-center">
<ul class="pagination pagination-centered">
{if $customer_page != 1}
<li><a href="{url path="/admin/customers" page="1"}">&laquo;</a></li>
{else}
<li class="disabled"><a href="#">&laquo;</a></li>
{/if}
{pageloop rel="customer_list"}
{if $PAGE != $CURRENT}
<li><a href="{url path="/admin/customers" page="{$PAGE}"}">{$PAGE}</a></li>
{else}
<li class="active"><a href="#">{$PAGE}</a></li>
{/if}
{/pageloop}
{if $PAGE == $LAST && $LAST != $CURRENT}
<li><a href="{url path="/admin/customers" page="$PAGE"}">&raquo;</a></li>
{else}
<li class="disabled"><a href="#">&raquo;</a></li>
{/if}
</ul>
</div>
</div>
{* Adding a new Category *}
@@ -154,23 +158,23 @@
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/customer/update/_ID_'}" />
{/form_field}
{form_field form=$form field='company'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Company'}">
</div>
{/form_field}
{form_field form=$form field='title'}
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<select name="{$name}" id="{$label_attr.for}" class="form-control">
{loop type="title" name="title1"}
<option value="{$ID}">{$LONG}</option>
{/loop}
</select>
</select>
</div>
{/form_field}
@@ -191,13 +195,13 @@
{form_field form=$form field='address1'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
</div>
<div class="form-group">
{form_field form=$form field='address2'}
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
{/form_field}
{/form_field}
</div>
<div class="form-group">
@@ -237,8 +241,8 @@
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Email address'}">
</div>
{/form_field}
{/form_field}
{/capture}
{include

View File

@@ -12,7 +12,7 @@
<ul class="nav nav-pills">
{loop name="lang_list" type="lang" default_only={$default_only}}
<li {if $ID == $edit_language_id}class="active"{/if}>
<a href="{$current_url nofilter}&amp;edit_language_id={$ID}" title="{intl l="Edit information in %lng" lng=$TITLE}">
<a href="{url path=$current_url edit_language_id=$ID}" title="{intl l="Edit information in %lng" lng=$TITLE}">
<img src="{image file="../assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
</a>
</li>

View File

@@ -3,7 +3,7 @@
{form_field form=$form field='title'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Title'}" placeholder="{intl l='Title'}" class="form-control" value="{$value|htmlspecialchars}">
<input type="text" id="{$label_attr.for}" name="{$name}" required="required" title="{intl l='Title'}" placeholder="{intl l='Title'}" class="form-control" value="{$value}">
</div>
{/form_field}
@@ -14,7 +14,7 @@
<span class="label-help-block">{intl l="A short description, used when a summary or an introduction is required"}</span>
</label>
<textarea name="{$name}" id="{$label_attr.for}" rows="3" title="{intl l='Short description'}" placeholder="{intl l='Short description'}" class="form-control">{$value|htmlspecialchars}</textarea>
<textarea name="{$name}" id="{$label_attr.for}" rows="3" title="{intl l='Short description'}" placeholder="{intl l='Short description'}" class="form-control">{$value}</textarea>
</div>
{/form_field}
@@ -25,7 +25,7 @@
<span class="label-help-block">{intl l="The détailed description."}</span>
</label>
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control">{$value|htmlspecialchars}</textarea>
<textarea name="{$name}" id="{$label_attr.for}" rows="10" class="form-control">{$value}</textarea>
</div>
{/form_field}
@@ -36,6 +36,6 @@
<span class="label-help-block">{intl l="A short post-description information"}</span>
</label>
<textarea name="{$name}" id="{$label_attr.for}" rows="3" title="{intl l='Short conclusion'}" placeholder="{intl l='Short conclusion'}" class="form-control">{$value|htmlspecialchars}</textarea>
<textarea name="{$name}" id="{$label_attr.for}" rows="3" title="{intl l='Short conclusion'}" placeholder="{intl l='Short conclusion'}" class="form-control">{$value}</textarea>
</div>
{/form_field}

View File

@@ -64,7 +64,7 @@
{block name="javascript-initialization"}
<script>
$(function () {
$(".feed-list").load("{admin_viewurl view='includes/thelia_news_feed'}");
$(".feed-list").load("{admin_viewurl view='ajax/thelia_news_feed'}");
})
</script>
{/block}

View File

@@ -17,7 +17,7 @@
{module_include location='orders_top'}
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<div class="general-block-decorator">
<table class="table table-striped table-condensed table-left-aligned">
<caption class="clearfix">
@@ -36,14 +36,14 @@
<th>{intl l="Name"}</th>
<th>{intl l="Amount"}</th>
<th>{intl l="Status"}</th>
{module_include location='orders_table_header'}
<th>{intl l="Actions"}</th>
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td><a href="">01230450123045</a></td>
@@ -116,7 +116,7 @@
</div>
</td>
</tr>
<!-- <tr>
<td colspan="3">
<div class="alert alert-info">
@@ -124,10 +124,10 @@
</div>
</td>
</tr> -->
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,115 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Edit a template'}{/block}
{block name="check-permissions"}admin.configuration.templates.edit{/block}
{block name="main-content"}
<div class="templates edit-template">
<div id="wrapper" class="container">
{loop name="template_edit" type="template" id="$template_id" backend_context="1" lang="$edit_language_id"}
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/templates'}">{intl l="Templates"}</a></li>
<li>{intl l='Editing template "%name"' name="{$NAME}"}</li>
</ul>
<div class="row">
<div class="col-md-12 general-block-decorator">
<div class="row">
<div class="col-md-12 title title-without-tabs">
{intl l="Edit template $NAME"}
</div>
<div class="form-container">
<div class="col-md-12">
{form name="thelia.admin.template.modification"}
<form method="POST" action="{url path='/admin/configuration/templates/save'}" {form_enctype form=$form} class="clearfix">
{* Be sure to get the template ID, even if the form could not be validated *}
<input type="hidden" name="template_id" value="{$template_id}" />
{include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/configuration/templates'}"}
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/templates'}" />
{/form_field}
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$edit_language_locale}" />
{/form_field}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" value="{$value}" title="{intl l='Template name'}" placeholder="{intl l='Template name'}" class="form-control">
</div>
{/form_field}
</form>
{/form}
</div>
</div>
<div class="col-md-12">
<div class="form-container">
<div class="col-md-6">
<p class="title title-without-tabs">{intl l='Attributes'}</p>
<p>Manage attributes included in this product templates</p>
<div id="attribute_list_management">
<div class="loading"></div>
</div>
</div>
<div class="col-md-6">
<p class="title title-without-tabs">{intl l='Features'}</p>
<p>Manage features included in this product templates</p>
<div id="feature_list_management">
<div class="loading"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{/loop}
{elseloop rel="template_edit"}
<div class="row">
<div class="col-md-12">
<div class="alert alert-error">
{intl l="Sorry, template ID=$template_id was not found."}
</div>
</div>
</div>
{/elseloop}
</div>
</div>
{/block}
{block name="javascript-initialization"}
<script>
$(function() {
$('#attribute_list_management').load("{admin_viewurl view='ajax/template-attribute-list' template_id=$template_id}");
$('#feature_list_management').load("{admin_viewurl view='ajax/template-feature-list' template_id=$template_id}");
});
</script>
{/block}

View File

@@ -0,0 +1,215 @@
{extends file="admin-layout.tpl"}
{block name="page-title"}{intl l='Thelia Product Templates'}{/block}
{block name="check-permissions"}admin.configuration.templates.view{/block}
{block name="main-content"}
<div class="templates">
<div id="wrapper" class="container">
<ul class="breadcrumb">
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
<li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
<li><a href="{url path='/admin/configuration/templates'}">{intl l="Product templates"}</a></li>
</ul>
{module_include location='templates_top'}
<div class="row">
<div class="col-md-12">
<form action="#" method="post">
<div class="general-block-decorator">
{if ! empty($general_error) }
<div class="alert alert-danger">{$general_error}</div>
{/if}
<table class="table table-striped table-condensed table-left-aligned">
<caption>
{intl l='Thelia product templates'}
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.templates.create"}
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new product template'}" href="#creation_dialog" data-toggle="modal">
<span class="glyphicon glyphicon-plus-sign"></span>
</a>
{/loop}
</caption>
<thead>
<tr>
<th>
{admin_sortable_header
current_order=$order
order='id'
reverse_order='id_reverse'
path='/admin/configuration/templates'
label="{intl l='ID'}"
}
</th>
<th>
{admin_sortable_header
current_order=$order
order='alpha'
reverse_order='alpha_reverse'
path='/admin/configuration/templates'
label="{intl l='Title'}"
}
</th>
{module_include location='templates_table_header'}
<th class="actions">{intl l="Actions"}</th>
</tr>
</thead>
<tbody>
{loop name="list" type="template" backend_context="1" lang=$lang_id order=$order}
<tr>
<td>{$ID}</td>
<td>
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a title="{intl l='Change this template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}">{$NAME}</a>
{/loop}
{elseloop rel="can_change"}
{$NAME}
{/elseloop}
</td>
{module_include location='templates_table_row'}
<td class="actions">
<div class="btn-group">
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.change"}
<a class="btn btn-default btn-xs template-change" title="{intl l='Change this product template'}" href="{url path='/admin/configuration/templates/update' template_id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
{/loop}
{loop type="auth" name="can_change" roles="ADMIN" permissions="admin.configuration.templates.delete"}
<a class="btn btn-default btn-xs template-delete" title="{intl l='Delete this product template'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
{/loop}
</div>
</td>
</tr>
{/loop}
{elseloop rel="list"}
<tr>
<td colspan="4">
<div class="alert alert-info">
{intl l="No product template has been created yet. Click the + button to create one."}
</div>
</td>
</tr>
{/elseloop}
</tbody>
</table>
</div>
</form>
</div>
</div>
{module_include location='templates_bottom'}
</div>
</div>
{* Adding a new template *}
{form name="thelia.admin.template.creation"}
{* Capture the dialog body, to pass it to the generic dialog *}
{capture "creation_dialog"}
{form_hidden_fields form=$form}
{form_field form=$form field='success_url'}
{* on success, redirect to the edition page, _ID_ is replaced with the created template ID, see controller *}
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/templates/update' template_id='_ID_'}" />
{/form_field}
{form_field form=$form field='name'}
<div class="form-group {if $error}has-error{/if}">
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
{loop type="lang" name="default-lang" default_only="1"}
<div class="input-group">
<input type="text" id="{$label_attr.for}" required="required" name="{$name}" class="form-control" value="{$value}" title="{intl l='Template title'}" placeholder="{intl l='Title'}">
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" /></span>
</div>
<div class="help-block">{intl l="Enter here the template name in the default language ($TITLE)"}</div>
{* Switch edition to the current locale *}
<input type="hidden" name="edit_language_id" value="{$ID}" />
{form_field form=$form field='locale'}
<input type="hidden" name="{$name}" value="{$LOCALE}" />
{/form_field}
{/loop}
</div>
{/form_field}
{module_include location='template_create_form'}
{/capture}
{include
file = "includes/generic-create-dialog.html"
dialog_id = "creation_dialog"
dialog_title = {intl l="Create a new product template"}
dialog_body = {$smarty.capture.creation_dialog nofilter}
dialog_ok_label = {intl l="Create this product template"}
form_action = {url path='/admin/configuration/templates/create'}
form_enctype = {form_enctype form=$form}
form_error_message = $form_error_message
}
{/form}
{* Delete confirmation dialog *}
{capture "delete_dialog"}
<input type="hidden" name="template_id" id="template_delete_id" value="" />
{module_include location='template_delete_form'}
{/capture}
{include
file = "includes/generic-confirm-dialog.html"
dialog_id = "delete_dialog"
dialog_title = {intl l="Delete template"}
dialog_message = {intl l="Do you really want to delete this template ? It will be removed from all products."}
form_action = {url path='/admin/configuration/templates/delete'}
form_content = {$smarty.capture.delete_dialog nofilter}
}
{/block}
{block name="javascript-initialization"}
{javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'}
<script src="{$asset_url}"></script>
{/javascripts}
<script>
$(function() {
// Set proper template ID in delete from
$('a.template-delete').click(function(ev) {
$('#template_delete_id').val($(this).data('id'));
});
// JS stuff for creation form
{include
file = "includes/generic-js-dialog.html"
dialog_id = "creation_dialog"
form_name = "thelia.admin.template.creation"
}
});
</script>
{/block}

View File

@@ -1,3 +1,4 @@
{check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{extends file="layout.tpl"}
{block name="breadcrumb"}
@@ -74,11 +75,11 @@
</div>
<div id="account-address" class="panel-collapse collapse">
<div class="panel-body">
<a href="address.php" class="btn btn-add-address">{intl l="Add a new address"}</a>
<a href="{url path="/address/create"}" class="btn btn-add-address">{intl l="Add a new address"}</a>
<table class="table table-address" role="presentation" summary="{intl l="My Address Books"}">
<tbody>
{loop type="address" name="customer.addresses"}
<tr class="{if $DEFAULT == 1}address-primary{else}address-additional{/if}">
{loop type="address" name="customer.addresses" customer="current"}
<tr class="{if $DEFAULT == 1}address-primary{else}address-additional{/if}" id="customer-address-{$ID}">
<th>{$LABEL}</th>
<td>
<ul class="list-address">
@@ -113,9 +114,9 @@
</td>
<td>
<div class="group-btn">
<a href="{url path="/address/edit/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="Edit this address"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
<a href="{url path="/address/update/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="Edit this address"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
{if $DEFAULT != 1}
<a href="#" class="btn btn-remove-address" data-toggle="tooltip" title="Remove this address"><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
<a href="{url path="/address/delete/{$ID}"}" class="btn btn-remove-address remove-address" title="{intl l="Remove this address"}" data-toggle="tooltip"><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
{/if}
</div>
</td>
@@ -172,4 +173,37 @@
</div><!-- /.layout -->
<div class="modal fade" id="address-delete-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>{intl l="Delete address"}</h3>
</div>
<div class="modal-body">
{intl l="Do you really want to delete this address ?"}
</div>
<div class="modal-footer">
<a href="#" type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove"></span> {intl l="No"}</a>
<a href="#" id="address-delete-link" type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span> {intl l="Yes"}</a>
</div>
</div>
</div>
</div>
{/block}
{block name="after-javascript-include"}
<script type="text/javascript">
$(document).ready(function(){
$(".remove-address").click(function(e){
e.preventDefault();
$("#address-delete-link").attr("href", $(this).attr("href"));
$('#address-delete-modal').modal('show');
})
})
</script>
{/block}

View File

@@ -0,0 +1,250 @@
{check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{extends file="layout.tpl"}
{block name="breadcrumb"}
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
<strong id="breadcrumb-label">{intl l="You are here"}: </strong>
<ul class="breadcrumb" itemprop="breadcrumb">
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="index.php" itemprop="url"><span itemprop="title">{intl l="Home"}</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title">{intl l="Account"}</span></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Address"}</span></li>
</ul>
</nav><!-- /.nav-breadcrumb -->
{/block}
{block name="main-content"}
<div class="main">
<article class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">{intl l="Create New Address"}</h1>
{form name="thelia.address.update"}
{loop name="customer.update" type="address" customer="current" id="{$address_id}"}
<form id="form-address" class="form-horizontal" action="{url path="/address/update/{$address_id}"}" method="post" role="form">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/customer/account"}" /> {* the url the user is redirected to on login success *}
{/form_field}
{form_field form=$form field='error_message'}
<input type="hidden" name="{$name}" value="{intl l="missing or invalid data"}" /> {* the url the user is redirected to on login success *}
{/form_field}
{form_hidden_fields form=$form}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
<fieldset class="panel">
<div class="panel-heading">
{intl l="Address"}
</div>
<div class="panel-body">
{form_field form=$form field="label"}
<div class="form-group group-label {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$LABEL}}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="Home address"}" autofocus>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="title"}
{assign var="customer_title_id" value="{$value|default:$TITLE}"}
<div class="form-group group-title {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required autofocus>
<option value="">-- {intl l="Select Title"} --</option>
{loop type="title" name="title.list"}
<option value="{$ID}" {if $customer_title_id == $ID}selected{/if} >{$LONG}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="firstname"}
<div class="form-group group-firstname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$FIRSTNAME}}" id="{$label_attr.for}" class="form-control" placeholder="John" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
<!--/.form-group-->
{form_field form=$form field="lastname"}
<div class="form-group group-lastname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$LASTNAME}}" id="{$label_attr.for}" class="form-control" placeholder="Doe" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="address1"}
<div class="form-group group-address1 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$ADDRESS1}}" id="{$label_attr.for}" class="form-control" placeholder="Street address" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="address2"}
<div class="form-group group-address2 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$ADDRESS2}}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="Complementary address"}">
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="zipcode"}
<div class="form-group group-zipcode {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$ZIPCODE}}" id="{$label_attr.for}" class="form-control" placeholder="H2T 2V6" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="city"}
<div class="form-group group-city {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$CITY}}" id="{$label_attr.for}" class="form-control" placeholder="New York" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="country"}
{assign var="customer_country_id" value="{$value|default:$COUNTRY}"}
<div class="form-group group-country {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
<option value="">-- {intl l="Select Country"} --</option>
{loop type="country" name="country.list"}
<option value="{$ID}" {if $customer_country_id == $ID}selected{/if} >{$TITLE}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="phone"}
<div class="form-group group-phone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$PHONE}}" id="{$label_attr.for}" class="form-control" placeholder="">
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="cellphone"}
<div class="form-group group-cellphone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$CELLPHONE}}" id="{$label_attr.for}" class="form-control" placeholder="">
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
</div>
</fieldset>
{form_field form=$form field="is_default"}
<div class="form-group group-primary">
<div class="control-input">
<div class="checkbox">
<label class="control-label" for="{$label_attr.for}">
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="1" {if $DEFAULT}checked{/if}> {$label}
</label>
</div>
</div>
</div>
<!--/.form-group-->
{/form_field}
<div class="form-group group-btn">
<div class="control-btn">
<button type="submit" class="btn btn-submit">{intl l="Create"}</button>
</div>
</div>
<!--/.form-group-->
</form>
{/loop}
{/form}
</article>
</div><!-- /.layout -->
{/block}

View File

@@ -0,0 +1,247 @@
{check_auth context="front" roles="CUSTOMER" login_tpl="login"}
{extends file="layout.tpl"}
{block name="breadcrumb"}
<nav class="nav-breadcrumb" role="navigation" aria-labelledby="breadcrumb-label">
<strong id="breadcrumb-label">You are here: </strong>
<ul class="breadcrumb" itemprop="breadcrumb">
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="index.php" itemprop="url"><span itemprop="title">Home</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb"><a href="index.php" itemprop="url"><span itemprop="title">Account</span></a></li>
<li itemscope itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title">{intl l="Address"}</span></li>
</ul>
</nav><!-- /.nav-breadcrumb -->
{/block}
{block name="main-content"}
<div class="main">
<article class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">{intl l="Create New Address"}</h1>
{form name="thelia.address.create"}
<form id="form-address" class="form-horizontal" action="{url path="/address/create"}" method="post" role="form">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/customer/account"}" /> {* the url the user is redirected to on login success *}
{/form_field}
{form_field form=$form field='error_message'}
<input type="hidden" name="{$name}" value="{intl l="missing or invalid data"}" /> {* the url the user is redirected to on login success *}
{/form_field}
{form_hidden_fields form=$form}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
<fieldset class="panel">
<div class="panel-heading">
{intl l="Address"}
</div>
<div class="panel-body">
{form_field form=$form field="label"}
<div class="form-group group-label {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="Home address"}" autofocus>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="title"}
<div class="form-group group-title {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required autofocus>
<option value="">-- {intl l="Select Title"} --</option>
{loop type="title" name="title.list"}
<option value="{$ID}" {if $value == $ID}selected{/if} >{$LONG}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="firstname"}
<div class="form-group group-firstname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="John" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
<!--/.form-group-->
{form_field form=$form field="lastname"}
<div class="form-group group-lastname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="Doe" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="address1"}
<div class="form-group group-address1 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="Street address" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="address2"}
<div class="form-group group-address2 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="Complementary address"}">
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="zipcode"}
<div class="form-group group-zipcode {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="H2T 2V6" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="city"}
<div class="form-group group-city {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="New York" required>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="country"}
<div class="form-group group-country {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
<option value="">-- {intl l="Select Country"} --</option>
{loop type="country" name="country.list"}
<option value="{$ID}" {if $value == $ID}selected{/if} >{$TITLE}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="phone"}
<div class="form-group group-phone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="">
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
{form_field form=$form field="cellphone"}
<div class="form-group group-cellphone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="">
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div>
<!--/.form-group-->
{/form_field}
</div>
</fieldset>
{form_field form=$form field="is_default"}
<div class="form-group group-primary">
<div class="control-input">
<div class="checkbox">
<label class="control-label" for="{$label_attr.for}">
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="1"> {$label}
</label>
</div>
</div>
</div>
<!--/.form-group-->
{/form_field}
<div class="form-group group-btn">
<div class="control-btn">
<button type="submit" class="btn btn-submit">{intl l="Create"}</button>
</div>
</div>
<!--/.form-group-->
</form>
{/form}
</article>
</div><!-- /.layout -->
{/block}

View File

@@ -96,7 +96,7 @@
<div class="form-group group-phone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="John" value="{$value}" autofocus>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="" value="{$value}" autofocus>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
@@ -109,7 +109,7 @@
<div class="form-group group-cellphone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="John" value="{$value}" autofocus>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="" value="{$value}" autofocus>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}

View File

@@ -1,12 +1,46 @@
{extends file="layout.html"}
{block name="content"}
<h1>{intl l="Thelia installation wizard"}</h1>
<br />
{extends file="layout.tpl"}
{intl l="Bienvenue au sein du programme d'installation de Thelia."}<br />
{intl l="Nous allons vous guider tout au long de ce processus afin d'installer l'application sur votre système."}<br /><br />
{block name="page-title"}{intl l='Installation'}{/block}
<form action="{url path="/install/step/2" }" method="post">
<input type="submit" value="Continuer" />
</form>
{block name="main-content"}
<div class="install">
<div id="wrapper" class="container">
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<h3 class="title title-without-tabs">{intl l="Thelia installation wizard"}</h3>
<div class="wizard">
<ul>
<li class="active"><span class="badge">1</span>{intl l="Welcome"}<span class="chevron"></span></li>
<li><span class="badge">2</span>{intl l="Checking permissions"}<span class="chevron"></span></li>
<li><span class="badge">3</span>{intl l="Database connection"}<span class="chevron"></span></li>
<li><span class="badge">4</span>{intl l="Database selection"}<span class="chevron"></span></li>
<li><span class="badge">5</span>{intl l="General information"}<span class="chevron"></span></li>
<li><span class="badge">6</span>{intl l="Thanks"}<span class="chevron"></span></li>
</ul>
</div>
<div class="well">
<p class="lead text-center">
{intl l="Welcome in the Thelia installation wizard."}
</p>
<p class="text-center">
{intl l="We will guide you throughout this process to install any application on your system."}
</p>
</div>
<div class="clearfix">
<a href="install/step/2" class="pull-right btn btn-default btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> {intl l="Continue"}</a>
</div>
</div>
</div>
</div>
</div>
</div>
{/block}

View File

@@ -1,49 +0,0 @@
<!DOCTYPE html>
<html lang="{$lang_code}">
<head>
<title>{block name="title"}Thelia Install{/block}</title>
{images file='../admin/default/assets/img/favicon.ico'}<link rel="shortcut icon" href="{$asset_url}" />{/images}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{stylesheets file='../admin/default/assets/bootstrap/css/bootstrap.css' filters='cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
{stylesheets file='../admin/default/assets/bootstrap/css/bootstrap-responsive.css' filters='cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
{stylesheets file='../admin/default/assets/css/*' filters='less,cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
</head>
<body>
<div class="topbar">
<div class="container">
<div class="version-info">{intl l='Version %ver' ver="{$THELIA_VERSION}"}</div>
</div>
</div>
<div id="wrapper" class="container">
{block name="content"}{/block}
</div>
<hr />
<footer class="footer">
<div class="container">
<p>{intl l='&copy; Thelia 2013'}
- <a href="http://www.openstudio.fr/" target="_blank">{intl l='Édité par OpenStudio'}</a>
- <a href="http://forum.thelia.net/" target="_blank">{intl l='Forum Thelia'}</a>
- <a href="http://contrib.thelia.net/" target="_blank">{intl l='Contributions Thelia'}</a>
<span class="pull-right">{intl l='interface par <a target="_blank" href="http://www.steaw-webdesign.com/">Steaw-Webdesign</a>'}</span>
</p>
</div>
</footer>
</body>
</html>

View File

@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="{$lang_code}">
<head>
<title>{block name="page-title"}Thelia Install{/block}</title>
{images file='../admin/default/assets/img/favicon.ico'}<link rel="shortcut icon" href="{$asset_url}" />{/images}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{stylesheets file='../admin/default/assets/less/*' filters='less,cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
</head>
<body>
<div class="topbar">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="version-info">{intl l='Version %ver' ver="{$THELIA_VERSION}"}</div>
</div>
</div>
</div>
</div>
{* -- Main page content section ----------------------------------------- *}
{block name="main-content"}Put here the content of the template{/block}
{* -- Footer section ---------------------------------------------------- *}
<hr />
<footer class="footer">
<div class="container">
<p>{intl l='&copy; Thelia 2013'}
- <a href="http://www.openstudio.fr/" target="_blank">{intl l='Édité par OpenStudio'}</a>
- <a href="http://forum.thelia.net/" target="_blank">{intl l='Forum Thelia'}</a>
- <a href="http://contrib.thelia.net/" target="_blank">{intl l='Contributions Thelia'}</a>
<span class="pull-right">{intl l='interface par <a target="_blank" href="http://www.steaw-webdesign.com/">Steaw-Webdesign</a>'}</span>
</p>
{module_include location='in_footer'}
</div>
</footer>
{* -- Javascript section ------------------------------------------------ *}
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
{block name="after-javascript-include"}{/block}
{javascripts file='../admin/default/assets/js/bootstrap/bootstrap.js'}
<script src="{$asset_url}"></script>
{/javascripts}
{block name="javascript-initialization"}{/block}
</body>
</html>

View File

@@ -0,0 +1,51 @@
{extends file="layout.tpl"}
{block name="page-title"}{intl l='Installation step 2'}{/block}
{block name="main-content"}
<div class="install">
<div id="wrapper" class="container">
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<h3 class="title title-without-tabs">{intl l="Thelia installation wizard"}</h3>
<div class="wizard">
<ul>
<li class="complete"><a href="#"><span class="badge">1</span>{intl l="Welcome"}<span class="chevron"></span></a></li>
<li class="active"><span class="badge">2</span>{intl l="Checking permissions"}<span class="chevron"></span></li>
<li><span class="badge">3</span>{intl l="Database connection"}<span class="chevron"></span></li>
<li><span class="badge">4</span>{intl l="Database selection"}<span class="chevron"></span></li>
<li><span class="badge">5</span>{intl l="General information"}<span class="chevron"></span></li>
<li><span class="badge">6</span>{intl l="Thanks"}<span class="chevron"></span></li>
</ul>
</div>
<div class="well">
<p>We will check some rights to files and directories...</p>
<ul class="list-unstyled list-group">
<li class="list-group-item text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</li>
<li class="list-group-item text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</li>
<li class="list-group-item text-danger">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</li>
<li class="list-group-item text-danger">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</li>
<li class="list-group-item text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</li>
<li class="list-group-item text-danger">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</li>
<li class="list-group-item text-success">Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</li>
</ul>
</div>
<div class="clearfix">
<a href="install" class="pull-left btn btn-default"><span class="glyphicon glyphicon-chevron-left"></span> {intl l="Return"}</a>
<a href="install/step/3" class="pull-right btn btn-default btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> {intl l="Continue"}</a>
</div>
</div>
</div>
</div>
</div>
</div>
{/block}

View File

@@ -0,0 +1,56 @@
{extends file="layout.tpl"}
{block name="page-title"}{intl l='Installation step 3'}{/block}
{block name="main-content"}
<div class="install">
<div id="wrapper" class="container">
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<h3 class="title title-without-tabs">{intl l="Thelia installation wizard"}</h3>
<div class="wizard">
<ul>
<li class="complete"><a href="#"><span class="badge">1</span>{intl l="Welcome"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">2</span>{intl l="Checking permissions"}<span class="chevron"></span></a></li>
<li class="active"><span class="badge">3</span>{intl l="Database connection"}<span class="chevron"></span></li>
<li><span class="badge">4</span>{intl l="Database selection"}<span class="chevron"></span></li>
<li><span class="badge">5</span>{intl l="General information"}<span class="chevron"></span></li>
<li><span class="badge">6</span>{intl l="Thanks"}<span class="chevron"></span></li>
</ul>
</div>
<div class="well">
<form action="">
<div class="form-group">
<label for="">{intl l="Host"} :</label>
<input id="" type="text" class="form-control">
</div>
<div class="form-group">
<label for="">{intl l="Login"} :</label>
<input id="" type="text" class="form-control">
</div>
<div class="form-group">
<label for="">{intl l="Password"} :</label>
<input id="" type="password" class="form-control">
</div>
</form>
</div>
<div class="clearfix">
<a href="install/step/2" class="pull-left btn btn-default"><span class="glyphicon glyphicon-chevron-left"></span> {intl l="Return"}</a>
<a href="install/step/4" class="pull-right btn btn-default btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> {intl l="Continue"}</a>
</div>
</div>
</div>
</div>
</div>
</div>
{/block}

View File

@@ -0,0 +1,77 @@
{extends file="layout.tpl"}
{block name="page-title"}{intl l='Installation step 4'}{/block}
{block name="main-content"}
<div class="install">
<div id="wrapper" class="container">
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<h3 class="title title-without-tabs">{intl l="Thelia installation wizard"}</h3>
<div class="wizard">
<ul>
<li class="complete"><a href="#"><span class="badge">1</span>{intl l="Welcome"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">2</span>{intl l="Checking permissions"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">3</span>{intl l="Database connection"}<span class="chevron"></span></a></li>
<li class="active"><span class="badge">4</span>{intl l="Database selection"}<span class="chevron"></span></li>
<li><span class="badge">5</span>{intl l="General information"}<span class="chevron"></span></li>
<li><span class="badge">6</span>{intl l="Thanks"}<span class="chevron"></span></li>
</ul>
</div>
<div class="well">
<form action="">
<fieldset>
<legend>{intl l="Choose your database"}</legend>
<p>
The SQL server contains multiple databases.<br/>
Select below the one you want to use.
</p>
<div class="radio">
<label>
<input type="radio" name="" id="" value="">
Database 1
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="" id="" value="">
Database 2
</label>
</div>
<p>
{intl l="or"}
</p>
<div class="radio">
<label>
<input type="radio" name="" id="" value="" checked>
Create an other database
</label>
</div>
<div class="form-group">
<input type="text" class="form-control">
</div>
</fieldset>
</form>
</div>
<div class="clearfix">
<a href="install/step/2" class="pull-left btn btn-default"><span class="glyphicon glyphicon-chevron-left"></span> {intl l="Return"}</a>
<a href="install/step/4" class="pull-right btn btn-default btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> {intl l="Continue"}</a>
</div>
</div>
</div>
</div>
</div>
</div>
{/block}

View File

@@ -0,0 +1,72 @@
{extends file="layout.tpl"}
{block name="page-title"}{intl l='Installation step 4'}{/block}
{block name="main-content"}
<div class="install">
<div id="wrapper" class="container">
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<h3 class="title title-without-tabs">{intl l="Thelia installation wizard"}</h3>
<div class="wizard">
<ul>
<li class="complete"><a href="#"><span class="badge">1</span>{intl l="Welcome"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">2</span>{intl l="Checking permissions"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">3</span>{intl l="Database connection"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">4</span>{intl l="Database selection"}<span class="chevron"></span></a></li>
<li class="active"><span class="badge">5</span>{intl l="General information"}<span class="chevron"></span></li>
<li><span class="badge">6</span>{intl l="Thanks"}<span class="chevron"></span></li>
</ul>
</div>
<div class="well">
<form action="">
<p>
The system will now you create a custom site access.
</p>
<div class="form-group">
<label for="">{intl l="Login"} :</label>
<input id="" type="text" class="form-control">
</div>
<div class="form-group">
<label for="">{intl l="Password"} :</label>
<input id="" type="password" class="form-control">
</div>
<div class="form-group">
<label for="">{intl l="Password confirmation"} :</label>
<input id="" type="password" class="form-control">
</div>
<div class="form-group">
<label for="">{intl l="Email address"} :</label>
<input id="" type="email" class="form-control">
</div>
<div class="form-group">
<label for="">{intl l="Email address confirmation"} :</label>
<input id="" type="email" class="form-control">
</div>
</form>
</div>
<div class="clearfix">
<a href="install/step/2" class="pull-left btn btn-default"><span class="glyphicon glyphicon-chevron-left"></span> {intl l="Return"}</a>
<a href="install/step/4" class="pull-right btn btn-default btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> {intl l="Continue"}</a>
</div>
</div>
</div>
</div>
</div>
</div>
{/block}

View File

@@ -0,0 +1,42 @@
{extends file="layout.tpl"}
{block name="page-title"}{intl l='Thanks'}{/block}
{block name="main-content"}
<div class="install">
<div id="wrapper" class="container">
<div class="row">
<div class="col-md-12">
<div class="general-block-decorator">
<h3 class="title title-without-tabs">{intl l="Thelia installation wizard"}</h3>
<div class="wizard">
<ul>
<li class="complete"><a href="#"><span class="badge">1</span>{intl l="Welcome"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">2</span>{intl l="Checking permissions"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">3</span>{intl l="Database connection"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">4</span>{intl l="Database selection"}<span class="chevron"></span></a></li>
<li class="complete"><a href="#"><span class="badge">5</span>{intl l="General information"}<span class="chevron"></span></a></li>
<li class="active"><span class="badge">6</span>{intl l="Thanks"}<span class="chevron"></span></li>
</ul>
</div>
<div class="well">
<p class="lead text-center">
{intl l="Thank you have installed Thelia"}.
</p>
<p class="text-center">
{intl l="You will be redirected to your personal space in order to manage your store now."}
</p>
</div>
</div>
</div>
</div>
</div>
</div>
{/block}