From 3db29c9d1d39dcf9c5af6fe03b0ac396badd5d29 Mon Sep 17 00:00:00 2001 From: badsuricate Date: Fri, 18 Oct 2013 10:51:52 +0200 Subject: [PATCH 1/7] Creation of Content page --- templates/default/content.html | 36 +++++++++++++++++++ .../default/includes/asides/articles.html | 16 +++++++++ 2 files changed, 52 insertions(+) create mode 100644 templates/default/content.html create mode 100644 templates/default/includes/asides/articles.html diff --git a/templates/default/content.html b/templates/default/content.html new file mode 100644 index 000000000..160e84fcc --- /dev/null +++ b/templates/default/content.html @@ -0,0 +1,36 @@ +{extends file="layout.tpl"} + +{block name="no-return-functions"} + {check_auth context="front" roles="CUSTOMER" login_tpl="login"} +{/block} + +{block name="body-class"}page-content{/block} + +{* Breadcrumb *} +{block name='no-return-functions' append} + +{/block} + +{block name="main-content"} +
+ +
+ {loop name="blog.article" type="content" current="yes"} +

{$TITLE}

+

+ {$CHAPO} +

+

{$DESCRIPTION nofilter}

+ {/loop} +
+ + + +
+{/block} + +{block name="after-javascript-include"}{/block} \ No newline at end of file diff --git a/templates/default/includes/asides/articles.html b/templates/default/includes/asides/articles.html new file mode 100644 index 000000000..13be98a8e --- /dev/null +++ b/templates/default/includes/asides/articles.html @@ -0,0 +1,16 @@ + \ No newline at end of file From dea93ccb50971b963690efac48ea0227951c14a6 Mon Sep 17 00:00:00 2001 From: badsuricate Date: Fri, 18 Oct 2013 10:52:40 +0200 Subject: [PATCH 2/7] Fix bug in Content Loop with "current_folder" params --- .../lib/Thelia/Core/Template/Loop/Content.php | 29 ++++++------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Loop/Content.php b/core/lib/Thelia/Core/Template/Loop/Content.php index ce966bf5c..696d8c6cd 100755 --- a/core/lib/Thelia/Core/Template/Loop/Content.php +++ b/core/lib/Thelia/Core/Template/Loop/Content.php @@ -86,6 +86,7 @@ class Content extends BaseI18nLoop */ public function exec(&$pagination) { + $search = ContentQuery::create(); /* manage translations */ @@ -138,27 +139,15 @@ class Content extends BaseI18nLoop $current_folder = $this->getCurrent_folder(); if ($current_folder === true) { - $search->filterByFolder( - FolderQuery::create()->filterByContent( - ContentFolderQuery::create()->filterByContentId( - $this->request->get("content_id"), - Criteria::EQUAL - )->find(), - Criteria::IN - )->find(), - Criteria::IN - ); + $current = ContentQuery::create()->findPk($this->request->get("content_id")); + + $search->filterByFolder($current->getFolders(), Criteria::IN); + } elseif ($current_folder === false) { - $search->filterByFolder( - FolderQuery::create()->filterByContent( - ContentFolderQuery::create()->filterByContentId( - $this->request->get("content_id"), - Criteria::EQUAL - )->find(), - Criteria::IN - )->find(), - Criteria::NOT_IN - ); + + $current = ContentQuery::create()->findPk($this->request->get("content_id")); + + $search->filterByFolder($current->getFolders(), Criteria::NOT_IN); } $visible = $this->getVisible(); From 85e9a26cb60d58b4d2b459b6013141c5dd80fc15 Mon Sep 17 00:00:00 2001 From: badsuricate Date: Fri, 18 Oct 2013 10:53:36 +0200 Subject: [PATCH 3/7] Add order on attribute_combination loop --- templates/default/product.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/default/product.html b/templates/default/product.html index 7f9b9f04d..b7b203bc9 100644 --- a/templates/default/product.html +++ b/templates/default/product.html @@ -160,8 +160,8 @@
+ + + {if $form_error}
{$form_error_message}
{/if} + + {form_field form=$form field='product_sale_elements_id'} + {if $default_product_sale_elements } + + {else} + {loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"} + + {/loop} + {/if} + {/form_field} + {form_field form=$form field="product"} + + {/form_field} + +
+ {ifloop rel="stock"} +
+ +
+ +
+
+ {/ifloop} +
+
+ {form_field form=$form field='quantity'} +
+ + + {if $error } + {$message} + {elseif $value != "" && !$error} + + {/if} +
+ {/form_field} + +
+ +
+
+
+ {if $hasSubmit == true} + + {else} + {intl l="View product"} + {/if} + +
+
+ +
+ + {/form}
- {if $hasBtn} -
- -
- {/if} - - + \ No newline at end of file From 4b65675beff3bf047de1db6b11164df2f5f58864 Mon Sep 17 00:00:00 2001 From: badsuricate Date: Fri, 18 Oct 2013 11:04:10 +0200 Subject: [PATCH 6/7] add page View All --- .../Thelia/Config/Resources/routing/front.xml | 7 ++- templates/default/index.html | 4 +- templates/default/view_all.html | 58 +++++++++++++++++++ 3 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 templates/default/view_all.html diff --git a/core/lib/Thelia/Config/Resources/routing/front.xml b/core/lib/Thelia/Config/Resources/routing/front.xml index 27abfd4fa..9861d349f 100755 --- a/core/lib/Thelia/Config/Resources/routing/front.xml +++ b/core/lib/Thelia/Config/Resources/routing/front.xml @@ -4,7 +4,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd"> - + Thelia\Controller\Front\DefaultController::noAction index @@ -16,6 +16,11 @@ search + + Thelia\Controller\Front\DefaultController::noAction + view_all + + Thelia\Controller\Front\CustomerController::createAction diff --git a/templates/default/index.html b/templates/default/index.html index 2048e82c9..c4204cb83 100644 --- a/templates/default/index.html +++ b/templates/default/index.html @@ -30,7 +30,7 @@
-

{intl l="Latest"} {intl l="+ View All"}

+

{intl l="Latest"} {intl l="+ View All"}

@@ -99,7 +99,7 @@
-

{intl l="Offers"} {intl l="+ View All"}

+

{intl l="Offers"} {intl l="+ View All"}

diff --git a/templates/default/view_all.html b/templates/default/view_all.html new file mode 100644 index 000000000..cd3650151 --- /dev/null +++ b/templates/default/view_all.html @@ -0,0 +1,58 @@ +{extends file="layout.tpl"} + + +{block name="body-class"}page-view-all{/block} + +{* Breadcrumb *} +{block name='no-return-functions' append} + {$breadcrumbs = [ + ['title' => {intl l="View all"}, 'url'=>{url path="/view_all"}] + ]} +{/block} + +{block name="main-content"} +
+ + {$limit={$smarty.get.limit|default:8}} + {$product_page={$smarty.get.page|default:1}} + {$product_order={$smarty.get.order|default:'alpha'}} + +
+ + {if $smarty.get.type == "new"} +

{intl l="View all"} {$smarty.get.type} {intl l="products"}

+ {else} +

{intl l="View all"} {intl l="offers"}

+ {/if} + {include file="includes/toolbar.html" toolbar="top" limit=$limit order=$product_order} +
+
+ {ifloop rel="product_list"} +
    + {if $smarty.get.type == "new"} + {loop type="product" name="product_list" limit=$limit page=$product_page order=$product_order} + {include file="includes/single-product.html" product_id=$ID hasBtn=true hasDescription=true width="700" height="320"} + {/loop} + {else} + {loop type="product" name="product_list" promo="yes" limit=$limit page=$product_page order=$product_order} + {include file="includes/single-product.html" product_id=$ID hasBtn=true hasDescription=true width="700" height="320"} + {/loop} + {/if} + + +
+ {/ifloop} + {elseloop rel="product_list"} +

{intl l="No results found"}

+ {/elseloop} +
+
+ {ifloop rel="product_list"} + {include file="includes/toolbar.html" toolbar="bottom"} + {/ifloop} +
+ +
+{/block} + +{block name="after-javascript-include"}{/block} \ No newline at end of file From e80b2157b15190768dc9df77e51496eba348dea4 Mon Sep 17 00:00:00 2001 From: badsuricate Date: Fri, 18 Oct 2013 11:04:42 +0200 Subject: [PATCH 7/7] Modification font-size of price elements --- templates/default/assets/themes/default/less/theme.less | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/default/assets/themes/default/less/theme.less b/templates/default/assets/themes/default/less/theme.less index 32a8063fc..fb25a4acc 100755 --- a/templates/default/assets/themes/default/less/theme.less +++ b/templates/default/assets/themes/default/less/theme.less @@ -323,7 +323,7 @@ td.product, .special-price { .price { display: block; - font-size: 25px; line-height: 25px; + font-size: 20px; line-height: 25px; font-style: italic; } }