sibu 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +20 -20
  3. data/README.md +38 -38
  4. data/Rakefile +36 -36
  5. data/app/assets/config/sibu_manifest.js +2 -2
  6. data/app/assets/fonts/sibu/Sibu.eot +0 -0
  7. data/app/assets/fonts/sibu/Sibu.svg +13 -13
  8. data/app/assets/fonts/sibu/Sibu.ttf +0 -0
  9. data/app/assets/fonts/sibu/Sibu.woff +0 -0
  10. data/app/assets/javascripts/cropper/cropper.js +3694 -3694
  11. data/app/assets/javascripts/quill/quill.js +11401 -11401
  12. data/app/assets/javascripts/sibu/common.js +6 -6
  13. data/app/assets/javascripts/sibu/sibu.js.erb +155 -155
  14. data/app/assets/javascripts/tabs/van11y-accessible-tab-panel-aria.js +465 -465
  15. data/app/assets/stylesheets/cropper/cropper.css +304 -304
  16. data/app/assets/stylesheets/quill/quill.snow.css +945 -945
  17. data/app/assets/stylesheets/sibu/defaults.scss +336 -331
  18. data/app/assets/stylesheets/sibu/icons.scss +40 -40
  19. data/app/assets/stylesheets/sibu/sibu.css +131 -131
  20. data/app/controllers/sibu/application_controller.rb +14 -14
  21. data/app/controllers/sibu/documents_controller.rb +35 -35
  22. data/app/controllers/sibu/images_controller.rb +78 -78
  23. data/app/controllers/sibu/pages_controller.rb +197 -197
  24. data/app/controllers/sibu/sites_controller.rb +81 -81
  25. data/app/helpers/sibu/application_helper.rb +11 -11
  26. data/app/helpers/sibu/documents_helper.rb +4 -4
  27. data/app/helpers/sibu/images_helper.rb +4 -4
  28. data/app/helpers/sibu/pages_helper.rb +194 -194
  29. data/app/helpers/sibu/sites_helper.rb +23 -23
  30. data/app/jobs/sibu/application_job.rb +4 -4
  31. data/app/mailers/sibu/application_mailer.rb +6 -6
  32. data/app/models/concerns/sibu/document_uploader.rb +8 -8
  33. data/app/models/concerns/sibu/image_uploader.rb +31 -31
  34. data/app/models/concerns/sibu/sections_concern.rb +134 -134
  35. data/app/models/concerns/sibu/style_uploader.rb +1 -1
  36. data/app/models/concerns/sibu/user_concern.rb +8 -8
  37. data/app/models/sibu/application_record.rb +5 -5
  38. data/app/models/sibu/document.rb +16 -16
  39. data/app/models/sibu/dynamic_style.rb +76 -76
  40. data/app/models/sibu/image.rb +19 -19
  41. data/app/models/sibu/page.rb +66 -66
  42. data/app/models/sibu/site.rb +97 -97
  43. data/app/models/sibu/site_template.rb +22 -22
  44. data/app/views/layouts/sibu/application.html.erb +23 -23
  45. data/app/views/layouts/sibu/edit_content.html.erb +262 -262
  46. data/app/views/layouts/sibu/site.html.erb +45 -45
  47. data/app/views/sibu/documents/_form.html.erb +14 -14
  48. data/app/views/sibu/documents/index.html.erb +37 -37
  49. data/app/views/sibu/documents/new.html.erb +12 -12
  50. data/app/views/sibu/images/_edit_form.html.erb +23 -23
  51. data/app/views/sibu/images/_form.html.erb +34 -34
  52. data/app/views/sibu/images/edit.js.erb +2 -2
  53. data/app/views/sibu/images/index.html.erb +13 -13
  54. data/app/views/sibu/images/new.html.erb +12 -12
  55. data/app/views/sibu/images/show.html.erb +2 -2
  56. data/app/views/sibu/pages/_code_edit_panel.html.erb +17 -17
  57. data/app/views/sibu/pages/_element_actions.html.erb +4 -4
  58. data/app/views/sibu/pages/_error_panel.html.erb +4 -4
  59. data/app/views/sibu/pages/_form.html.erb +62 -62
  60. data/app/views/sibu/pages/_group_edit_panel.html.erb +3 -3
  61. data/app/views/sibu/pages/_link_edit_panel.html.erb +50 -50
  62. data/app/views/sibu/pages/_map_edit_panel.html.erb +27 -27
  63. data/app/views/sibu/pages/_media_edit_panel.html.erb +46 -46
  64. data/app/views/sibu/pages/_new_section_panel.html.erb +43 -43
  65. data/app/views/sibu/pages/_paragraph_edit_panel.html.erb +18 -18
  66. data/app/views/sibu/pages/_text_edit_panel.html.erb +19 -19
  67. data/app/views/sibu/pages/child_element.js.erb +6 -6
  68. data/app/views/sibu/pages/clone_element.js.erb +6 -6
  69. data/app/views/sibu/pages/create_section.js.erb +6 -6
  70. data/app/views/sibu/pages/delete_element.js.erb +6 -6
  71. data/app/views/sibu/pages/delete_section.js.erb +6 -6
  72. data/app/views/sibu/pages/destroy.html.erb +2 -2
  73. data/app/views/sibu/pages/edit.html.erb +8 -8
  74. data/app/views/sibu/pages/edit_content.html.erb +3 -3
  75. data/app/views/sibu/pages/edit_element.js.erb +100 -100
  76. data/app/views/sibu/pages/edit_section.js.erb +7 -7
  77. data/app/views/sibu/pages/index.html.erb +40 -40
  78. data/app/views/sibu/pages/new.html.erb +8 -8
  79. data/app/views/sibu/pages/new_section.js.erb +19 -19
  80. data/app/views/sibu/pages/show.html.erb +3 -3
  81. data/app/views/sibu/pages/update.html.erb +2 -2
  82. data/app/views/sibu/pages/update_element.js.erb +5 -5
  83. data/app/views/sibu/pages/update_section.js.erb +5 -5
  84. data/app/views/sibu/sites/_form.html.erb +125 -125
  85. data/app/views/sibu/sites/destroy.html.erb +2 -2
  86. data/app/views/sibu/sites/edit.html.erb +9 -9
  87. data/app/views/sibu/sites/edit_styles.html.erb +8 -8
  88. data/app/views/sibu/sites/index.html.erb +41 -41
  89. data/app/views/sibu/sites/new.html.erb +18 -18
  90. data/app/views/sibu/sites/update.html.erb +2 -2
  91. data/config/initializers/constants.rb +2 -2
  92. data/config/initializers/shrine.rb +18 -18
  93. data/config/routes.rb +30 -30
  94. data/config/tinymce.yml +5 -5
  95. data/db/migrate/20180124095041_create_sibu_sites.rb +12 -12
  96. data/db/migrate/20180124095213_create_sibu_pages.rb +15 -15
  97. data/db/migrate/20180124145030_create_sibu_site_templates.rb +10 -10
  98. data/db/migrate/20180125231638_add_user_id_to_sites.rb +5 -5
  99. data/db/migrate/20180126114522_rename_url_to_path_in_pages.rb +5 -5
  100. data/db/migrate/20180126114628_add_domain_to_sites.rb +5 -5
  101. data/db/migrate/20180127211533_create_sibu_images.rb +11 -11
  102. data/db/migrate/20180208082317_rename_images_user_id_to_site_id.rb +5 -5
  103. data/db/migrate/20180208125024_rename_image_data_column.rb +5 -5
  104. data/db/migrate/20180210181644_add_defaults_to_site_templates.rb +6 -6
  105. data/db/migrate/20180214134653_add_fields_to_sites.rb +5 -5
  106. data/db/migrate/20180227151519_add_default_templates_to_site_templates.rb +5 -5
  107. data/db/migrate/20180301121902_add_style_data_to_sites.rb +5 -5
  108. data/db/migrate/20180301152101_add_default_styles_to_templates.rb +5 -5
  109. data/db/migrate/20180321144021_move_images_to_user_level.rb +7 -7
  110. data/db/migrate/20180321170310_add_version_to_sibu_sites.rb +7 -7
  111. data/db/migrate/20180405095448_create_sibu_documents.rb +10 -10
  112. data/db/migrate/20190110204854_add_custom_data_to_sibu_pages.rb +5 -5
  113. data/lib/sibu.rb +4 -4
  114. data/lib/sibu/engine.rb +19 -19
  115. data/lib/sibu/utils.rb +14 -14
  116. data/lib/sibu/version.rb +3 -3
  117. data/lib/tasks/sibu_tasks.rake +4 -4
  118. metadata +3 -3
