enjoy_cms_catalog 0.4.0.3 → 0.4.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2810464e954489963b2130c0336529162fe711cc
4
- data.tar.gz: 5e83114cac2f7fbbfab56ce3dcd9a22b837f70d2
3
+ metadata.gz: edde50b4433ff6776e6b8d22901ba0e41b334e40
4
+ data.tar.gz: fdbce49d7fa7f0fadc43c452ef7ec1dc8b1a2ef6
5
5
  SHA512:
6
- metadata.gz: f4dd7c53c72ba0b3fdd36e6082ee481270c4d9ba0c4e82e18ca4fc569345ab701390e9433e602b5b1d1c6081809f71bc9aaf9f700ea6400f376fd2d8cb8cb573
7
- data.tar.gz: ee2ed9fd6e141c3d987299590a0be8a3cd70accb65afd2bb18b8378b087d5da226617fa91debd408c0c0a6a7873304c52a08a3f0adcfd4b2e46bf1eaba195681
6
+ metadata.gz: 4e3bbd171f9cb45ddbc6c138eae458a81a9de3884cd7a31473651aad07d00c28bc54816dc0ca4103aa6d00ca8a426e47f9a480955f4716297e6927d29ca50fde
7
+ data.tar.gz: 8fe619a6ca6703fcb3313f3453fa939091f0dfb6330ba77e98b9943a11ad191fdddf93fb738e86d036e2bef7298bd49826c95e7933fbf1454e3cf839bff48bf9
@@ -3,13 +3,9 @@ module Enjoy::Catalog
3
3
  module Categories
4
4
  extend ActiveSupport::Concern
5
5
 
6
- def insert_breadcrumbs
7
- true
8
- end
9
-
10
6
  included do
11
7
  if Enjoy::Catalog.config.breadcrumbs_on_rails_support
12
- add_breadcrumb I18n.t('enjoy.breadcrumbs.catalog'), :enjoy_catalog_path if insert_breadcrumbs
8
+ add_breadcrumb I18n.t('enjoy.breadcrumbs.catalog'), :enjoy_catalog_path, if: :insert_breadcrumbs
13
9
  end
14
10
  end
15
11
 
@@ -31,7 +27,7 @@ module Enjoy::Catalog
31
27
  @items = @category.items.enabled.sorted.all.to_a
32
28
 
33
29
  if Enjoy::Catalog.config.breadcrumbs_on_rails_support
34
- add_breadcrumb @category.name, url_for(@category) if insert_breadcrumbs
30
+ add_breadcrumb @category.name, url_for(@category), if: :insert_breadcrumbs
35
31
  end
36
32
 
37
33
 
@@ -55,6 +51,10 @@ module Enjoy::Catalog
55
51
  Enjoy::Catalog::Item
56
52
  end
57
53
 
54
+ def insert_breadcrumbs
55
+ true
56
+ end
57
+
58
58
  # def index_crumbs
59
59
  # if @seo_parent_page
60
60
  # catalog_title = Settings.ns('breadcrumbs').catalog_title(default: "Каталог", label: "'Каталог' в breadcrumbs")
@@ -3,18 +3,15 @@ module Enjoy::Catalog
3
3
  module Items
4
4
  extend ActiveSupport::Concern
5
5
 
6
- def insert_breadcrumbs
7
- true
8
- end
9
-
10
6
  included do
11
7
  if Enjoy::Catalog.config.breadcrumbs_on_rails_support
12
- add_breadcrumb I18n.t('enjoy.breadcrumbs.items'), :enjoy_items_path if insert_breadcrumbs
8
+ add_breadcrumb I18n.t('enjoy.breadcrumbs.items'), :enjoy_items_path, if: :insert_items_breadcrumbs
13
9
  end
14
10
  end
15
11
 
16
12
  def index
17
13
  @item = item_class.enabled.sorted
14
+ insert_category_breadcrumbs if insert_breadcrumbs
18
15
 
19
16
  unless Enjoy::Catalog.config.items_per_page.nil?
20
17
  @item = @item.page(params[:page])
@@ -30,7 +27,8 @@ module Enjoy::Catalog
30
27
  end
31
28
 
32
29
  if Enjoy::Catalog.config.breadcrumbs_on_rails_support
33
- add_breadcrumb @item.name, url_for(@item) if insert_breadcrumbs
30
+ insert_category_breadcrumbs if insert_breadcrumbs
31
+ add_breadcrumb @item.name, url_for(@item), if: :insert_breadcrumbs
34
32
  end
35
33
  end
36
34
 
@@ -49,6 +47,15 @@ module Enjoy::Catalog
49
47
  end
50
48
  end
51
49
 
50
+ def insert_breadcrumbs
51
+ true
52
+ end
53
+ def insert_items_breadcrumbs
54
+ true
55
+ end
56
+ def insert_category_breadcrumbs
57
+ end
58
+
52
59
  end
53
60
  end
54
61
  end
@@ -1,5 +1,5 @@
1
1
  module Enjoy
2
2
  module Catalog
3
- VERSION = "0.4.0.3"
3
+ VERSION = "0.4.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enjoy_cms_catalog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.3
4
+ version: 0.4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kiseliev