c80_yax 0.1.0.10 → 0.1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2fcdb6220bde8af2b6e60f53d49af2d2d69550b0
4
- data.tar.gz: a82fd9dd850ea34b2fcd12dafc621fcb37ed6390
3
+ metadata.gz: 167539a3ddc657f9981d87a228f087e383231e69
4
+ data.tar.gz: debbbff6afa1582278bb9ee148dac082c0339e9e
5
5
  SHA512:
6
- metadata.gz: db1a8505b80c253e6a48bec20277f549215d03d0c814a725b5a78127c8bfdba88052955467db8ec375aa05c5c33eea9890ff7691fe70c67ae1b5ac9f769499fc
7
- data.tar.gz: 77aac719f298b13fbf809eeafd47119acf3f421347afb364a30b27866d7db0cd20a8a1feccb79daecaf0d94da80925b5bd8aaa56e423a97b554eea2113bb6370
6
+ metadata.gz: 10d105168f64205e966cd9544fa1c68456969da2a467db77ffde1a8cadada1a940e7de7b6e2583b7bdad39aa6fd1d4e846e59a9f5a33731316e24774ca147851
7
+ data.tar.gz: a2dbb7613f446f29e668f1c0658880ed106e130d53b1ed9315751abb52500934c585d39b5db1858c20ab943888f1df430af75c220834bb6ff343d3ad02707842
@@ -12,6 +12,39 @@ module C80Yax
12
12
  }
13
13
  end
14
14
 
15
+ def render_cats_strsubcats(&make_strsubcat_url)
16
+
17
+ rdo = Cat.includes(:strsubcats)
18
+ res = ''
19
+
20
+ rdo.each do |category|
21
+ r = "<h2 class='title'>#{category.title}</h2>"
22
+ ds = ul_strsubcats(category, &make_strsubcat_url)
23
+ next if ds.blank? # (**)
24
+ r += ds
25
+ res += "<li class='li_category' id='category_#{category.id}'>#{r}</li>"
26
+ end
27
+
28
+ "<ul class='ul_cats_strsubcats'>#{res}</ul>".html_safe
29
+
30
+ end
31
+
32
+ private
33
+
34
+ def ul_strsubcats(category, &make_url)
35
+ res = ''
36
+ # noinspection RubyResolve
37
+ category.strsubcats.each do |strsubcat|
38
+ id = "strsubcat_#{strsubcat.id}"
39
+ t = strsubcat.title
40
+ u = make_url.call(strsubcat)
41
+ d = "<a href='#{u}' title='#{t}'>#{t}</a>"
42
+ res += "<li class='li_strsubcat' id='#{id}'>#{d}</li>"
43
+ end
44
+ return res if res.blank? # (*)
45
+ "<ul class='ul_strsubcats'>#{res}</ul>"#.html_safe
46
+ end
47
+
15
48
  end
16
49
  end
17
50
  end
@@ -1,3 +1,3 @@
1
1
  module C80Yax
2
- VERSION = '0.1.0.10'
2
+ VERSION = '0.1.0.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c80_yax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.10
4
+ version: 0.1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - C80609A