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

@@ -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"}