sibu 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/sibu/empty.png +0 -0
  3. data/app/assets/javascripts/cropper/cropper.js +3695 -0
  4. data/app/assets/javascripts/sibu/sibu.js.erb +25 -0
  5. data/app/assets/stylesheets/cropper/cropper.css +305 -0
  6. data/app/assets/stylesheets/sibu/sibu.css +1 -0
  7. data/app/controllers/sibu/application_controller.rb +4 -0
  8. data/app/controllers/sibu/images_controller.rb +7 -11
  9. data/app/controllers/sibu/pages_controller.rb +14 -4
  10. data/app/controllers/sibu/sites_controller.rb +13 -3
  11. data/app/helpers/sibu/application_helper.rb +4 -0
  12. data/app/helpers/sibu/pages_helper.rb +1 -9
  13. data/app/helpers/sibu/sites_helper.rb +8 -4
  14. data/app/models/concerns/sibu/image_uploader.rb +2 -2
  15. data/app/models/concerns/sibu/user_concern.rb +9 -0
  16. data/app/models/sibu/image.rb +12 -4
  17. data/app/models/sibu/page.rb +12 -1
  18. data/app/models/sibu/site.rb +19 -2
  19. data/app/views/sibu/images/_edit_form.html.erb +4 -4
  20. data/app/views/sibu/images/_form.html.erb +2 -2
  21. data/app/views/sibu/images/index.html.erb +3 -3
  22. data/app/views/sibu/images/new.html.erb +4 -0
  23. data/app/views/sibu/pages/_form.html.erb +0 -7
  24. data/app/views/sibu/pages/_media_edit_panel.html.erb +24 -12
  25. data/app/views/sibu/pages/edit_element.js.erb +54 -39
  26. data/app/views/sibu/pages/index.html.erb +1 -0
  27. data/app/views/sibu/pages/update_element.js.erb +1 -1
  28. data/app/views/sibu/sites/_form.html.erb +35 -13
  29. data/app/views/sibu/sites/edit.html.erb +1 -0
  30. data/app/views/sibu/sites/index.html.erb +4 -1
  31. data/config/routes.rb +4 -2
  32. data/db/migrate/20180321144021_move_images_to_user_level.rb +7 -0
  33. data/db/migrate/20180321170310_add_version_to_sibu_sites.rb +7 -0
  34. data/lib/sibu/version.rb +1 -1
  35. metadata +8 -3
  36. data/app/views/sibu/pages/_custom_styles.html.erb +0 -23
@@ -1,17 +1,17 @@
1
1
  <div class="sibu_image_preview">
2
2
  <%= image_tag @image.file_url(:medium) %>
3
3
  </div>
4
- <%= form_for([@site, @image]) do |f| %>
4
+ <%= form_for(@image) do |f| %>
5
5
  <div class="sibu_field">
6
6
  <%= f.label :alt, "Légende / texte alternatif" %>
7
7
  <div>
8
- <%= f.text_field :alt %>
8
+ <%= f.text_field :alt %><br/>
9
9
  <small>Renseignez un texte décrivant l'image</small>
10
10
  </div>
11
11
  </div>
12
- <%= f.hidden_field :site_id %>
12
+ <%= f.hidden_field :user_id %>
13
13
  <div class="sibu_actions">
14
14
  <%= f.submit 'Mettre à jour' %>
15
- <%= link_to 'Supprimer', site_image_path(@image.site_id, @image.id), method: :delete, data: {confirm: "Supprimer l'image ?", disable_with: "Suppression en cours..."} %>
15
+ <%= link_to 'Supprimer', image_path(@image.id), method: :delete, data: {confirm: "Supprimer l'image ?", disable_with: "Suppression en cours..."} %>
16
16
  </div>
17
17
  <% end %>
@@ -1,4 +1,4 @@
1
- <%= form_for([@site, @image]) do |f| %>
1
+ <%= form_for(@image) do |f| %>
2
2
  <div class="sibu_field">
3
3
  <%= f.label :file, "Sélection de l'image" %>
4
4
  <div>
@@ -14,7 +14,7 @@
14
14
  <small>Renseignez un texte décrivant l'image</small>
15
15
  </div>
16
16
  </div>
17
- <%= f.hidden_field :site_id %>
17
+ <%= f.hidden_field :user_id %>
18
18
  <%= hidden_field_tag :page_id, @page_id %>
19
19
  <%= hidden_field_tag :entity_type, @entity_type %>
20
20
  <%= hidden_field_tag :element_id, @element_id %>
