sibu 0.8.1 → 0.8.2

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.
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 -336
  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 +10 -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 +31 -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,9 +1,9 @@
1
- <div class="sibu_view">
2
- <div class="actions">
3
- <%= link_to 'Retour', :back %>
4
- </div>
5
- <h2>Créer une page</h2>
6
- <div class="sibu_form">
7
- <%= render 'form' %>
8
- </div>
1
+ <div class="sibu_view">
2
+ <div class="actions">
3
+ <%= link_to 'Retour', :back %>
4
+ </div>
5
+ <h2>Créer une page</h2>
6
+ <div class="sibu_form">
7
+ <%= render 'form' %>
8
+ </div>
9
9
  </div>
@@ -1,19 +1,19 @@
1
- var sectionsPanel = $("#sections_panel");
2
- if (sectionsPanel.size()) {
3
- sectionsPanel.html("<%= j(render 'new_section_panel') %>");
4
- van11yAccessibleTabPanelAria($(".sibu_sections_tabs")[0]);
5
- var sections = sectionsPanel.find(".sibu_sections [data-sb-template]");
6
- sections.click(function() {
7
- if(!$(this).hasClass('selected')) {
8
- sections.removeClass('selected');
9
- $(this).addClass('selected');
10
- $("#section_template").val($(this).data("sb-template"));
11
- $("#section_category").val($(this).data("sb-category"));
12
- }
13
- });
14
- if(typeof initSectionsForm === "function") {
15
- initSectionsForm();
16
- }
17
- document.body.style.overflow = "hidden";
18
- sibuCallback("newSection");
19
- }
1
+ var sectionsPanel = $("#sections_panel");
2
+ if (sectionsPanel.size()) {
3
+ sectionsPanel.html("<%= j(render 'new_section_panel') %>");
4
+ van11yAccessibleTabPanelAria($(".sibu_sections_tabs")[0]);
5
+ var sections = sectionsPanel.find(".sibu_sections [data-sb-template]");
6
+ sections.click(function() {
7
+ if(!$(this).hasClass('selected')) {
8
+ sections.removeClass('selected');
9
+ $(this).addClass('selected');
10
+ $("#section_template").val($(this).data("sb-template"));
11
+ $("#section_category").val($(this).data("sb-category"));
12
+ }
13
+ });
14
+ if(typeof initSectionsForm === "function") {
15
+ initSectionsForm();
16
+ }
17
+ document.body.style.overflow = "hidden";
18
+ sibuCallback("newSection");
19
+ }
@@ -1,3 +1,3 @@
1
- <div class="sibu_site_content">
2
- <%= render "shared/#{@site.site_template.path}/site" %>
3
- </div>
1
+ <div class="sibu_site_content">
2
+ <%= render "shared/#{@site.site_template.path}/site" %>
3
+ </div>
@@ -1,2 +1,2 @@
1
- <h1>Pages#update</h1>
2
- <p>Find me in app/views/sibu/pages/update.html.erb</p>
1
+ <h1>Pages#update</h1>
2
+ <p>Find me in app/views/sibu/pages/update.html.erb</p>
@@ -1,6 +1,6 @@
1
- <% if @updated.nil? %>
2
- $("#edit_panel #edit_msg").html("<p class='sibu_alert'>Une erreur s'est produite lors de l'enregistrement.</p>");
3
- <% else %>
4
- $("#edit_panel").slideUp();
5
- refreshAfterEdit(true, '<%= @section_id %>');
1
+ <% if @updated.nil? %>
2
+ $("#edit_panel #edit_msg").html("<p class='sibu_alert'>Une erreur s'est produite lors de l'enregistrement.</p>");
3
+ <% else %>
4
+ $("#edit_panel").slideUp();
5
+ refreshAfterEdit(true, '<%= @section_id %>');
6
6
  <% end %>
@@ -1,6 +1,6 @@
1
- <% if @updated %>
2
- $("#edit_panel").slideUp();
3
- refreshAfterEdit(true, '<%= @section_id %>');
4
- <% else %>
5
- $("#edit_panel #edit_msg").html("<p class='sibu_alert'>Une erreur s'est produite lors de l'enregistrement.</p>");
1
+ <% if @updated %>
2
+ $("#edit_panel").slideUp();
3
+ refreshAfterEdit(true, '<%= @section_id %>');
4
+ <% else %>
5
+ $("#edit_panel #edit_msg").html("<p class='sibu_alert'>Une erreur s'est produite lors de l'enregistrement.</p>");
6
6
  <% end %>
