sibu 0.9.2 → 0.9.3

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: 1ff2db5bf9007b2ba592202e4a5df98aee3f08b3
4
- data.tar.gz: be2e611f9ebb37aaf290e8fad41d550e3197bf20
3
+ metadata.gz: b5863fe5be538035f122d5bca9adf79b3003d14c
4
+ data.tar.gz: c54c068d10c247f59e1ff89993ce824421d9f8c6
5
5
  SHA512:
6
- metadata.gz: 1336a5989b92698b0cdcc2e3bd9518d35a89af649e34fa932d625a6564f0a432c2efa4f45cd74ef3f863db018dfe439d9122e0b20be780adee87e5088c5c93bc
7
- data.tar.gz: 7c17960464222f8bda579b8f08ddea7adacd16844ac95c279a50150e721a81b33edb6b3ea5d7f71cb2838fa9bbf3016205a6313c0a0e4d63c919d2216024ec8a
6
+ metadata.gz: 0f610a0d5e30ae5d3808bd3dace1aaad977cb12f0ad9dcca17cc538c87b38fda947476768dd517a062406ce48c21a7c23563d6ff16b7e260b85a183752ace900
7
+ data.tar.gz: a399ffcf3ddc03508e37a404ad5c934d506af3cd1c4ca4a61f7d52437a74b798dcc073b2ff0f262b0a3fba1898c460aa55d2677fdf88fb8adee6cbf676936224
@@ -139,14 +139,6 @@ module Sibu
139
139
  content_tag(tag, capture(self, &block), opts)
140
140
  end
141
141
 
142
- def sections(id, tag, html_opts = {}, &block)
143
- (@sb_entity.find_or_init(id)["elements"].map.with_index do |elt, i|
144
- @sb_section = [id, elt["id"]]
145
- opts = action_name != 'show' ? html_opts.merge({"data-sb-id" => @sb_section.join('|'), "data-sb-repeat" => true, "data-sb-entity" => @sb_entity == @site ? 'site' : 'page'}) : html_opts
146
- content_tag(tag, capture(self, i, &block), opts)
147
- end).join('').html_safe
148
- end
149
-
150
142
  def elts(id)
151
143
  items = []
152
144
  element_id = elt_id(id)
@@ -16,6 +16,9 @@ module Sibu
16
16
  sections_list += Dir.glob(dir + "*.erb").map {|f| f.split('/').last}.
17
17
  map {|f| f[1..-1].gsub('.html.erb', '')}.map {|f| {"id" => "sibu_template_#{f}", "category" => cat, "template" => f}}
18
18
  end
19
+ if Rails.application.config.sibu[:sections_ordering]
20
+ sections_list = Rails.application.config.sibu[:sections_ordering].call(sections_list)
21
+ end
19
22
  sections_list
20
23
  end
21
24
  end
@@ -2,10 +2,10 @@
2
2
  <html>
3
3
  <head>
4
4
  <title><%= conf[:title] %></title>
5
- <%= stylesheet_link_tag "#{conf[:stylesheet]}-edit", media: 'all' %>
6
5
  <%= stylesheet_link_tag 'sibu/sibu', media: 'all' %>
7
- <%= javascript_include_tag "#{conf[:javascript]}-edit" %>
6
+ <%= stylesheet_link_tag "#{conf[:stylesheet]}-edit", media: 'all' %>
8
7
  <%= javascript_include_tag 'sibu/sibu' %>
8
+ <%= javascript_include_tag "#{conf[:javascript]}-edit" %>
9
9
  <% if @site %>
10
10
  <%= stylesheet_link_tag (conf[:custom_styles] ? @site.style_url : @site.site_template.path), media: "all" %>
11
11
  <%= javascript_include_tag "#{@site.site_template.path}-core" %>
data/lib/sibu/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.9.2'
2
+ VERSION = '0.9.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-30 00:00:00.000000000 Z
11
+ date: 2019-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails