Test Front

This commit is contained in:
Michael RICOIS 2017-11-15 11:03:34 +01:00
parent 49cd82d3df
commit b516aa748b
4 changed files with 48 additions and 24 deletions

View File

@ -265,18 +265,23 @@ class PurchaseGuide extends Module
{ {
global $cookie, $smarty; global $cookie, $smarty;
// id_category
$id_category = Tools::getValue('cid', 0); $id_category = Tools::getValue('cid', 0);
// @todo : id_category2
// Récup de l'arbre en fonction des catégories // Récup de l'arbre en fonction des catégories
$model = new GuideCategory(); $model = new GuideCategory($id_category);
if ($model->id_parent == 0) {
$id_main_category = $id_category;
$id_child_category = 0;
} else {
$mainCategory = $model->getParent($model->id_parent, $cookie->id_lang);
$id_main_category = $mainCategory['id_guide_category'];
$id_child_category = $id_category;
}
$tree = $model->getTree($cookie->id_lang); $tree = $model->getTree($cookie->id_lang);
// @todo : id_guide_category_select, id_guide_post_select
$smarty->assign(array( $smarty->assign(array(
'id_guide_category_select_main' => $id_category, 'id_guide_category_select_main' => $id_main_category,
'id_guide_category_select_second' => $id_category, 'id_guide_category_select_child' => $id_child_category,
'menu' => $tree, 'menu' => $tree,
)); ));

View File

@ -19,7 +19,7 @@
<div style="width:24%;float:left;"> <div style="width:24%;float:left;">
<ul> <ul>
{foreach from=$postList item=p} {foreach from=$postList item=p}
<li{if $p.id_guide_post==$id_guide_post_select} class="enabled"{/if}> <li{if $p.id_guide_post==$id_guide_post_select} class="selected"{/if}>
<a href="{$base_dir_ssl}guide/{$categoryRewrite}/{$subcategoryRewrite}/{$p.id_guide_post}-{$p.link_rewrite}">{$p.meta_title}</a> <a href="{$base_dir_ssl}guide/{$categoryRewrite}/{$subcategoryRewrite}/{$p.id_guide_post}-{$p.link_rewrite}">{$p.meta_title}</a>
</li> </li>
{/foreach} {/foreach}

View File

@ -1,21 +1,20 @@
<div class="block-cms informations_block_left"> <div class="block-guide">
<h4>Guide d'achat</h4>
{foreach from=$menu item=c} {foreach from=$menu item=c}
{assign var="isSelected" value="0"} <h5><a{if $c.id_guide_category==$id_guide_category_select_main} class="selected"{/if} href="{$base_dir_ssl}{$c.rewrite}">{$c.name}</a></h5>
{if $c.id_guide_category}
{assign var="isSelected" value="1"}
{/if}
<h4><a{if $isSelected==0} class="selected"{/if} href="{$base_dir_ssl}{$c.rewrite}">{$c.name}</a></h4>
{if $c.children|@count > 0 && $isSelected==0}
{foreach from=$c.children item=children}
{/foreach}
{/if}
{if $c.children|@count > 0} {if $c.children|@count > 0}
<ul class="block_content"> <ul class="block_content">
{foreach from=$c.children item=children} {foreach from=$c.children item=children name=loopChild}
<li><a href="{$base_dir_ssl}{$children.rewrite}">{$children.name}</a></li> {assign var="class" value=""}
{if $id_guide_category_select_child==0 && $smarty.foreach.loopChild.first}
{assign var="class" value="selected"}
{/if}
{if $children.id_guide_category==$id_guide_category_select_child}
{assign var="class" value="selected"}
{/if}
<li class="{$class}">
<a href="{$base_dir_ssl}{$children.rewrite}">{$children.name}</a>
</li>
{/foreach} {/foreach}
</ul> </ul>
{/if} {/if}

View File

@ -1901,9 +1901,10 @@ li.active .container_submenu .content_submenu {
padding: 0 15px; padding: 0 15px;
} }
.container_submenu .content_footer { .container_submenu .content_footer {
width: 965px; display: block;
margin: 0 auto; margin: 0 auto;
position: relative; position: absolute;
bottom: 0;
background-color: #fff; background-color: #fff;
} }
.submenu { .submenu {
@ -7459,3 +7460,22 @@ div.addresses ul.address.item {
.ant_support{ .ant_support{
padding:0px!important; padding:0px!important;
} }
.block-guide {
margin-bottom: 20px;
background: #f6f6f6;
-moz-box-shadow: 1px 2px 1px #cccccc;
-webkit-box-shadow: 1px 2px 1px #cccccc;
-ms-box-shadow: 1px 2px 1px #cccccc;
-o-box-shadow: 1px 2px 1px #cccccc;
box-shadow: 1px 2px 1px #cccccc;
padding: 10px 20px;
}
.block-guide h4 {
font-size:14px;
}
.block-guide h5 {
font-size:12px;
}
.block-guide ul {
margin-left: 5px;
}