@@ -1,126 +1,126 @@
1
- <%= form_for @site do |f| %>
2
- <div class="sibu_field">
3
- <%= f.label :name, 'Nom du site' %>
4
- <div>
5
- <%= f.text_field :name, placeholder: "Ex : Site de l'Hôtel du Lac" %>
6
- <small>Libellé utilisé dans l'outil d'administration (non utilisé dans le site)</small>
7
- </div>
8
- </div>
9
- <div class="sibu_field">
10
- <%= f.label :name, 'Nom de domaine' %>
11
- <div>
12
- <%= f.text_field :domain, placeholder: "Ex : www.monsite.com (utilisé lors de la mise en ligne du site)" %>
13
- <small>Renseignez le nom de domaine de votre site (utile uniquement lors de la publication)</small>
14
- </div>
15
- </div>
16
- <div class="sibu_field">
17
- <%= f.label :site_template_id, 'Modèle' %>
18
- <div>
19
- <%= f.collection_select(:site_template_id, Sibu::SiteTemplate.all, :id, :name, {prompt: 'Sélectionnez un modèle de site'}, disabled: @site.persisted?) %>
20
- <small>Choisissez le gabarit qui servira de modèle pour votre site (non modifiable après création)</small>
21
- </div>
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>
30
- <% if conf[:custom_styles] && @site.persisted? %>
31
- <div class="sibu_field sibu_colors">
32
- <%= f.label :primary_color, 'Couleur principale' %>
33
- <div>
34
- <% primary_colors.each do |c| %>
35
- <span class="sibu_color <%= 'selected' if f.object.primary_color == c %>" data-color="<%= c %>" style="background-color: <%= c %>;"></span>
36
- <% end %>
37
- <small>Couleur principale appliquée au modèle choisi</small>
38
- </div>
39
- <%= f.hidden_field :primary_color %>
40
- </div>
41
- <div class="sibu_field sibu_colors">
42
- <%= f.label :secondary_color, 'Couleur secondaire' %>
43
- <div>
44
- <% secondary_colors.each do |c| %>
45
- <span class="sibu_color <%= 'selected' if f.object.secondary_color == c %>" data-color="<%= c %>" style="background-color: <%= c %>;"></span>
46
- <% end %>
47
- <small>Couleur secondaire appliquée au modèle choisi</small>
48
- </div>
49
- <%= f.hidden_field :secondary_color %>
50
- </div>
51
- <div class="sibu_field sibu_fonts">
52
- <%= f.label :name, 'Police de caractères (titres)' %>
53
- <div>
54
- <%= f.select :primary_font, primary_fonts %>
55
- <small>Police de caractère utilisée pour les titres du modèle choisi</small>
56
- </div>
57
- </div>
58
- <div class="sibu_field sibu_fonts">
59
- <%= f.label :name, 'Police de caractères (corps)' %>
60
- <div>
61
- <%= f.select :secondary_font, secondary_fonts %>
62
- <small>Police de caractère utilisée pour les corps de texte du modèle choisi</small>
63
- </div>
64
- </div>
65
- <% end %>
66
- <div class="sibu_field">
67
- <%= f.label :analytics_id, "Statistiques d'audience" %>
68
- <div>
69
- <%= f.text_field :analytics_id, placeholder: "UA-XXXXXX" %>
70
- <small>Renseignez l'identifiant Google Analytics pour suivre les statistiques d'audience du site</small>
71
- </div>
72
- </div>
73
- <div class="sibu_field">
74
- <%= f.label :header_code, "Code d'entête personnalisé" %>
75
- <div>
76
- <%= f.text_area :header_code, placeholder: "Code JS ou CSS (avec les balises <script> ou <style>)", rows: 6 %>
77
- <small>Ce code javascript ou CSS sera inséré dans l'entête du site pour toutes les pages</small>
78
- </div>
79
- </div>
80
- <div class="sibu_field">
81
- <%= f.label :footer_code, 'Code de pied de page personnalisé' %>
82
- <div>
83
- <%= f.text_area :footer_code, placeholder: "Code JS ou CSS (avec les balises <script> ou <style>)", rows: 6 %>
84
- <small>Ce code javascript ou CSS sera inséré juste avant la balide fermante &lt;/body&gt; pour toutes les pages</small>
85
- </div>
86
- </div>
87
- <%= f.hidden_field :user_id %>
88
- <div class="sibu_actions">
89
- <%= f.submit 'Valider', data: {disable_with: 'Enregistrement en cours...'} %>
90
- <%= link_to 'Annuler', :back %>
91
- </div>
92
- <% end %>
93
-
94
- <% content_for :scripts do %>
95
- <script>
96
- $(".sibu_colors").each(function () {
97
- var colors = $(this).find(".sibu_color");
98
- var input = $(this).find("input");
99
- colors.click(function () {
100
- selectColor($(this), colors, input);
101
- });
102
- });
103
-
104
- function selectColor(color, colors, input) {
105
- if(!color.hasClass('selected')) {
106
- colors.removeClass("selected");
107
- color.addClass('selected');
108
- input.val(color.data("color"));
109
- }
110
- }
111
-
112
- function resetValues() {
113
- $(".sibu_colors").each(function () {
114
- var colors = $(this).find(".sibu_color");
115
- var defaultColor = colors.first();
116
- var input = $(this).find("input");
117
- selectColor(defaultColor, colors, input);
118
- });
119
- $(".sibu_fonts").each(function() {
120
- var fonts = $(this).find("select");
121
- var defaultValue = fonts.find("option").first().attr("value");
122
- fonts.val(defaultValue).change();
123
- });
124
- }
125
- </script>
1
+ <%= form_for @site do |f| %>
2
+ <div class="sibu_field">
3
+ <%= f.label :name, 'Nom du site' %>
4
+ <div>
5
+ <%= f.text_field :name, placeholder: "Ex : Site de l'Hôtel du Lac" %>
6
+ <small>Libellé utilisé dans l'outil d'administration (non utilisé dans le site)</small>
7
+ </div>
8
+ </div>
9
+ <div class="sibu_field">
10
+ <%= f.label :name, 'Nom de domaine' %>
11
+ <div>
12
+ <%= f.text_field :domain, placeholder: "Ex : www.monsite.com (utilisé lors de la mise en ligne du site)" %>
13
+ <small>Renseignez le nom de domaine de votre site (utile uniquement lors de la publication)</small>
14
+ </div>
15
+ </div>
16
+ <div class="sibu_field">
17
+ <%= f.label :site_template_id, 'Modèle' %>
18
+ <div>
19
+ <%= f.collection_select(:site_template_id, Sibu::SiteTemplate.all, :id, :name, {prompt: 'Sélectionnez un modèle de site'}, disabled: @site.persisted?) %>
20
+ <small>Choisissez le gabarit qui servira de modèle pour votre site (non modifiable après création)</small>
21
+ </div>
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>
30
+ <% if conf[:custom_styles] && @site.persisted? %>
31
+ <div class="sibu_field sibu_colors">
32
+ <%= f.label :primary_color, 'Couleur principale' %>
33
+ <div>
34
+ <% primary_colors.each do |c| %>
35
+ <span class="sibu_color <%= 'selected' if f.object.primary_color == c %>" data-color="<%= c %>" style="background-color: <%= c %>;"></span>
36
+ <% end %>
37
+ <small>Couleur principale appliquée au modèle choisi</small>
38
+ </div>
39
+ <%= f.hidden_field :primary_color %>
40
+ </div>
41
+ <div class="sibu_field sibu_colors">
42
+ <%= f.label :secondary_color, 'Couleur secondaire' %>
43
+ <div>
44
+ <% secondary_colors.each do |c| %>
45
+ <span class="sibu_color <%= 'selected' if f.object.secondary_color == c %>" data-color="<%= c %>" style="background-color: <%= c %>;"></span>
46
+ <% end %>
47
+ <small>Couleur secondaire appliquée au modèle choisi</small>
48
+ </div>
49
+ <%= f.hidden_field :secondary_color %>
50
+ </div>
51
+ <div class="sibu_field sibu_fonts">
52
+ <%= f.label :name, 'Police de caractères (titres)' %>
53
+ <div>
54
+ <%= f.select :primary_font, primary_fonts %>
55
+ <small>Police de caractère utilisée pour les titres du modèle choisi</small>
56
+ </div>
57
+ </div>
58
+ <div class="sibu_field sibu_fonts">
59
+ <%= f.label :name, 'Police de caractères (corps)' %>
60
+ <div>
61
+ <%= f.select :secondary_font, secondary_fonts %>
62
+ <small>Police de caractère utilisée pour les corps de texte du modèle choisi</small>
63
+ </div>
64
+ </div>
65
+ <% end %>
66
+ <div class="sibu_field">
67
+ <%= f.label :analytics_id, "Statistiques d'audience" %>
68
+ <div>
69
+ <%= f.text_field :analytics_id, placeholder: "UA-XXXXXX" %>
70
+ <small>Renseignez l'identifiant Google Analytics pour suivre les statistiques d'audience du site</small>
71
+ </div>
72
+ </div>
73
+ <div class="sibu_field">
74
+ <%= f.label :header_code, "Code d'entête personnalisé" %>
75
+ <div>
76
+ <%= f.text_area :header_code, placeholder: "Code JS ou CSS (avec les balises <script> ou <style>)", rows: 6 %>
77
+ <small>Ce code javascript ou CSS sera inséré dans l'entête du site pour toutes les pages</small>
78
+ </div>
79
+ </div>
80
+ <div class="sibu_field">
81
+ <%= f.label :footer_code, 'Code de pied de page personnalisé' %>
82
+ <div>
83
+ <%= f.text_area :footer_code, placeholder: "Code JS ou CSS (avec les balises <script> ou <style>)", rows: 6 %>
84
+ <small>Ce code javascript ou CSS sera inséré juste avant la balide fermante &lt;/body&gt; pour toutes les pages</small>
85
+ </div>
86
+ </div>
87
+ <%= f.hidden_field :user_id %>
88
+ <div class="sibu_actions">
89
+ <%= f.submit 'Valider', data: {disable_with: 'Enregistrement en cours...'} %>
90
+ <%= link_to 'Annuler', :back %>
91
+ </div>
92
+ <% end %>
93
+
94
+ <% content_for :scripts do %>
95
+ <script>
96
+ $(".sibu_colors").each(function () {
97
+ var colors = $(this).find(".sibu_color");
98
+ var input = $(this).find("input");
99
+ colors.click(function () {
100
+ selectColor($(this), colors, input);
101
+ });
102
+ });
103
+
104
+ function selectColor(color, colors, input) {
105
+ if(!color.hasClass('selected')) {
106
+ colors.removeClass("selected");
107
+ color.addClass('selected');
108
+ input.val(color.data("color"));
109
+ }
110
+ }
111
+
112
+ function resetValues() {
113
+ $(".sibu_colors").each(function () {
114
+ var colors = $(this).find(".sibu_color");
115
+ var defaultColor = colors.first();
116
+ var input = $(this).find("input");
117
+ selectColor(defaultColor, colors, input);
118
+ });
119
+ $(".sibu_fonts").each(function() {
120
+ var fonts = $(this).find("select");
121
+ var defaultValue = fonts.find("option").first().attr("value");
122
+ fonts.val(defaultValue).change();
123
+ });
124
+ }
125
+ </script>
126
126
  <% end %>