@@ -1,11 +1,11 @@
1
1
  <div id="pages" class="sibu_view">
2
2
  <div class="actions">
3
- <%= link_to 'Télécharger une image', new_site_image_path(@site.id) %> <%= link_to 'Retour', :back %>
3
+ <%= link_to 'Télécharger une image', new_image_path %> <%= link_to 'Retour', :back %>
4
4
  </div>
5
- <h2>Images du site "<%= @site.name %>"</h2>
5
+ <h2>Images téléchargées</h2>
6
6
  <div class="sibu_images">
7
7
  <% @images.each do |image| %>
8
- <%= link_to image_tag(image.file_url(:small)), edit_site_image_path(@site.id, image.id), class: 'sibu_image', id: "sibu_image_#{image.id}", remote: true %>
8
+ <%= link_to image_tag(image.file_url(:small)), edit_image_path(image.id), class: 'sibu_image', id: "sibu_image_#{image.id}", remote: true %>
9
9
  <% end %>
10
10
  </div>
11
11
  <div class="sibu_edit_image">Sélectionnez une image pour voir ses informations.</div>
@@ -3,6 +3,10 @@
3
3
  <%= link_to 'Retour', :back %>
4
4
  </div>
5
5
  <h2>Télécharger une image</h2>
6
+ <p>
7
+ Pour un rendu optimal, nous vous conseillons d'utiliser des images ayant une résolution élevée (au moins 1600 pixels sur le bord le plus large).
8
+ Veillez également à ne télécharger que des visuels pour lesquels vous disposez des droits d'utilisation.
9
+ </p>
6
10
  <div class="sibu_form">
7
11
  <%= render 'form' %>
8
12
  </div>
@@ -13,13 +13,6 @@
13
13
  <small>L'adresse (ou URL) de la page, utilisée par les navigateurs web pour y accéder</small>
14
14
  </div>
15
15
  </div>
16
- <div class="sibu_field">
17
- <%= f.label :language, "Langue" %>
18
- <div>
19
- <%= f.select(:language, page_languages) %>
20
- <small>La langue d'affichage de la page</small>
21
- </div>
22
- </div>
23
16
  <div class="sibu_field">
24
17
  <%= f.label :title, 'Titre' %>
25
18
  <div>
@@ -3,22 +3,34 @@
3
3
  <%= render 'element_actions' %>
4
4
  <div class="sibu_edit_form">
5
5
  <%= form_tag(update_element_site_page_path(@site.id, @page.id), method: :patch, remote: true) do |f| %>
6
- <div class="sibu_select_images sibu_field">
7
- <p>Sélectionnez ou <%= link_to 'téléchargez', new_site_image_path(@site.id, page_id: @page.id, section_id: @section_id, entity_type: @entity_type,
8
- element_id: @element_id, img_id: @element["id"], size: @size) %> une image</p>
9
- <% site_images.each do |image| %>
10
- <div class="sibu_image" data-img-id="<%= image.id %>">
11
- <%= image_tag image.file_url(:small), class: (@element["src"] == image.file_url(@size) ? 'selected' : ''),
12
- data: {src: image.file_url(@size), alt: image.alt} %>
6
+ <div class="sibu_image_selection">
7
+ <div class="sibu_select_images sibu_field">
8
+ <p>Sélectionnez ou <%= link_to 'téléchargez', new_image_path(page_id: @page.id, section_id: @section_id, entity_type: @entity_type,
9
+ element_id: @element_id, img_id: @element["id"], size: @size) %> une image</p>
10
+ <% site_images.each_with_index do |image, i| %>
11
+ <div class="sibu_image" data-img-id="<%= image.id %>">
12
+ <% if i == 0 %><span>Aucune image</span><% end %>
13
+ <%= image_tag image.file_url(:small), class: (@element["src"] == image.file_url(@size) ? 'selected' : ''),
14
+ data: {src: image.file_url(@size), alt: image.alt} %>
15
+ </div>
16
+ <% end %>
17
+ </div>
18
+ <div class="sibu_selected_image">
19
+ <% if @element["src"] == DEFAULT_IMG || @element["src"].blank? %>
20
+ <p>Veuillez sélectionner une image.</p>
21
+ <% end %>
22
+ <div class="sibu_crop">
23
+ <%= image_tag(@element["src"]) unless @element["src"] == DEFAULT_IMG || @element["src"].blank? %>
24
+ </div>
25
+ <div class="sibu_field">
26
+ <%= label_tag 'element[alt]', 'Légende / texte alternatif' %>
27
+ <%= text_field_tag 'element[alt]', @element["alt"] %>
28
+ </div>
13
29
  </div>
