Commit 9718b420 by Tran Hoang Viet

Merge remote-tracking branch 'origin/hotfix-1.0.1'

Conflicts:
	app/controllers/categories_controller.rb
parents 0b28f610 5a34ad79
......@@ -4,7 +4,7 @@ class CategoriesController < ApplicationController
def show
@products = @category.products.page(params[:page])
add_breadcrumb(@category.title)
add_breadcrumb(@category.decorate.title)
end
private
......
......@@ -16,4 +16,8 @@ class ProductDecorator < Draper::Decorator
def image_lg_url
object.amazon? ? object.image_lg_url : object.image.large.url
end
def short_title
return object.title.truncate(Settings.limit_length_category_title, separator: ' ')
end
end
\ No newline at end of file
- products.each do |product|
.product-item.col-md-4.text-center
.product-title
= link_to product.title, product
= link_to product.decorate.short_title, product
.product-image.img-thumbnail
= image_tag product.decorate.image_md_url
......@@ -4,7 +4,7 @@
%img{src: product.decorate.image_sm_url}
.col-md-9
.product-title
= link_to product.title, product_path(product)
= link_to product.decorate.short_title, product_path(product)
- if local_assigns.has_key?(:show_price) && show_price.present?
.col-md-2
.product-price
......
......@@ -2,6 +2,7 @@ defaults: &defaults
limit_category: 5
limit_product_recommended: 6
limit_product_newest: 4
limit_length_category_title: 50
development:
<<: *defaults
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment