Merge branch 'frontend' of github.com:thelia/thelia into frontend
This commit is contained in:
@@ -36,7 +36,7 @@ class Assetic extends AbstractSmartyPlugin
|
|||||||
{
|
{
|
||||||
$web_root = THELIA_WEB_DIR;
|
$web_root = THELIA_WEB_DIR;
|
||||||
|
|
||||||
$asset_dir_from_web_root = ConfigQuery::read('asset_dir_from_web_root', 'assets');
|
$asset_dir_from_web_root = ConfigQuery::read('asset_dir_from_web_root', 'assets/');
|
||||||
|
|
||||||
$this->assetManager = new SmartyAssetsManager($web_root, $asset_dir_from_web_root, $developmentMode == 'dev');
|
$this->assetManager = new SmartyAssetsManager($web_root, $asset_dir_from_web_root, $developmentMode == 'dev');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,14 +212,14 @@ class SmartyParser extends Smarty implements ParserInterface
|
|||||||
$templateDir = realpath(THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
|
$templateDir = realpath(THELIA_TEMPLATE_DIR . rtrim($this->template, "/") . "/");
|
||||||
|
|
||||||
if (strpos($pathFileName, $templateDir) !== 0) {
|
if (strpos($pathFileName, $templateDir) !== 0) {
|
||||||
throw new ResourceNotFoundException(sprintf("'%s' view does not exists", htmlspecialchars($file)));
|
throw new ResourceNotFoundException(sprintf("this view does not exists"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists($fileName)) {
|
if (!file_exists($fileName)) {
|
||||||
$fileName .= ".html";
|
$fileName .= ".html";
|
||||||
|
|
||||||
if (!file_exists($fileName)) {
|
if (!file_exists($fileName)) {
|
||||||
throw new ResourceNotFoundException(sprintf("'%s' file not found in %s template", htmlspecialchars($file), $this->template));
|
throw new ResourceNotFoundException(sprintf("file not found in %s template", $this->template));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -129,8 +129,9 @@ class URL
|
|||||||
|
|
||||||
// If only a path is requested, be sure to remove the script name (index.php or index_dev.php), if any.
|
// If only a path is requested, be sure to remove the script name (index.php or index_dev.php), if any.
|
||||||
if ($path_only == self::PATH_TO_FILE) {
|
if ($path_only == self::PATH_TO_FILE) {
|
||||||
|
|
||||||
// As the base_url always ends with '/', if we don't find / at the end, we have a script.
|
// As the base_url always ends with '/', if we don't find / at the end, we have a script.
|
||||||
if (substr($base_url, -1) != '/') $base_url = dirname($base_url);
|
if (substr($base_url, -3) == 'php') $base_url = dirname($base_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Normalize the given path
|
// Normalize the given path
|
||||||
|
|||||||
@@ -33,13 +33,10 @@ URL: http://www.thelia.net
|
|||||||
{block name="meta"}{/block}
|
{block name="meta"}{/block}
|
||||||
|
|
||||||
{* Stylesheets *}
|
{* Stylesheets *}
|
||||||
{stylesheets file='assets/less/styles.less' filters='less,cssembed,cssrewrite'}
|
{stylesheets file='assets/less/styles.less' filters='less,cssembed'}
|
||||||
<link rel="stylesheet" href="{$asset_url}">
|
<link rel="stylesheet" href="{$asset_url}">
|
||||||
{/stylesheets}
|
{/stylesheets}
|
||||||
|
|
||||||
|
|
||||||
<!--link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css"-->
|
|
||||||
|
|
||||||
{debugbar_rendercss}
|
{debugbar_rendercss}
|
||||||
{block name="stylesheet"}{/block}
|
{block name="stylesheet"}{/block}
|
||||||
</head>
|
</head>
|
||||||
@@ -79,20 +76,27 @@ URL: http://www.thelia.net
|
|||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a href="{url path="/login"}" class="login">{intl l="Log In!"}</a>
|
<a href="{url path="/login"}" class="login">{intl l="Log In!"}</a>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<form id="form-login-mini" action="login.php" method="post" role="form">
|
{form name="thelia.customer.login"}
|
||||||
<div class="form-group group-email-mini">
|
<form id="form-login-mini" action="{url path="/login"}" method="post" role="form" {form_enctype form=$form}>
|
||||||
<label for="email-mini">Email address:</label>
|
{form_hidden_fields form=$form}
|
||||||
<input type="email" name="email" id="email-mini" class="form-control" value="" aria-required="true" required>
|
{form_field form=$form field="email"}
|
||||||
</div>
|
|
||||||
<div class="form-group group-email">
|
<div class="form-group group-email">
|
||||||
<label for="password-mini">Password</label>
|
<label for="{$label_attr.for}-mini">{$label}</label>
|
||||||
<input type="password" name="password" id="password-mini" class="form-control" value="" aria-required="true" required>
|
<input type="email" name="{$name}" id="{$label_attr.for}-mini" class="form-control"{if $required} aria-required="true" required{/if}>
|
||||||
</div>
|
</div>
|
||||||
|
{/form_field}
|
||||||
|
{form_field form=$form field="password"}
|
||||||
|
<div class="form-group group-password">
|
||||||
|
<label for="{$label_attr.for}-mini">Password</label>
|
||||||
|
<input type="password" name="{$name}" id="{$label_attr.for}-mini" class="form-control"{if $required} aria-required="true" required{/if}>
|
||||||
|
</div>
|
||||||
|
{/form_field}
|
||||||
<div class="group-btn">
|
<div class="group-btn">
|
||||||
<button type="submit" class="btn btn-login-mini">Sign In</button>
|
<button type="submit" class="btn btn-login-mini">{intl l="Sign In"}</button>
|
||||||
<a href="register.php" class="btn btn-register-mini">Register</a>
|
<a href="{url path="/register"}" class="btn btn-register-mini">{intl l="Register"}</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
{/form}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
{/elseloop}
|
{/elseloop}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||||
<h1 id="main-label" class="page-header">{intl l="Login"}</h1>
|
<h1 id="main-label" class="page-header">{intl l="Login"}</h1>
|
||||||
{form name="thelia.customer.login"}
|
{form name="thelia.customer.login"}
|
||||||
<form id="form-login" action="{url path="/customer/login"}" method="post" role="form" {form_enctype form=$form}>
|
<form id="form-login" action="{url path="/login"}" method="post" role="form" {form_enctype form=$form}>
|
||||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||||
{form_field form=$form field='success_url'}
|
{form_field form=$form field='success_url'}
|
||||||
<input type="hidden" name="{$name}" value="{navigate to="return_to"}"> {* the url the user is redirected to on login success *}
|
<input type="hidden" name="{$name}" value="{navigate to="return_to"}"> {* the url the user is redirected to on login success *}
|
||||||
@@ -31,9 +31,10 @@
|
|||||||
<div class="form-group group-email{if $error} has-error{/if}">
|
<div class="form-group group-email{if $error} has-error{/if}">
|
||||||
<label for="{$label_attr.for}">{$label}</label>
|
<label for="{$label_attr.for}">{$label}</label>
|
||||||
<div class="control-input">
|
<div class="control-input">
|
||||||
<input type="email" name="{$name}" id="{$label_attr.for}" value="{$value}" class="form-control" {$attr} aria-required="true" autofocus required>
|
<input type="email" name="{$name}" id="{$label_attr.for}" value="{$value}" class="form-control" {$attr} {if $required}aria-required="true" required{/if}{if $error} autofocus{/if}>
|
||||||
{if $error}
|
{if $error}
|
||||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||||
|
{assign var="error_email" value="true"}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
<legend>{intl l="Do you have an account?"}</legend>
|
<legend>{intl l="Do you have an account?"}</legend>
|
||||||
<div class="radio radio-account0" >
|
<div class="radio radio-account0" >
|
||||||
<label for="account0">
|
<label for="account0">
|
||||||
<input type="radio" name="account" id="account0" data-toggle="password" value="0" > {intl l="No, I am a new customer."}
|
<input type="radio" name="account" id="account0" data-toggle="password" value="0"> {intl l="No, I am a new customer."}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="radio radio-account1">
|
<div class="radio radio-account1">
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
<div class="form-group group-password{if $error} has-error{/if}">
|
<div class="form-group group-password{if $error} has-error{/if}">
|
||||||
<label for="{$label_attr.for}" class="sr-only">{$label}</label>
|
<label for="{$label_attr.for}" class="sr-only">{$label}</label>
|
||||||
<div class="control-input">
|
<div class="control-input">
|
||||||
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" autocomplete="off">
|
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" autocomplete="off"{if !isset($error_email) && $error } autofocus{/if}>
|
||||||
{if $error}
|
{if $error}
|
||||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user