@@ -1,45 +1,45 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title><%= @page ? @page.title : 'Page inconnue' %></title>
5
- <meta charset="UTF-8">
6
- <meta name="description" content="<%= @page.description if @page %>">
7
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
-
9
- <% if @site %>
10
- <%= stylesheet_link_tag (conf[:custom_styles] ? @site.style_url : @site.site_template.path), media: "all" %>
11
- <%= javascript_include_tag @site.site_template.path %>
12
- <% unless @site.analytics_id.blank? %>
13
- <script async src="https://www.googletagmanager.com/gtag/js?id=<%= @site.analytics_id %>"></script>
14
- <script>
15
- window.dataLayer = window.dataLayer || [];
16
- function gtag(){dataLayer.push(arguments);}
17
- gtag('js', new Date());
18
- gtag('config', '<%= @site.analytics_id %>');
19
- </script>
20
- <% end %>
21
- <% end %>
22
- <%= csrf_meta_tags %>
23
- <% if @site && !@site.header_code.blank? %>
24
- <%= raw @site.header_code %>
25
- <% end %>
26
- <% if @page && !@page.header_code.blank? %>
27
- <%= raw @page.header_code %>
28
- <% end %>
29
- <%= yield :included_styles %>
30
- <%= yield :included_scripts %>
31
- </head>
32
- <body>
33
-
34
- <%= yield %>
35
-
36
- <%= yield :page_scripts %>
37
- <%= yield :site_scripts %>
38
- <% if @page && !@page.footer_code.blank? %>
39
- <%= raw @page.footer_code %>
40
- <% end %>
41
- <% if @site && !@site.footer_code.blank? %>
42
- <%= raw @site.footer_code %>
43
- <% end %>
44
- </body>
45
- </html>
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= @page ? @page.title : 'Page inconnue' %></title>
5
+ <meta charset="UTF-8">
6
+ <meta name="description" content="<%= @page.description if @page %>">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+
9
+ <% if @site %>
10
+ <%= stylesheet_link_tag (conf[:custom_styles] ? @site.style_url : @site.site_template.path), media: "all" %>
11
+ <%= javascript_include_tag @site.site_template.path %>
12
+ <% unless @site.analytics_id.blank? %>
13
+ <script async src="https://www.googletagmanager.com/gtag/js?id=<%= @site.analytics_id %>"></script>
14
+ <script>
15
+ window.dataLayer = window.dataLayer || [];
16
+ function gtag(){dataLayer.push(arguments);}
17
+ gtag('js', new Date());
18
+ gtag('config', '<%= @site.analytics_id %>');
19
+ </script>
20
+ <% end %>
21
+ <% end %>
22
+ <%= csrf_meta_tags %>
23
+ <% if @site && !@site.header_code.blank? %>
24
+ <%= raw @site.header_code %>
25
+ <% end %>
26
+ <% if @page && !@page.header_code.blank? %>
27
+ <%= raw @page.header_code %>
28
+ <% end %>
29
+ <%= yield :included_styles %>
30
+ <%= yield :included_scripts %>
31
+ </head>
32
+ <body>
33
+
34
+ <%= yield %>
35
+
36
+ <%= yield :page_scripts %>
37
+ <%= yield :site_scripts %>
38
+ <% if @page && !@page.footer_code.blank? %>
39
+ <%= raw @page.footer_code %>
40
+ <% end %>
41
+ <% if @site && !@site.footer_code.blank? %>
42
+ <%= raw @site.footer_code %>
43
+ <% end %>
44
+ </body>
45
+ </html>
@@ -1,15 +1,15 @@
1
- <%= form_for(@document) do |f| %>
2
- <div class="sibu_field">
3
- <%= f.label :file, "Sélection du document" %>
4
- <div>
5
- <%= f.hidden_field :file, value: @document.cached_file_data %>
6
- <%= f.file_field :file %>
7
- <small>Sélectionnez un document à télécharger depuis votre ordinateur</small>
8
- </div>
9
- </div>
10
- <%= f.hidden_field :user_id %>
11
- <div class="sibu_actions">
12
- <%= f.submit 'Valider', data: {disable_with: "Téléchargement du document en cours..."} %>
13
- <%= link_to 'Annuler', :back %>
14
- </div>
1
+ <%= form_for(@document) do |f| %>
2
+ <div class="sibu_field">
3
+ <%= f.label :file, "Sélection du document" %>
4
+ <div>
5
+ <%= f.hidden_field :file, value: @document.cached_file_data %>
6
+ <%= f.file_field :file %>
7
+ <small>Sélectionnez un document à télécharger depuis votre ordinateur</small>
8
+ </div>
9
+ </div>
10
+ <%= f.hidden_field :user_id %>
11
+ <div class="sibu_actions">
12
+ <%= f.submit 'Valider', data: {disable_with: "Téléchargement du document en cours..."} %>
13
+ <%= link_to 'Annuler', :back %>
14
+ </div>
15
15
  <% end %>