14
- <% end %>
15
- </div>
16
- <div class="sibu_field">
17
- <%= label_tag 'element[alt]', 'Légende / texte alternatif' %>
18
- <%= text_field_tag 'element[alt]', @element["alt"] %>
19
30
  </div>
20
31
  <%= hidden_field_tag 'element[id]', @element["id"] %>
21
32
  <%= hidden_field_tag 'element[src]', @element["src"] %>
33
+ <%= hidden_field_tag 'element[style]', @element["style"] %>
22
34
  <%= hidden_field_tag :element_id, @element_id %>
23
35
  <%= hidden_field_tag :section_id, @section_id %>
24
36
  <%= hidden_field_tag :entity, @entity_type %>
@@ -5,37 +5,10 @@ editPanel.html("");
5
5
  editPanel.html("<%= j(render 'text_edit_panel') %>");
6
6
  <% when 'paragraph' %>
7
7
  editPanel.html("<%= j(render 'paragraph_edit_panel') %>");
8
- var quill = initQuillEditor('#editor-container');
9
- quill.root.innerHTML = "<%= j(raw(@element["text"] || 'Texte à modifier')) %>";
10
- quill.on('text-change', function() {
11
- $("#element_text").val(quill.root.innerHTML);
12
- });
13
- var wrapper = $("[data-sb-id='<%= @section_id %>']").find("[data-id='<%= @element_id %>']");
14
- editPanel.find(".ql-editor").css({
15
- "font-family": wrapper.css("font-family"),
16
- "font-size": wrapper.css("font-size"),
17
- "color": wrapper.css("color"),
18
- "text-align": wrapper.css("text-align")
19
- });
20
8
  <% when 'media' %>
21
9
  editPanel.html("<%= j(render 'media_edit_panel') %>");
22
- var images = editPanel.find(".sibu_image img");
23
- images.click(function() {
24
- if(!$(this).hasClass('selected')) {
25
- images.removeClass('selected');
26
- $(this).addClass('selected');
27
- $("#element_src").val($(this).data("src"));
28
- $("#element_alt").val($(this).data("alt"));
29
- }
30
- });
31
10
  <% when 'link' %>
32
11
  editPanel.html("<%= j(render 'link_edit_panel') %>");
33
- $("input[name='mode']").change(function() {
34
- var selected = $(this).val();
35
- var other = selected === 'internal' ? 'external' : 'internal';
36
- $("#link_" + selected).find("#element_value, #element_target").removeAttr("disabled");
37
- $("#link_" + other).find("#element_value, #element_target").attr("disabled", "disabled");
38
- });
39
12
  <% when 'group' %>
40
13
  editPanel.html("<%= j(render 'group_edit_panel') %>");
41
14
  <% when 'map' %>
@@ -46,17 +19,59 @@ editPanel.html("");
46
19
  editPanel.html("<%= j(render 'error_panel') %>");
47
20
  <% end %>
48
21
 
49
- <% if @repeat %>
50
- $("#clone_elt, #duplicate_elt").show();
51
- <% else %>
52
- $("#clone_elt, #duplicate_elt").remove();
53
- <% end %>
54
22
 
