c80_yax 0.1.0.12 → 0.1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/c80_yax/cart_icon_sm.png +0 -0
- data/app/assets/stylesheets/c80_yax/elems/add_to_bucket.scss +23 -4
- data/app/assets/stylesheets/c80_yax/elems/ul_item_index.scss +4 -0
- data/app/assets/stylesheets/c80_yax.scss +2 -1
- data/app/decorators/c80_yax/item_decorator.rb +1 -1
- data/app/helpers/c80_yax/frontend/catalog_index_helper.rb +30 -0
- data/engines/ti/app/admin/ti/categories.rb +6 -0
- data/engines/ti/app/assets/stylesheets/ti/tech_info_list.scss +41 -0
- data/engines/ti/app/helpers/ti/tech_info_list_helper.rb +30 -53
- data/engines/ti/app/models/ti/category.rb +2 -0
- data/engines/ti/db/migrate/20170718035050_add_ti_listed_to_categories.rb +5 -0
- data/lib/c80_yax/version.rb +1 -1
- metadata +5 -4
- data/engines/ti/app/assets/stylesheets/ti/news_block.scss +0 -49
- data/engines/ti/app/assets/stylesheets/ti/will_paginate.scss +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f69bc23c1a26a230fe3f9fe2f2cb633bd096de13
|
4
|
+
data.tar.gz: 80099f717e6919da3f45e6c36f6c058350d75cd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a7921079b99889db0ab782e890e7ffaf771d3ebf68040922ed26f62a5cc67bb98a773d70f590b82e8eb874f5ff42b3996871107c94d69c7050c9713331529eb
|
7
|
+
data.tar.gz: a87fdc1fa85e569922ede7cc8a21ead55cbea04e95cc75d8d11e5e162b4315be326e99231f2a3090463ef3d2ed8f9cab29d5d4a7821384a200f1c43e39d52acf
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
@mixin add_to_bucket {
|
2
2
|
@include color_button(#FFFFFF, $red);
|
3
3
|
|
4
4
|
line-height: 35px;
|
@@ -10,14 +10,33 @@
|
|
10
10
|
&:before {
|
11
11
|
content: '';
|
12
12
|
display: block;
|
13
|
+
position: absolute;
|
14
|
+
}
|
15
|
+
|
16
|
+
}
|
17
|
+
|
18
|
+
.add_to_bucket {
|
19
|
+
@include add_to_bucket;
|
20
|
+
|
21
|
+
&:before {
|
13
22
|
width: 44px;
|
14
23
|
height: 44px;
|
15
|
-
position: absolute;
|
16
|
-
background: transparent image-url('cart_icon.png') no-repeat 35% 50%;
|
17
24
|
left: 18%;
|
18
25
|
top: 14%;
|
26
|
+
background: transparent image-url('cart_icon.png') no-repeat 35% 50%;
|
19
27
|
}
|
28
|
+
}
|
20
29
|
|
21
|
-
|
30
|
+
.add_to_bucket_sm {
|
31
|
+
@include add_to_bucket;
|
32
|
+
width: 49px;
|
33
|
+
height: 36px;
|
22
34
|
|
35
|
+
&:before {
|
36
|
+
width: 33px;
|
37
|
+
height: 33px;
|
38
|
+
left: 18%;
|
39
|
+
top: 1%;
|
40
|
+
background: transparent image-url('c80_yax/cart_icon_sm.png') no-repeat 50% 50%;
|
41
|
+
}
|
23
42
|
}
|
@@ -47,6 +47,36 @@ module C80Yax
|
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
50
|
+
def c80_yax_render_offers_index(thumb_size = 'thumb_md', page=1, per_page = 16)
|
51
|
+
itms = Item.joins(:offers)
|
52
|
+
.includes(item_props: {prop_name: [:uom, :related]})
|
53
|
+
.includes(:iphotos)
|
54
|
+
.includes(:strsubcat)
|
55
|
+
.paginate(page: page, per_page: per_page)
|
56
|
+
items = ItemDecorator.decorate_collection(itms)
|
57
|
+
render partial: 'c80_yax/items/index',
|
58
|
+
locals: {
|
59
|
+
items: items,
|
60
|
+
without_paginator: true,
|
61
|
+
thumb_size: thumb_size
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
def c80_yax_render_offers_hits(thumb_size = 'thumb_md', page=1, per_page = 16)
|
66
|
+
itms = Item.where(is_hit: true)
|
67
|
+
.includes(item_props: {prop_name: [:uom, :related]})
|
68
|
+
.includes(:iphotos)
|
69
|
+
.includes(:strsubcat)
|
70
|
+
.paginate(page: page, per_page: per_page)
|
71
|
+
items = ItemDecorator.decorate_collection(itms)
|
72
|
+
render partial: 'c80_yax/items/index',
|
73
|
+
locals: {
|
74
|
+
items: items,
|
75
|
+
without_paginator: true,
|
76
|
+
thumb_size: thumb_size
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
50
80
|
private
|
51
81
|
|
52
82
|
end
|
@@ -7,12 +7,16 @@ ActiveAdmin.register Ti::Category, as: 'Category' do
|
|
7
7
|
permit_params :title,
|
8
8
|
:full,
|
9
9
|
:ord,
|
10
|
+
:is_listed,
|
10
11
|
:parent_category_id
|
11
12
|
|
12
13
|
config.sort_order = 'id_asc'
|
13
14
|
# config.clear_action_items!
|
14
15
|
config.batch_actions = false
|
15
16
|
|
17
|
+
scope "All", :all
|
18
|
+
scope "Listed", :listed
|
19
|
+
|
16
20
|
# filter :title
|
17
21
|
# filter :strsubcats
|
18
22
|
# filter :is_excluded_from_filtering
|
@@ -30,6 +34,7 @@ ActiveAdmin.register Ti::Category, as: 'Category' do
|
|
30
34
|
|
31
35
|
column :title
|
32
36
|
column :ord
|
37
|
+
column :is_listed
|
33
38
|
column :parent_category do |pn|
|
34
39
|
if pn.parent_category_id.present?
|
35
40
|
rpn = Ti::Category.find_by(id:pn.parent_category_id)
|
@@ -45,6 +50,7 @@ ActiveAdmin.register Ti::Category, as: 'Category' do
|
|
45
50
|
f.inputs 'Свойства' do
|
46
51
|
f.input :title
|
47
52
|
f.input :ord
|
53
|
+
f.input :is_listed
|
48
54
|
|
49
55
|
f.input :parent_category,
|
50
56
|
as: :select,
|
@@ -0,0 +1,41 @@
|
|
1
|
+
ul.tech_info_list {
|
2
|
+
margin: 0;
|
3
|
+
padding: 0;
|
4
|
+
list-style: none;
|
5
|
+
|
6
|
+
h2 {
|
7
|
+
text-transform: uppercase;
|
8
|
+
@extend %HelveticaNeueCyrRoman;
|
9
|
+
font-size: 20px;
|
10
|
+
}
|
11
|
+
|
12
|
+
ul.docs_of_cats {
|
13
|
+
margin: 0;
|
14
|
+
padding: 0;
|
15
|
+
list-style: none;
|
16
|
+
|
17
|
+
h3 {
|
18
|
+
@extend %HelveticaNeueCyrRoman;
|
19
|
+
font-size: 15px;
|
20
|
+
background-color: #EC2127;
|
21
|
+
color: white;
|
22
|
+
padding: 15px 15px 15px 20px;
|
23
|
+
}
|
24
|
+
|
25
|
+
ul.docs {
|
26
|
+
list-style: none;
|
27
|
+
padding: 0 0 0 19px;
|
28
|
+
|
29
|
+
a {
|
30
|
+
font-family: HelveticaNeueCyrRoman;
|
31
|
+
color: #777777;
|
32
|
+
text-decoration: underline;
|
33
|
+
font-size: 15px;
|
34
|
+
&:hover {
|
35
|
+
color: #333333;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
}
|
@@ -1,76 +1,53 @@
|
|
1
1
|
module Ti
|
2
2
|
module TechInfoListHelper
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
# Список выводится слева от карты.
|
8
|
-
# (**) Не выводим регионы, у которых нет дилеров.
|
9
|
-
#
|
10
|
-
# Структура списка:
|
11
|
-
# * Регион
|
12
|
-
# * Дилер
|
13
|
-
# * Офис 1
|
14
|
-
# * адрес офиса
|
15
|
-
# * телефон офиса
|
16
|
-
# * Офис 2
|
17
|
-
# * адрес офиса
|
18
|
-
# * телефон офиса
|
19
|
-
# * сайт дилера
|
20
|
-
# * email дилера
|
21
|
-
#
|
22
|
-
def __render_ul_dealers_list(rdo)
|
4
|
+
def render_tech_info_list(&make_doc_url)
|
5
|
+
|
6
|
+
p_make_doc_url = Proc.new &make_doc_url
|
23
7
|
|
24
8
|
res = ''
|
25
9
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
next
|
30
|
-
|
31
|
-
|
10
|
+
cds = Category.includes(:docs) #where(ti_categories: {is_listed: true})
|
11
|
+
|
12
|
+
cds.each do |c|
|
13
|
+
next unless c.is_listed
|
14
|
+
cc = "<h2>#{c.title}</h2>"
|
15
|
+
cc += ul_docs_of_cats(c.child_categories, p_make_doc_url)
|
16
|
+
cc = "<li>#{cc}</li>"
|
17
|
+
res += cc
|
32
18
|
end
|
33
19
|
|
34
|
-
"<ul class='
|
20
|
+
"<ul class='tech_info_list'>#{res}</ul>".html_safe
|
35
21
|
|
36
22
|
end
|
37
23
|
|
38
24
|
private
|
39
25
|
|
40
|
-
|
41
|
-
# (*) не выводим список дилеров, если он пуст
|
42
|
-
def ul_region_dealers(region)
|
26
|
+
def ul_docs_of_cats(list_of_categories, p_make_doc_url)
|
43
27
|
res = ''
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
28
|
+
|
29
|
+
list_of_categories.each do |cat|
|
30
|
+
cc = "<h3>#{cat.title}</h3>"
|
31
|
+
cc += ul_docs(cat, p_make_doc_url)
|
32
|
+
cc = "<li>#{cc}</li>"
|
33
|
+
res += cc
|
49
34
|
end
|
50
|
-
|
51
|
-
"<ul class='
|
35
|
+
|
36
|
+
"<ul class='docs_of_cats'>#{res}</ul>"
|
37
|
+
|
52
38
|
end
|
53
39
|
|
54
|
-
|
55
|
-
def ul_dealer_offices(dealer)
|
40
|
+
def ul_docs(cat, p_make_doc_url)
|
56
41
|
res = ''
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
res +=
|
42
|
+
|
43
|
+
cat.docs.each do |doc|
|
44
|
+
cc = "<a href='#{p_make_doc_url.call(doc)}' title='#{doc.title}'>#{doc.title}</a>"
|
45
|
+
cc = "<li>#{cc}</li>"
|
46
|
+
res += cc
|
62
47
|
end
|
63
|
-
res += "<li class='dealer_email'>#{dealer.email}</li>"
|
64
|
-
res += "<li class='dealer_site'>#{dealer.site}</li>"
|
65
|
-
"<ul class='ul_dealer_offices'>#{res}</ul>" #.html_safe
|
66
|
-
end
|
67
48
|
|
68
|
-
|
69
|
-
|
70
|
-
res = ''
|
71
|
-
res += "<li class='office_addr'>#{office.addr}</li>"
|
72
|
-
res += "<li class='office_tel'>#{office.tel}</li>"
|
73
|
-
"<ul class='ul_office_props'>#{res}</ul>" #.html_safe
|
49
|
+
"<ul class='docs'>#{res}</ul>"
|
50
|
+
|
74
51
|
end
|
75
52
|
|
76
53
|
end
|
data/lib/c80_yax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_yax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- app/admin/c80_yax/uoms.rb
|
133
133
|
- app/admin/c80_yax/vendors.rb
|
134
134
|
- app/admin/c80_yax/x_c80_yax.rb
|
135
|
+
- app/assets/images/c80_yax/cart_icon_sm.png
|
135
136
|
- app/assets/javascripts/c80_yax.js.coffee
|
136
137
|
- app/assets/javascripts/c80_yax/backend/items.js
|
137
138
|
- app/assets/javascripts/c80_yax/backend/strsubcats.js
|
@@ -282,8 +283,7 @@ files:
|
|
282
283
|
- engines/ti/app/assets/javascripts/ti.coffee
|
283
284
|
- engines/ti/app/assets/javascripts/ti/facts_ajax.js
|
284
285
|
- engines/ti/app/assets/stylesheets/ti.scss
|
285
|
-
- engines/ti/app/assets/stylesheets/ti/
|
286
|
-
- engines/ti/app/assets/stylesheets/ti/will_paginate.scss
|
286
|
+
- engines/ti/app/assets/stylesheets/ti/tech_info_list.scss
|
287
287
|
- engines/ti/app/controllers/ti/application_controller.rb
|
288
288
|
- engines/ti/app/helpers/ti/application_helper.rb
|
289
289
|
- engines/ti/app/helpers/ti/tech_info_list_helper.rb
|
@@ -308,6 +308,7 @@ files:
|
|
308
308
|
- engines/ti/db/migrate/20170706050507_create_ti_categories.rb
|
309
309
|
- engines/ti/db/migrate/20170706050606_create_ti_dphotos.rb
|
310
310
|
- engines/ti/db/migrate/20170706083939_create_ti_join_table_categories_docs.rb
|
311
|
+
- engines/ti/db/migrate/20170718035050_add_ti_listed_to_categories.rb
|
311
312
|
- engines/ti/db/seeds/ti_02_fill_test_data.rb
|
312
313
|
- engines/ti/lib/ti.rb
|
313
314
|
- engines/ti/lib/ti/engine.rb
|
@@ -1,49 +0,0 @@
|
|
1
|
-
div.news_block {
|
2
|
-
|
3
|
-
div.news_list {
|
4
|
-
position: relative; /** Needed to ensure items are laid out relative to this container **/
|
5
|
-
padding: 0;
|
6
|
-
margin: 0;
|
7
|
-
|
8
|
-
div.fact {
|
9
|
-
display: block;
|
10
|
-
float: left;
|
11
|
-
/*width: 229px;*/
|
12
|
-
/*max-height: 350px;*/
|
13
|
-
overflow: hidden;
|
14
|
-
margin-bottom: 25px;
|
15
|
-
|
16
|
-
img {
|
17
|
-
margin-bottom: 15px;
|
18
|
-
max-width: 100%;
|
19
|
-
}
|
20
|
-
|
21
|
-
&.clear_left {
|
22
|
-
clear: left;
|
23
|
-
}
|
24
|
-
|
25
|
-
}
|
26
|
-
|
27
|
-
&.per_row_3 {
|
28
|
-
.fact {
|
29
|
-
width: 33.33333%;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
&.per_row_4 {
|
34
|
-
.fact {
|
35
|
-
width: 25%;
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
&.is_news_page {
|
40
|
-
|
41
|
-
div.fact {
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
}
|
48
|
-
|
49
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
div.ajax_div {
|
2
|
-
|
3
|
-
div.div_will_paginate {
|
4
|
-
width: 100%;
|
5
|
-
clear: both;
|
6
|
-
float: left;
|
7
|
-
padding: 0 46px;
|
8
|
-
|
9
|
-
.pagination {
|
10
|
-
margin: 0;
|
11
|
-
|
12
|
-
span {
|
13
|
-
&.previous_page {
|
14
|
-
display: none;
|
15
|
-
}
|
16
|
-
&.next_page {
|
17
|
-
display: none;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
|
21
|
-
em {
|
22
|
-
|
23
|
-
display: inline-block;
|
24
|
-
line-height: 29px;
|
25
|
-
width: 30px;
|
26
|
-
height: 30px;
|
27
|
-
|
28
|
-
text-align: center;
|
29
|
-
font-weight: bold !important;
|
30
|
-
font-style: normal !important;
|
31
|
-
|
32
|
-
border: 1px solid #B6B6B6;
|
33
|
-
background-color: #E9353B;
|
34
|
-
color:#ffffff;
|
35
|
-
|
36
|
-
}
|
37
|
-
|
38
|
-
a {
|
39
|
-
display: inline-block;
|
40
|
-
line-height: 29px;
|
41
|
-
width: 30px;
|
42
|
-
height: 30px;
|
43
|
-
|
44
|
-
border: 1px solid #B6B6B6;
|
45
|
-
background-color: #ffffff;
|
46
|
-
color:#777777;
|
47
|
-
text-align: center;
|
48
|
-
font-weight: bold !important;
|
49
|
-
|
50
|
-
text-decoration: none;
|
51
|
-
&:hover, &:active, &:focus { text-decoration: none !important; color: black; }
|
52
|
-
|
53
|
-
&.previous_page {
|
54
|
-
display: none;
|
55
|
-
}
|
56
|
-
&.next_page {
|
57
|
-
display: none;
|
58
|
-
}
|
59
|
-
|
60
|
-
}
|
61
|
-
}
|
62
|
-
|
63
|
-
}
|
64
|
-
|
65
|
-
}
|