@@ -1,37 +1,37 @@
1
- <div class="sibu_view">
2
- <div class="actions">
3
- <%= link_to 'Télécharger un document', new_document_path %> <%= link_to 'Retour', :back %>
4
- </div>
5
- <h2>Documents téléchargés</h2>
6
- <table class="sibu_documents">
7
- <thead>
8
- <tr>
9
- <th>Nom</th>
10
- <th>Taille</th>
11
- <th>Mise à jour</th>
12
- <th>Chemin d'accès (URL)</th>
13
- <th></th>
14
- </tr>
15
- </thead>
16
- <tbody>
17
- <% @documents.each do |doc| %>
18
- <tr>
19
- <td><%= doc.file_name %></td>
20
- <td><%= doc.metadata[:size] > (1024 * 1024) ? "#{doc.metadata[:size] / (1024 * 1024)} Mo" : "#{doc.metadata[:size] / 1024} Ko" %></td>
21
- <td><%= l doc.updated_at %></td>
22
- <td><%= doc.file_url %></td>
23
- <td>
24
- <%= link_to 'Voir', doc.file_url, target: '_blank' %> |
25
- <%= link_to('Supprimer', document_path(doc), method: :delete, data: {confirm: "Supprimer le document \"#{doc.file_name}\" ?"}) if doc.user_id %>
26
- </td>
27
- </tr>
28
- <% end %>
29
- <% if @documents.empty? %>
30
- <tr>
31
- <td colspan="5">Aucun document téléchargé pour le moment.</td>
32
- </tr>
33
- <% end %>
34
- </tbody>
35
- </table>
36
- </div>
37
-
1
+ <div class="sibu_view">
2
+ <div class="actions">
3
+ <%= link_to 'Télécharger un document', new_document_path %> <%= link_to 'Retour', :back %>
4
+ </div>
5
+ <h2>Documents téléchargés</h2>
6
+ <table class="sibu_documents">
7
+ <thead>
8
+ <tr>
9
+ <th>Nom</th>
10
+ <th>Taille</th>
11
+ <th>Mise à jour</th>
12
+ <th>Chemin d'accès (URL)</th>
13
+ <th></th>
14
+ </tr>
15
+ </thead>
16
+ <tbody>
17
+ <% @documents.each do |doc| %>
18
+ <tr>
19
+ <td><%= doc.file_name %></td>
20
+ <td><%= doc.metadata[:size] > (1024 * 1024) ? "#{doc.metadata[:size] / (1024 * 1024)} Mo" : "#{doc.metadata[:size] / 1024} Ko" %></td>
21
+ <td><%= l doc.updated_at %></td>
22
+ <td><%= doc.file_url %></td>
23
+ <td>
24
+ <%= link_to 'Voir', doc.file_url, target: '_blank' %> |
25
+ <%= link_to('Supprimer', document_path(doc), method: :delete, data: {confirm: "Supprimer le document \"#{doc.file_name}\" ?"}) if doc.user_id %>
26
+ </td>
27
+ </tr>
28
+ <% end %>
29
+ <% if @documents.empty? %>
30
+ <tr>
31
+ <td colspan="5">Aucun document téléchargé pour le moment.</td>
32
+ </tr>
33
+ <% end %>
34
+ </tbody>
35
+ </table>
36
+ </div>
37
+
@@ -1,13 +1,13 @@
1
- <div class="sibu_view">
2
- <div class="actions">
3
- <%= link_to 'Retour', :back %>
4
- </div>
5
- <h2>Télécharger un document</h2>
6
- <p>
7
- Vous pouvez télécharger tous types de documents d'une taille inférieure à <%= Rails.application.config.sibu[:max_doc_size] || 10 %>Mo.
8
- Pour les documents textes, favorisez le format PDF pour une compatibilité optimale.
9
- </p>
10
- <div class="sibu_form">
11
- <%= render 'form' %>
12
- </div>
1
+ <div class="sibu_view">
2
+ <div class="actions">
3
+ <%= link_to 'Retour', :back %>
4
+ </div>
5
+ <h2>Télécharger un document</h2>
6
+ <p>
7
+ Vous pouvez télécharger tous types de documents d'une taille inférieure à <%= Rails.application.config.sibu[:max_doc_size] || 10 %>Mo.
8
+ Pour les documents textes, favorisez le format PDF pour une compatibilité optimale.
9
+ </p>
10
+ <div class="sibu_form">
11
+ <%= render 'form' %>
12
+ </div>
13
13
  </div>