55
- <% if @children %>
56
- $("#child_elt").show();
57
- <% else %>
58
- $("#child_elt").remove();
59
- <% end %>
60
- editPanel.slideDown("fast");
23
+ editPanel.slideDown("fast", function() {
24
+ <% case @content_type %>
25
+ <% when 'paragraph' %>
26
+ var quill = initQuillEditor('#editor-container');
27
+ quill.root.innerHTML = "<%= j(raw(@element["text"] || 'Texte à modifier')) %>";
28
+ quill.on('text-change', function() {
29
+ $("#element_text").val(quill.root.innerHTML);
30
+ });
31
+ var wrapper = $("[data-sb-id='<%= @section_id %>']").find("[data-id='<%= @element_id %>']");
32
+ editPanel.find(".ql-editor").css({
33
+ "font-family": wrapper.css("font-family"),
34
+ "font-size": wrapper.css("font-size"),
35
+ "color": wrapper.css("color"),
36
+ "text-align": wrapper.css("text-align")
37
+ });
38
+ <% when 'media' %>
39
+ var images = editPanel.find(".sibu_image img");
40
+ images.click(function() {
41
+ if(!$(this).hasClass('selected')) {
42
+ images.removeClass('selected');
43
+ $(this).addClass('selected');
44
+ $("#element_src").val($(this).data("src"));
45
+ $("#element_alt").val($(this).data("alt"));
46
+ editPanel.find(".sibu_crop").html('<img src="' + $("#element_src").val() + '"/>');
47
+ editPanel.find(".sibu_selected_image > p:first-child").hide();
48
+ initCropper("<%= @element_id %>");
49
+ }
50
+ });
51
+ if(editPanel.find(".sibu_crop img").size() > 0) {
52
+ initCropper("<%= @element_id %>");
53
+ }
54
+ <% when 'link' %>
55
+ $("input[name='mode']").change(function() {
56
+ var selected = $(this).val();
57
+ var other = selected === 'internal' ? 'external' : 'internal';
58
+ $("#link_" + selected).find("#element_value, #element_target").removeAttr("disabled");
59
+ $("#link_" + other).find("#element_value, #element_target").attr("disabled", "disabled");
60
+ });
61
+ <% else %>
62
+ <% end %>
63
+
64
+ <% if @repeat %>
65
+ $("#clone_elt, #duplicate_elt").show();
66
+ <% else %>
67
+ $("#clone_elt, #duplicate_elt").remove();
68
+ <% end %>
69
+
70
+ <% if @children %>
71
+ $("#child_elt").show();
72
+ <% else %>
73
+ $("#child_elt").remove();
74
+ <% end %>
75
+ sibuCallback("editElement", "<%= @content_type %>");
76
+ });
61
77
  document.body.style.overflow = "hidden";
62
- sibuCallback("editElement", "<%= @content_type %>");
@@ -21,6 +21,7 @@
21
21
  <td colspan="2">
22
22
  <%= link_to 'Voir', site_page_path(@site.id, p), target: '_blank' %> |
23
23
  <%= link_to 'Modifier', site_page_edit_content_path(site_id: @site.id, page_id: p.id) %> |
24
+ <%= link_to 'Copier', duplicate_site_page_path(@site.id, p), method: :post, data: {confirm: "Copier la page \"#{p.name}\" ?"} %> |
24
25
  <%= link_to 'Paramétrer', edit_site_page_path(@site.id, p) %> |
25
26
  <%= link_to 'Supprimer', site_page_path(@site.id, p), method: :delete, data: {confirm: "Supprimer la page \"#{p.name}\" ?"} %>
26
27
  </td>
@@ -12,7 +12,7 @@
12
12
  <% unless @updated.except("id", "text", "value").blank? %>
13
13
  var tag = updatedElt.prop("tagName").toLowerCase();
14
14
  <% @updated.except("id", "text", "value").each_pair do |attr, val| %>
15
- if(("<%= attr %>" === 'src' || "<%= attr %>" === 'alt') && tag !== 'img') {
15
+ if(("<%= attr %>" === 'src' || "<%= attr %>" === 'alt' || "<%= attr %>" === 'style') && tag !== 'img') {
16
16
  updatedElt.find("img").attr("<%= attr %>", "<%= val %>");
17
17
  } else {
18
18
  updatedElt.attr("<%= attr %>", "<%= val %>");
@@ -20,6 +20,13 @@
20
20
  <small>Choisissez le gabarit qui servira de modèle pour votre site (non modifiable après création)</small>
21
21
  </div>
22
22
  </div>
23
+ <div class="sibu_field">
24
+ <%= f.label :version, 'Version' %>
25
+ <div>
26
+ <%= f.select :version, site_versions %>
27
+ <small>Langue du site</small>
28
+ </div>
29
+ </div>
23
30
  <div class="sibu_field">
24
31
  <%= f.label :analytics_id, "Statistiques d'audience" %>
25
32
  <div>
@@ -27,7 +34,7 @@
27
34
  <small>Renseignez l'identifiant Google Analytics pour suivre les statistiques d'audience du site</small>
28
35
  </div>
29
36
  </div>
30
- <% if @next_page %>
37
+ <% if @site.persisted? && @next_page %>
31
38
  <div class="sibu_field sibu_colors">
32
39
  <%= f.label :primary_color, 'Couleur principale' %>
33
40
  <div>
@@ -48,17 +55,17 @@
48
55
  </div>
49
56
  <%= f.hidden_field :secondary_color %>
50
57
  </div>
51
- <div class="sibu_field">
58
+ <div class="sibu_field sibu_fonts">
52
59
  <%= f.label :name, 'Police de caractères (titres)' %>
53
60
  <div>
54
- <%= f.select :primary_font, primary_fonts, {prompt: 'Police par défaut'} %>
61
+ <%= f.select :primary_font, primary_fonts %>
55
62
  <small>Police de caractère utilisée pour les titres du modèle choisi</small>
56
63
  </div>
57
64
  </div>
58
- <div class="sibu_field">
65
+ <div class="sibu_field sibu_fonts">
59
66
  <%= f.label :name, 'Police de caractères (corps)' %>
60
67
  <div>
61
- <%= f.select :secondary_font, secondary_fonts, {prompt: 'Police par défaut'} %>
68
+ <%= f.select :secondary_font, secondary_fonts %>
62
69
  <small>Police de caractère utilisée pour les corps de texte du modèle choisi</small>
63
70
  </div>
64
71
  </div>
@@ -77,15 +84,30 @@
77
84
  var colors = $(this).find(".sibu_color");
78
85
  var input = $(this).find("input");
79
86
  colors.click(function () {
80
- if($(this).hasClass('selected')) {
81
- $(this).removeClass("selected");
82
- input.val('');
83
- } else {
84
- colors.removeClass("selected");
85
- $(this).addClass('selected');
86
- input.val($(this).data("color"));
87
- }
87
+ selectColor($(this), colors, input);
88
88
  });
89
89
  });