@@ -1,2 +1,2 @@
1
- <h1>Sites#destroy</h1>
2
- <p>Find me in app/views/sibu/sites/destroy.html.erb</p>
1
+ <h1>Sites#destroy</h1>
2
+ <p>Find me in app/views/sibu/sites/destroy.html.erb</p>
@@ -1,10 +1,10 @@
1
- <div class="sibu_view">
2
- <div class="actions">
3
- <% if conf[:custom_styles] && @site.persisted? %><%= link_to 'Rétablir les paramètres par défaut', '#', onclick: 'resetValues()' %><% end %>
4
- <%= link_to 'Retour', :back %>
5
- </div>
6
- <h2>Modifier un site</h2>
7
- <div class="sibu_form">
8
- <%= render 'form' %>
9
- </div>
1
+ <div class="sibu_view">
2
+ <div class="actions">
3
+ <% if conf[:custom_styles] && @site.persisted? %><%= link_to 'Rétablir les paramètres par défaut', '#', onclick: 'resetValues()' %><% end %>
4
+ <%= link_to 'Retour', :back %>
5
+ </div>
6
+ <h2>Modifier un site</h2>
7
+ <div class="sibu_form">
8
+ <%= render 'form' %>
9
+ </div>
10
10
  </div>
@@ -1,9 +1,9 @@
1
- <div class="sibu_view">
2
- <div class="actions">
3
- <%= link_to 'Retour', :back %>
4
- </div>
5
- <h2>Modifier un site</h2>
6
- <div class="sibu_form">
7
- <%= render 'form' %>
8
- </div>
1
+ <div class="sibu_view">
2
+ <div class="actions">
3
+ <%= link_to 'Retour', :back %>
4
+ </div>
5
+ <h2>Modifier un site</h2>
6
+ <div class="sibu_form">
7
+ <%= render 'form' %>
8
+ </div>
9
9
  </div>