@@ -1,24 +1,24 @@
1
- <div class="sibu_image_preview">
2
- <%= image_tag @image.file_url(:medium) %>
3
- </div>
4
- <%= form_for(@image) do |f| %>
5
- <div class="sibu_field">
6
- <%= f.label :alt, "Légende / texte alternatif" %>
7
- <div>
8
- <%= f.text_field :alt %><br/>
9
- <small>Renseignez un texte décrivant l'image</small>
10
- </div>
11
- </div>
12
- <div class="sibu_field">
13
- <%= f.label :credits, "Crédits" %>
14
- <div>
15
- <%= f.text_field :credits %><br/>
16
- <small>Crédits, copyright...</small>
17
- </div>
18
- </div>
19
- <%= f.hidden_field :user_id %>
20
- <div class="sibu_actions">
21
- <%= f.submit 'Mettre à jour' %>
22
- <%= link_to 'Supprimer', image_path(@image.id), method: :delete, data: {confirm: "Supprimer l'image ?", disable_with: "Suppression en cours..."} %>
23
- </div>
1
+ <div class="sibu_image_preview">
2
+ <%= image_tag @image.file_url(:medium) %>
3
+ </div>
4
+ <%= form_for(@image) do |f| %>
5
+ <div class="sibu_field">
6
+ <%= f.label :alt, "Légende / texte alternatif" %>
7
+ <div>
8
+ <%= f.text_field :alt %><br/>
9
+ <small>Renseignez un texte décrivant l'image</small>
10
+ </div>
11
+ </div>
12
+ <div class="sibu_field">
13
+ <%= f.label :credits, "Crédits" %>
14
+ <div>
15
+ <%= f.text_field :credits %><br/>
16
+ <small>Crédits, copyright...</small>
17
+ </div>
18
+ </div>
19
+ <%= f.hidden_field :user_id %>
20
+ <div class="sibu_actions">
21
+ <%= f.submit 'Mettre à jour' %>
22
+ <%= link_to 'Supprimer', image_path(@image.id), method: :delete, data: {confirm: "Supprimer l'image ?", disable_with: "Suppression en cours..."} %>
23
+ </div>
24
24
  <% end %>