90
+
91
+ function selectColor(color, colors, input) {
92
+ if(!color.hasClass('selected')) {
93
+ colors.removeClass("selected");
94
+ color.addClass('selected');
95
+ input.val(color.data("color"));
96
+ }
97
+ }
98
+
99
+ function resetValues() {
100
+ $(".sibu_colors").each(function () {
101
+ var colors = $(this).find(".sibu_color");
102
+ var defaultColor = colors.first();
103
+ var input = $(this).find("input");
104
+ selectColor(defaultColor, colors, input);
105
+ });
106
+ $(".sibu_fonts").each(function() {
107
+ var fonts = $(this).find("select");
108
+ var defaultValue = fonts.find("option").first().attr("value");
109
+ fonts.val(defaultValue).change();
110
+ });
111
+ }
90
112
  </script>
91
113
  <% end %>
@@ -1,5 +1,6 @@
1
1
  <div class="sibu_view">
2
2
  <div class="actions">
3
+ <% if @site.persisted? && @next_page %><%= link_to 'Rétablir les paramètres par défaut', '#', onclick: 'resetValues()' %><% end %>
3
4
  <%= link_to 'Retour', :back %>
4
5
  </div>
5
6
  <h2>Modifier un site</h2>
@@ -1,5 +1,6 @@
1
1
  <div class="sibu_view">
2
2
  <div class="actions">
3
+ <%= link_to "Bibliothèque d'images", images_path %>
3
4
  <%= link_to 'Créer un site', new_site_path %>
4
5
  </div>
5
6
  <h2>Liste des sites</h2>
@@ -8,6 +9,7 @@
8
9
  <tr>
9
10
  <th>Nom</th>
10
11
  <th>Modèle</th>
12
+ <th>Version</th>
11
13
  <th>Mise à jour</th>
12
14
  <th colspan="2"></th>
13
15
  </tr>
@@ -17,11 +19,12 @@
17
19
  <tr>
18
20
  <td><%= s.name %></td>
19
21
  <td><%= s.site_template.name if s.site_template %></td>
22
+ <td><%= s.version.upcase unless s.version.blank? %></td>
20
23
  <td><%= l s.updated_at %></td>
21
24
  <td colspan="2">
22
25
  <%= link_to 'Pages', site_pages_path(s) %> |
23
- <%= link_to 'Images', site_images_path(s) %> |
24
26
  <%= link_to 'Modifier', edit_site_path(s) %> |
27
+ <%= link_to 'Copier', duplicate_site_path(s), method: :post, data: {confirm: "Copier le site \"#{s.name}\" ?"} %> |
25
28
  <%= link_to 'Supprimer', site_path(s), method: :delete, data: {confirm: "Supprimer le site \"#{s.name}\" ?"} %>
26
29
  </td>
27
30
  </tr>
data/config/routes.rb CHANGED
@@ -5,7 +5,9 @@ Sibu::Engine.routes.draw do
5
5
 
6
6
  scope path_names: {new: 'creer', edit: 'modifier'} do
7
7
  resources :sites do
8
+ post 'duplicate', on: :member
8
9
  resources :pages do
