Integration of Assetic in SmartyParser, extended it to Admin (we can now

use loops !), added the Thelia ControllerResolver and fixed config and
routing accordingly.²:wq
This commit is contained in:
franck
2013-06-19 02:07:43 +02:00
parent 7351edeb46
commit 89abfaad48
35 changed files with 763 additions and 244 deletions

View File

@@ -54,12 +54,37 @@ a {
font-weight: bold;
}
// Bootstrap Adjustements ------------------------------------------------------
.btn-primary, .row h3 .btn-large, .row-fluid h3 .btn-large, .row-fluid h4 .btn-large {
background: -moz-linear-gradient(center bottom , #E3530B 0%, #F39922 100%) repeat scroll 0 0 #E9730F;
box-shadow: 0 0 2px rgba(250, 250, 250, 0.5) inset, 0 1px 3px rgba(0, 0, 0, 0.2);
color: white;
}
// -- Brandbar ----------------------------------------------------------------
/* --- BRAND BAR ---*/
.loginpage {
.brandbar {
width: 100%;
}
.hero-unit {
background-color: transparent !important;
}
.well {
background-color: #E4E3DE;
border: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.05) inset;
}
}
.brandbar {
background: url("images/header.jpg") repeat-x;
background: url("img/header.jpg") repeat-x;
height: 90px;
a.brand {
@@ -67,7 +92,7 @@ a {
display: block;
float: left;
margin-right: 20px;
background: url("images/logo.png") 0px 12px no-repeat;
background: url("img/logo.png") 0px 12px no-repeat;
width: 124px;
height: 63px;
}
@@ -75,7 +100,7 @@ a {
.breadcrumb {
border-radius: 0px;
padding: 25px 0px 25px 30px;
background: url("images/logo-light.png") left center no-repeat;
background: url("img/logo-light.png") left center no-repeat;
float: left;
margin: 12px 0px 0px 0px;
@@ -114,7 +139,7 @@ a {
a {
text-indent: -13337px;
display: block;
background: url("images/deconnexion.png") no-repeat;
background: url("img/deconnexion.png") no-repeat;
width: 23px;
height: 24px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

View File

@@ -0,0 +1,13 @@
{* Include required JS files *}
{javascripts file='../assets/js/jquery.min.js'}
<link rel="stylesheet" href="{$asset_url}" target="screen">
{/javascripts}
{javascripts file='../assets/bootstrap/js/bootstrap.min.js'}
<link rel="stylesheet" href="{$asset_url}" target="screen">
{/javascripts}
{* TODO allow modules to include JS here *}
</body>
</html>

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="{$lang}">
<head>
<title>{intl l='Thelia Back Office'}{if ! empty($page_title)} - {$page_title}{/if}</title>
{images file='../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='../assets/css/*' filters='less,cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
{stylesheets file='../assets/bootstrap/css/bootstrap.css' filters='cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
{stylesheets file='../assets/bootstrap/css/bootstrap-responsive.css' filters='cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
{* TODO allow modules to include CSS here *}
</head>
<body>

View File

@@ -0,0 +1,52 @@
{$page_title={intl l='Thelia'}}
{include file='includes/header.inc.html'}
<div class="loginpage">
<div class="brandbar container">
<a class="brand" href="index.php">{images file='assets/img/logo-thelia-34px.png'}<img src="{$asset_url}" alt="{intl l='Thelia, solution e-commerce libre'}" />{/images}</a>
</div>
<div id="wrapper" class="container">
{thelia_module action='index_top'}
<div class="hero-unit">
<h1>{intl l='Thelia Back Office'}</h1>
<form action="/admin/login" method="post" class="well form-inline">
<input type="text" class="input" placeholder="{intl l='E-mail address'}" name="username" />
<input type="password" class="input" placeholder="{intl l='Password'}" name="password" />
<label class="checkbox"> <input type="checkbox" name="remember" value="yes"> {intl l='Remember me'}</label>
<button type="submit" class="btn btn-primary">{intl l='Login'} <i class="icon-play"></i></button>
</form>
</div>
<div class="row-fluid">
</div>
<div>
<h2>We DO display loops in back-office !</h2>
<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>
{thelia_module action='index_bottom'}
</div>
{include file='includes/footer.inc.html'}

View File

@@ -0,0 +1,9 @@
body {
font-size: 12px;
font-family: Arial, helvetica, sans serif;
background-image: url("../img/test-background.jpg");
}
div {
margin: 10px 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

File diff suppressed because one or more lines are too long

View File

View File

@@ -0,0 +1 @@
<?php

View File

@@ -0,0 +1,18 @@
{* Include required JS files *}
{javascripts file='../assets/js/*'}
<script src="{$asset_url}"></script>
{/javascripts}
<script>
$(function() {
$('#jquery_block').html("Jquery is now loaded.").hover(function() {
$(this).css('font-weight', 'bold');
}, function() {
$(this).css('font-weight', 'normal');
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>{intl l='Hi, I\'m a Thelia TPex template'}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{stylesheets file='../assets/css/*' filters='less,cssembed'}
<link rel="stylesheet" href="{$asset_url}">
{/stylesheets}
</head>
<body>

View File

@@ -1,61 +1,77 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div>
<p>Category loop example</p>
{loop type="category" name="catloop1"}
{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE} <br />
nb child : {$NB_CHILD} <br /><br />
{/loop}
</div>
{include file="includes/header.html"}
<div>
An image from asset directory :
{images file='assets/img/logo-thelia-34px.png'}<img src="{$asset_url}" alt="{intl l='Thelia, solution e-commerce libre'}" />{/images}
</div>
<div>
<p>Conditional example #1</p>
<div>
{intl l='An internationalized string'}
</div>
{notempty name="catloop2"}
Loop catloop2 is not empty: <ul>
{loop type="category" name="catloop2" parent="12"}
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
{/loop}
</ul>
{/notempty}
<div>
jQuery data: <span id="jquery_block"></span>
</div>
{empty name="catloop2"}
<p>Loop catloop2 is empty</p>
{/empty}
<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>
</div>
</div>
<div>
<p>Conditional example #1</p>
<div>
<p>Conditional example #2</p>
{ifloop rel="catloop2"}
Hey ! Loop catloop2 is not empty:
<ul>
{loop type="category" name="catloop2" parent="12"}
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
{/loop}
</ul>
{/ifloop}
{notempty name="catloop3"}
Loop catloop3 is not empty: <ul>
{loop type="category" name="catloop3" parent="0"}
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
{/loop}
</ul>
{/notempty}
{elseloop rel="catloop2"}
<p>Loop catloop2 is empty</p>
{/elseloop}
</div>
{empty name="catloop3"}
<p>Loop catloop3 is empty</p>
{/empty}
<div>
<p>Conditional example #2</p>
{empty name="catloop2"}
<p>... but catloop2 is still empty :-)</p>
{/empty}
{ifloop rel="catloop3"}
Loop catloop3 is not empty:
<ul>
{loop type="category" name="catloop3" parent="0"}
<li>{$__COUNT__}/{$__TOTAL__} : {$ID} {$TITLE}</li>
{/loop}
</ul>
{/ifloop}
</div>
{elseloop rel="catloop3"}
<p>Loop catloop3 is empty</p>
{/elseloop}
<div>
<p>Traditional for loop</p>
{for $index=5 to 12 step 1}
Compteur = {$index}<br />
{/for}
</div>
</body>
</html>
{elseloop rel="catloop2"}
<p>... but catloop2 is still empty :-)</p>
{/elseloop}
</div>
<div>
<p>Traditional for loop</p>
{for $index=5 to 12 step 1}
Compteur = {$index}<br />
{/for}
</div>
{include file="includes/footer.html"}