sibu 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/app/helpers/sibu/pages_helper.rb +6 -0
- data/app/models/sibu/dynamic_style.rb +6 -0
- data/app/views/sibu/pages/edit_element.js.erb +2 -0
- data/app/views/sibu/pages/index.html.erb +1 -1
- data/lib/sibu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 934b9f613b81fb385ed73df2a1dfb63ce04b94da
|
4
|
+
data.tar.gz: a53c1e98face2342fadcd839c082b98695e49342
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1645cb2a37f41a54cba7a64a00f330da7d29b6966759f99fef3ac4eb0442841efcb58ab621cc88bfaac32a6a445a06f29756426734a96d8189f77b7063f688fd
|
7
|
+
data.tar.gz: 6777bfab052e0e700960124dda89d8e918e8890b49d634245a55028e1d954b00335dd61924b02bf9f8d458be9bfde39e36950b20be0785bd8a8f68ba0da1bc01
|
data/README.md
CHANGED
@@ -26,6 +26,11 @@ $ gem install sibu
|
|
26
26
|
- Use a specific controller & helper for site display
|
27
27
|
- Move page templates to SiteTemplate model
|
28
28
|
|
29
|
+
## Dependencies & inspiration
|
30
|
+
jQuery (for now)
|
31
|
+
Shrine
|
32
|
+
https://github.com/BLauris/custom-css-for-user (dynamic custom styles)
|
33
|
+
|
29
34
|
## Contributing
|
30
35
|
Contribution directions go here.
|
31
36
|
|
@@ -81,6 +81,12 @@ module Sibu
|
|
81
81
|
content_tag(wrapper, capture(self, &block), opts)
|
82
82
|
end
|
83
83
|
|
84
|
+
def widget(elt, widget_type, opts = {}, &block)
|
85
|
+
content = elt.is_a?(Hash) ? elt : (select_element(elt) || {})
|
86
|
+
opts.merge!({data: {id: elt_id(elt), type: "widget_#{widget_type.to_s.underscore}"}}) if action_name != 'show'
|
87
|
+
content_tag(:div, capture(widget_type.new(content), &block), opts)
|
88
|
+
end
|
89
|
+
|
84
90
|
# Note : see ActionView::OutputBuffer
|
85
91
|
def sb_page
|
86
92
|
@sb_entity = @page
|
@@ -40,6 +40,8 @@ editPanel.html("");
|
|
40
40
|
editPanel.html("<%= j(render 'group_edit_panel') %>");
|
41
41
|
<% when 'map' %>
|
42
42
|
editPanel.html("<%= j(render 'map_edit_panel') %>");
|
43
|
+
<% when /^widget/ %>
|
44
|
+
editPanel.html("<%= j(render "shared/sibu/#{@content_type}_panel") %>");
|
43
45
|
<% else %>
|
44
46
|
editPanel.html("<%= j(render 'error_panel') %>");
|
45
47
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div id="pages" class="sibu_view">
|
2
2
|
<div class="actions">
|
3
|
-
<%= link_to 'Créer une page', new_site_page_path(@site.id) %>
|
3
|
+
<%= link_to 'Créer une page', new_site_page_path(@site.id) %> <%= link_to 'Retour', :back %>
|
4
4
|
</div>
|
5
5
|
<h2>Pages du site "<%= @site.name %>"</h2>
|
6
6
|
<table>
|
data/lib/sibu/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.2
|
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: 2018-03-
|
11
|
+
date: 2018-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|