10
+ post 'duplicate', on: :member
9
11
  get :edit_content, to: 'pages#edit_content', path: 'editer'
10
12
  get :edit_element, on: :member
11
13
  get :edit_section, on: :member
@@ -17,8 +19,8 @@ Sibu::Engine.routes.draw do
17
19
  post 'create_section', on: :member
18
20
  delete 'delete_section', on: :member
19
21
  end
20
-
21
- resources :images
22
22
  end
23
+
24
+ resources :images
23
25
  end
24
26
  end
@@ -0,0 +1,7 @@
1
+ class MoveImagesToUserLevel < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :sibu_images, :user_id, :integer
4
+ Sibu::Image.where("site_id IS NOT NULL").each {|img| img.update(user_id: img.site.user_id)}
5
+ remove_column :sibu_images, :site_id
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ class AddVersionToSibuSites < ActiveRecord::Migration[5.1]
2
+ def change
3
+ add_column :sibu_sites, :version, :string
4
+ Sibu::Site.update_all(version: 'fr')
5
+ remove_column :sibu_pages, :language
6
+ end
7
+ end
data/lib/sibu/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
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.2.5
4
+ version: 0.2.6
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-19 00:00:00.000000000 Z
11
+ date: 2018-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -124,9 +124,12 @@ files:
124
124
  - app/assets/fonts/sibu/Sibu.svg
125
125
  - app/assets/fonts/sibu/Sibu.ttf
126
126
  - app/assets/fonts/sibu/Sibu.woff
127
+ - app/assets/images/sibu/empty.png
128
+ - app/assets/javascripts/cropper/cropper.js
127
129
  - app/assets/javascripts/quill/quill.js
128
130
  - app/assets/javascripts/sibu/common.js
129
131
  - app/assets/javascripts/sibu/sibu.js.erb
132
+ - app/assets/stylesheets/cropper/cropper.css
130
133
  - app/assets/stylesheets/quill/quill.snow.css
131
134
  - app/assets/stylesheets/sibu/icons.scss
132
135
  - app/assets/stylesheets/sibu/sibu.css
@@ -143,6 +146,7 @@ files:
143
146
  - app/models/concerns/sibu/image_uploader.rb
144
147
  - app/models/concerns/sibu/sections_concern.rb
145
148
  - app/models/concerns/sibu/style_uploader.rb
149
+ - app/models/concerns/sibu/user_concern.rb
146
150
  - app/models/sibu/application_record.rb
147
151
  - app/models/sibu/dynamic_style.rb
148
152
  - app/models/sibu/image.rb
@@ -158,7 +162,6 @@ files:
158
162
  - app/views/sibu/images/index.html.erb
159
163
  - app/views/sibu/images/new.html.erb
160
164
  - app/views/sibu/images/show.html.erb
161
- - app/views/sibu/pages/_custom_styles.html.erb
162
165
  - app/views/sibu/pages/_element_actions.html.erb
163
166
  - app/views/sibu/pages/_error_panel.html.erb
164
167
  - app/views/sibu/pages/_form.html.erb
@@ -210,6 +213,8 @@ files:
210
213
  - db/migrate/20180227151519_add_default_templates_to_site_templates.rb
211
214
  - db/migrate/20180301121902_add_style_data_to_sites.rb
212
215
  - db/migrate/20180301152101_add_default_styles_to_templates.rb
216
+ - db/migrate/20180321144021_move_images_to_user_level.rb
217
+ - db/migrate/20180321170310_add_version_to_sibu_sites.rb
213
218
  - lib/sibu.rb
214
219
  - lib/sibu/engine.rb
215
220
  - lib/sibu/utils.rb
@@ -1,23 +0,0 @@
1
- <% content_for :styles do %>
2
- <style>
3
- <% unless @site.primary_color.blank? %>
4
- .sibu_site_content [class*='bg--primary'] {
5
- background-color: <%= @site.primary_color %> !important;
6
- }
7
-
8
- .sibu_site_content [class *='txt--primary'] {
9
- color: <%= @site.primary_color %> !important;
10
- }
11
- <% end %>
12
-
13
- <% unless @site.secondary_color.blank? %>
14
- .sibu_site_content [class*='bg--success'] {
15
- background-color: <%= @site.secondary_color %> !important;
16
- }
17
-
18
- .sibu_site_content [class *='txt--success'] {
19
- color: <%= @site.secondary_color %> !important;
20
- }
21
- <% end %>
22
- </style>
23
- <% end %>