@@ -1,35 +1,35 @@
1
- <%= form_for(@image) do |f| %>
2
- <div class="sibu_field">
3
- <%= f.label :file, "Sélection de l'image" %>
4
- <div>
5
- <%= f.hidden_field :file, value: @image.cached_file_data %>
6
- <%= f.file_field :file %>
7
- <small>Sélectionnez une image à télécharger depuis votre ordinateur</small>
8
- </div>
9
- </div>
10
- <div class="sibu_field">
11
- <%= f.label :alt, "Légende / texte alternatif" %>
12
- <div>
13
- <%= f.text_field :alt %>
14
- <small>Renseignez un texte décrivant l'image</small>
15
- </div>
16
- </div>
17
- <div class="sibu_field">
18
- <%= f.label :credits, "Crédits" %>
19
- <div>
20
- <%= f.text_field :credits %><br/>
21
- <small>Crédits, copyright...</small>
22
- </div>
23
- </div>
24
- <%= f.hidden_field :user_id %>
25
- <%= hidden_field_tag :page_id, @page_id %>
26
- <%= hidden_field_tag :entity_type, @entity_type %>
27
- <%= hidden_field_tag :element_id, @element_id %>
28
- <%= hidden_field_tag :section_id, @section_id %>
29
- <%= hidden_field_tag :img_id, @img_id %>
30
- <%= hidden_field_tag :size, @size %>
31
- <div class="sibu_actions">
32
- <%= f.submit 'Valider', data: {disable_with: "Téléchargement de l'image en cours..."} %>
33
- <%= link_to 'Annuler', :back %>
34
- </div>
1
+ <%= form_for(@image) do |f| %>
2
+ <div class="sibu_field">
3
+ <%= f.label :file, "Sélection de l'image" %>
4
+ <div>
5
+ <%= f.hidden_field :file, value: @image.cached_file_data %>
6
+ <%= f.file_field :file %>
7
+ <small>Sélectionnez une image à télécharger depuis votre ordinateur</small>
8
+ </div>
9
+ </div>
10
+ <div class="sibu_field">
11
+ <%= f.label :alt, "Légende / texte alternatif" %>
12
+ <div>
13
+ <%= f.text_field :alt %>
14
+ <small>Renseignez un texte décrivant l'image</small>
15
+ </div>
16
+ </div>
17
+ <div class="sibu_field">
18
+ <%= f.label :credits, "Crédits" %>
19
+ <div>
20
+ <%= f.text_field :credits %><br/>
21
+ <small>Crédits, copyright...</small>
22
+ </div>
23
+ </div>
24
+ <%= f.hidden_field :user_id %>
25
+ <%= hidden_field_tag :page_id, @page_id %>
26
+ <%= hidden_field_tag :entity_type, @entity_type %>
27
+ <%= hidden_field_tag :element_id, @element_id %>
28
+ <%= hidden_field_tag :section_id, @section_id %>
29
+ <%= hidden_field_tag :img_id, @img_id %>
30
+ <%= hidden_field_tag :size, @size %>
31
+ <div class="sibu_actions">
32
+ <%= f.submit 'Valider', data: {disable_with: "Téléchargement de l'image en cours..."} %>
33
+ <%= link_to 'Annuler', :back %>
34
+ </div>
35
35
  <% end %>