@@ -1,41 +1,41 @@
1
- <div class="sibu_view">
2
- <div class="actions">
3
- <%= link_to "Bibliothèque d'images", images_path %>
4
- <%= link_to "Documents", documents_path %>
5
- <%= link_to 'Créer un site', new_site_path %>
6
- </div>
7
- <h2>Liste des sites</h2>
8
- <table>
9
- <thead>
10
- <tr>
11
- <th>Nom</th>
12
- <th>Modèle</th>
13
- <th>Version</th>
14
- <th>Mise à jour</th>
15
- <th colspan="2"></th>
16
- </tr>
17
- </thead>
18
- <tbody>
19
- <% @sites.each do |s| %>
20
- <tr>
21
- <td><%= s.name %></td>
22
- <td><%= s.site_template.name if s.site_template %></td>
23
- <td><%= s.version.upcase unless s.version.blank? %></td>
24
- <td><%= l s.updated_at %></td>
25
- <td colspan="2">
26
- <%= link_to 'Pages', site_pages_path(s) %> |
27
- <%= link_to 'Paramétrer', edit_site_path(s) %> |
28
- <%= link_to 'Copier', duplicate_site_path(s), method: :post, data: {confirm: "Copier le site \"#{s.name}\" ?"} %> |
29
- <%= link_to 'Supprimer', site_path(s), method: :delete, data: {confirm: "Supprimer le site \"#{s.name}\" ?"} %>
30
- </td>
31
- </tr>
32
- <% end %>
33
- <% if @sites.empty? %>
34
- <tr>
35
- <td colspan="6">Aucun site créé pour le moment.</td>
36
- </tr>
37
- <% end %>
38
- </tbody>
39
- </table>
40
- </div>
41
-
1
+ <div class="sibu_view">
2
+ <div class="actions">
3
+ <%= link_to "Bibliothèque d'images", images_path %>
4
+ <%= link_to "Documents", documents_path %>
5
+ <%= link_to 'Créer un site', new_site_path %>
6
+ </div>
7
+ <h2>Liste des sites</h2>
8
+ <table>
9
+ <thead>
10
+ <tr>
11
+ <th>Nom</th>
12
+ <th>Modèle</th>
13
+ <th>Version</th>
14
+ <th>Mise à jour</th>
15
+ <th colspan="2"></th>
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <% @sites.each do |s| %>
20
+ <tr>
21
+ <td><%= s.name %></td>
22
+ <td><%= s.site_template.name if s.site_template %></td>
23
+ <td><%= s.version.upcase unless s.version.blank? %></td>
24
+ <td><%= l s.updated_at %></td>
25
+ <td colspan="2">
26
+ <%= link_to 'Pages', site_pages_path(s) %> |
27
+ <%= link_to 'Paramétrer', edit_site_path(s) %> |
28
+ <%= link_to 'Copier', duplicate_site_path(s), method: :post, data: {confirm: "Copier le site \"#{s.name}\" ?"} %> |
29
+ <%= link_to 'Supprimer', site_path(s), method: :delete, data: {confirm: "Supprimer le site \"#{s.name}\" ?"} %>
30
+ </td>
31
+ </tr>
32
+ <% end %>
33
+ <% if @sites.empty? %>
34
+ <tr>
35
+ <td colspan="6">Aucun site créé pour le moment.</td>
36
+ </tr>
37
+ <% end %>
38
+ </tbody>
39
+ </table>
40
+ </div>
41
+