@@ -1,3 +1,3 @@
1
- $(".sibu_edit_image").html("<%= j(render 'edit_form') %>");
2
- $(".sibu_image").removeClass("selected");
1
+ $(".sibu_edit_image").html("<%= j(render 'edit_form') %>");
2
+ $(".sibu_image").removeClass("selected");
3
3
  $("<%= "#sibu_image_#{@image.id}" %>").addClass("selected");
@@ -1,13 +1,13 @@
1
- <div class="sibu_view">
2
- <div class="actions">
3
- <%= link_to 'Télécharger une image', new_image_path %> <%= link_to 'Retour', :back %>
4
- </div>
5
- <h2>Images téléchargées</h2>
6
- <div class="sibu_images">
7
- <% @images.each do |image| %>
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
- <% end %>
10
- </div>
11
- <div class="sibu_edit_image">Sélectionnez une image pour voir ses informations.</div>
12
- </div>
13
-
1
+ <div class="sibu_view">
2
+ <div class="actions">
3
+ <%= link_to 'Télécharger une image', new_image_path %> <%= link_to 'Retour', :back %>
4
+ </div>
5
+ <h2>Images téléchargées</h2>
6
+ <div class="sibu_images">
7
+ <% @images.each do |image| %>
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
+ <% end %>
10
+ </div>
11
+ <div class="sibu_edit_image">Sélectionnez une image pour voir ses informations.</div>
12
+ </div>
13
+
@@ -1,13 +1,13 @@
1
- <div class="sibu_view">
2
- <div class="actions">
3
- <%= link_to 'Retour', :back %>
4
- </div>
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>
10
- <div class="sibu_form">
11
- <%= render 'form' %>
12
- </div>
1
+ <div class="sibu_view">
2
+ <div class="actions">
3
+ <%= link_to 'Retour', :back %>
4
+ </div>
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>
10
+ <div class="sibu_form">
11
+ <%= render 'form' %>
12
+ </div>
13
13
  </div>
@@ -1,2 +1,2 @@
1
- <h1>Images#show</h1>
2
- <p>Find me in app/views/sibu/images/show.html.erb</p>
1
+ <h1>Images#show</h1>
2
+ <p>Find me in app/views/sibu/images/show.html.erb</p>
@@ -1,18 +1,18 @@
1
- <h2>Modifier le contenu</h2>
2
- <div id="edit_msg"></div>
3
- <div class="sibu_edit_form">
4
- <%= form_tag(update_element_site_page_path(@site.id, @page.id), method: :patch, remote: true) do |f| %>
5
- <div class="sibu_field">
6
- <%= label_tag 'element[code]', "Code d'intégration du contenu" %>
7
- <%= text_area_tag 'element[code]', @element["code"], placeholder: ' ex: <iframe src="..."></iframe>' %>
8
- </div>
9
- <%= hidden_field_tag 'element[id]', @element["id"] %>
10
- <%= hidden_field_tag :element_id, @element_id %>
11
- <%= hidden_field_tag :section_id, @section_id %>
12
- <%= hidden_field_tag :entity, @entity_type %>
13
- <div class="sibu_actions">
14
- <%= submit_tag 'Valider' %>
15
- <%= link_to 'Annuler', '#', onclick: 'cancelEdit(); return false;' %>
16
- </div>
17
- <% end %>
1
+ <h2>Modifier le contenu</h2>
2
+ <div id="edit_msg"></div>
3
+ <div class="sibu_edit_form">
4
+ <%= form_tag(update_element_site_page_path(@site.id, @page.id), method: :patch, remote: true) do |f| %>
5
+ <div class="sibu_field">
6
+ <%= label_tag 'element[code]', "Code d'intégration du contenu" %>
7
+ <%= text_area_tag 'element[code]', @element["code"], placeholder: ' ex: <iframe src="..."></iframe>' %>
8
+ </div>
9
+ <%= hidden_field_tag 'element[id]', @element["id"] %>
10
+ <%= hidden_field_tag :element_id, @element_id %>
11
+ <%= hidden_field_tag :section_id, @section_id %>
12
+ <%= hidden_field_tag :entity, @entity_type %>
13
+ <div class="sibu_actions">
14
+ <%= submit_tag 'Valider' %>
15
+ <%= link_to 'Annuler', '#', onclick: 'cancelEdit(); return false;' %>
16
+ </div>
17
+ <% end %>
18
18
  </div>
@@ -1,5 +1,5 @@
1
- <div id="element_actions">
2
- <button id="clone_elt" onclick="cloneElement('<%= @entity_type %>', '<%= @section_id %>', '<%= @element_id %>')">Dupliquer</button>
3
- <button id="duplicate_elt" onclick="deleteElement('<%= @entity_type %>', '<%= @section_id %>', '<%= @element_id %>')">Supprimer</button>
4
- <button id="child_elt" onclick="addChildElement('<%= @entity_type %>', '<%= @section_id %>', '<%= @element_id %>')">Ajouter un sous-menu</button>
1
+ <div id="element_actions">
2
+ <button id="clone_elt" onclick="cloneElement('<%= @entity_type %>', '<%= @section_id %>', '<%= @element_id %>')">Dupliquer</button>
3
+ <button id="duplicate_elt" onclick="deleteElement('<%= @entity_type %>', '<%= @section_id %>', '<%= @element_id %>')">Supprimer</button>
4
+ <button id="child_elt" onclick="addChildElement('<%= @entity_type %>', '<%= @section_id %>', '<%= @element_id %>')">Ajouter un sous-menu</button>
5
5
  </div>