sibu 1.0.1 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/sibu/defaults.scss +1 -2
- data/app/assets/stylesheets/sibu/sibu.css +12 -1
- data/app/controllers/sibu/pages_controller.rb +7 -1
- data/app/controllers/sibu/sites_controller.rb +5 -1
- data/app/helpers/sibu/application_helper.rb +1 -1
- data/app/helpers/sibu/pages_helper.rb +42 -17
- data/app/models/sibu/page.rb +4 -0
- data/app/views/layouts/sibu/edit_content.html.erb +34 -11
- data/app/views/sibu/pages/_code_edit_panel.html.erb +2 -1
- data/app/views/sibu/pages/_form.html.erb +8 -0
- data/app/views/sibu/pages/_map_edit_panel.html.erb +1 -0
- data/app/views/sibu/pages/edit.html.erb +1 -1
- data/app/views/sibu/pages/edit_element.js.erb +2 -2
- data/app/views/sibu/pages/index.html.erb +6 -3
- data/app/views/sibu/sites/_form.html.erb +2 -2
- data/app/views/sibu/sites/index.html.erb +1 -1
- data/app/views/sibu/sites/new.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: 96611f8f7b23adda4d4502b1eef05f34d0a4dea2
|
4
|
+
data.tar.gz: 27fe50a309c23dfe80bce28c687d6fc05d96452d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3022613a600e634834e57373d4fefae4e760eda752e7966c5da5f403e7464d9279a0c1dd5277bdd97f9cbac101df450290a0762ea6a58183079362fd87d003c5
|
7
|
+
data.tar.gz: 530731b14939afd5615a25df8c1d0834f541c41343484ddfb256b0b1f98b53981fa513ee4b584c1ac6b6067b8d4d20ea0450aa2466955daaf18844509f84ebeb
|
@@ -3,10 +3,21 @@
|
|
3
3
|
*= require_self
|
4
4
|
*/
|
5
5
|
|
6
|
-
.sibu_content_panel {
|
6
|
+
body.sibu_edit_content, .sibu_content_panel {
|
7
7
|
position: relative
|
8
8
|
}
|
9
9
|
|
10
|
+
body.sibu_edit_content > .sibu_panel:first-child {
|
11
|
+
position: fixed;
|
12
|
+
width: 100%;
|
13
|
+
z-index: 999999;
|
14
|
+
top: 0;
|
15
|
+
}
|
16
|
+
|
17
|
+
body.sibu_edit_content > .sibu_content_panel {
|
18
|
+
padding-top: 60px;
|
19
|
+
}
|
20
|
+
|
10
21
|
.sb-editable {
|
11
22
|
cursor: pointer;
|
12
23
|
outline: dashed rgba(94, 219, 255, 0.8) 3px;
|
@@ -2,6 +2,7 @@ require_dependency "sibu/application_controller"
|
|
2
2
|
|
3
3
|
module Sibu
|
4
4
|
class PagesController < ApplicationController
|
5
|
+
before_action :compile_assets, only: [:show, :edit_content]
|
5
6
|
before_action :set_page, only: [:edit, :update, :destroy, :duplicate, :edit_element, :update_element, :clone_element,
|
6
7
|
:delete_element, :child_element, :new_section, :create_section, :edit_section,
|
7
8
|
:update_section, :delete_section]
|
@@ -10,6 +11,7 @@ module Sibu
|
|
10
11
|
:child_element, :new_section, :create_section, :edit_section,
|
11
12
|
:update_section, :delete_section]
|
12
13
|
before_action :set_online, only: [:show, :edit]
|
14
|
+
|
13
15
|
skip_before_action Rails.application.config.sibu[:auth_filter], only: [:show]
|
14
16
|
|
15
17
|
def index
|
@@ -44,7 +46,7 @@ module Sibu
|
|
44
46
|
end
|
45
47
|
|
46
48
|
def new
|
47
|
-
@page = Sibu::Page.new(site_id: @site.id)
|
49
|
+
@page = Sibu::Page.new(site_id: @site.id, source: 'Saisie manuelle')
|
48
50
|
end
|
49
51
|
|
50
52
|
def create
|
@@ -194,5 +196,9 @@ module Sibu
|
|
194
196
|
def show_params
|
195
197
|
params.permit!
|
196
198
|
end
|
199
|
+
|
200
|
+
def compile_assets
|
201
|
+
Sibu::DynamicStyle.new(params[:site_id]).compile if Rails.env.development? && conf[:custom_styles] && !params[:site_id].blank?
|
202
|
+
end
|
197
203
|
end
|
198
204
|
end
|
@@ -6,7 +6,11 @@ module Sibu
|
|
6
6
|
skip_before_action Rails.application.config.sibu[:auth_filter], only: [:show]
|
7
7
|
|
8
8
|
def index
|
9
|
-
|
9
|
+
if conf[:admin_filter].call(sibu_user)
|
10
|
+
@sites = Sibu::Site.all.order(:name, :version)
|
11
|
+
else
|
12
|
+
@sites = Sibu::Site.for_user(sibu_user).order(:name, :version)
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
def show
|
@@ -7,6 +7,10 @@ module Sibu
|
|
7
7
|
p ? (request.host == conf[:host] ? site_page_path(@site.id, p.id) : (conf[:deployment_path] ? "/#{conf[:deployment_path]}/#{p.path}" : "/#{p.path}")) : "#"
|
8
8
|
end
|
9
9
|
|
10
|
+
def is_current_page(link_val)
|
11
|
+
/\d+/.match?(link_val) && link_val.to_i == @page.id
|
12
|
+
end
|
13
|
+
|
10
14
|
def sections_templates
|
11
15
|
@site.site_template.available_sections
|
12
16
|
end
|
@@ -58,7 +62,7 @@ module Sibu
|
|
58
62
|
end
|
59
63
|
else
|
60
64
|
if t == :p
|
61
|
-
html_output = content_tag(:div, content_tag(t, raw(content["text"]).html_safe
|
65
|
+
html_output = content_tag(:div, content_tag(t, raw(content["text"]).html_safe), html_opts)
|
62
66
|
else
|
63
67
|
html_output = content_tag(t, raw(content["text"]).html_safe, html_opts)
|
64
68
|
end
|
@@ -95,8 +99,12 @@ module Sibu
|
|
95
99
|
(tokens + [suffix]).select {|t| !t.blank?}.join("|")
|
96
100
|
end
|
97
101
|
|
98
|
-
|
99
|
-
|
102
|
+
# Note : the best option is probably a "section" helper that is instantiated from the section hash
|
103
|
+
# and that provides all the logic for elements manipulation (ex: section.h3(), section.elements, section.elements(nested_id), etc...)
|
104
|
+
# That will also remove the entity type references (site / page) from the partials (but is still has to be figured out by Sibu)
|
105
|
+
# Note : add "each_with_elements" and "elements" on section/elts enumerables
|
106
|
+
def nested_elements(elt_or_id)
|
107
|
+
element_id = elt_id(elt_or_id)
|
100
108
|
element_id_tokens = (@sb_section + element_id.split("|")).uniq
|
101
109
|
nested_elts = @sb_entity.elements(*element_id_tokens)
|
102
110
|
nested_elts.blank? ? [{"id" => element_id.split("|").last, "data-id" => join_tokens(element_id_tokens[1..-1], "#{element_id}0")}] :
|
@@ -116,25 +124,33 @@ module Sibu
|
|
116
124
|
wrapper = opts.delete(:wrapper)
|
117
125
|
repeat = opts.delete(:repeat)
|
118
126
|
size = opts.delete(:size)
|
119
|
-
|
127
|
+
t_id = elt.is_a?(Hash) ? elt["id"] : elt
|
128
|
+
defaults = {"id" => t_id, "src" => Sibu::DEFAULT_IMG}
|
120
129
|
content = defaults.merge(elt.is_a?(Hash) ? elt : (select_element(elt) || {}))
|
130
|
+
@sb_section = (@sb_section || []) + [t_id]
|
121
131
|
if action_name == 'show'
|
122
132
|
content["src"] = ("/#{conf[:deployment_path]}" + content["src"]) if @online && conf[:deployment_path]
|
123
133
|
else
|
124
|
-
opts.merge!({data: {id:
|
134
|
+
opts.merge!({data: {id: @sb_section[1..-1].join('|'), type: "media", repeat: repeat, size: size}})
|
125
135
|
end
|
126
|
-
wrapper ? content_tag(wrapper, content_tag(:img, nil, content.except("id")), opts)
|
136
|
+
html_output = wrapper ? content_tag(wrapper, content_tag(:img, nil, content.except("id")), opts)
|
127
137
|
: content_tag(:img, nil, content.except("id").merge(opts.stringify_keys) {|k, old, new| k == 'class' ? [old, new].join(' ') : new})
|
138
|
+
@sb_section -= [t_id]
|
139
|
+
html_output
|
128
140
|
end
|
129
141
|
|
130
142
|
def grp(elt, opts = {}, &block)
|
131
143
|
wrapper = opts.delete(:wrapper) || :div
|
132
144
|
repeat = opts.delete(:repeat)
|
133
145
|
children = opts.delete(:children)
|
134
|
-
|
146
|
+
t_id = elt.is_a?(Hash) ? elt["id"] : elt
|
147
|
+
@sb_section = (@sb_section || []) + [t_id]
|
148
|
+
defaults = {"id" => t_id}
|
135
149
|
opts = defaults.merge(opts)
|
136
|
-
opts.merge!({data: {id:
|
137
|
-
content_tag(wrapper, capture(*elts(elt), &block), opts)
|
150
|
+
opts.merge!({data: {id: @sb_section[1..-1].join('|'), type: "group", repeat: repeat, children: children}}) if action_name != 'show'
|
151
|
+
html_output = content_tag(wrapper, capture(*elts(elt), &block), opts)
|
152
|
+
@sb_section -= [t_id]
|
153
|
+
html_output
|
138
154
|
end
|
139
155
|
|
140
156
|
def empty_tag(elt, tag, type, opts = {})
|
@@ -187,10 +203,18 @@ module Sibu
|
|
187
203
|
locals: {sibu: self, sibu_section: s, sibu_attrs: sibu_attributes(s).html_safe}
|
188
204
|
end
|
189
205
|
|
206
|
+
# Page sections attrs
|
190
207
|
def sibu_attributes(section)
|
191
208
|
action_name != 'show' ? ('data-sb-id="' + section['id'] + '" data-sb-entity="page"') : ''
|
192
209
|
end
|
193
210
|
|
211
|
+
# Site sections attrs
|
212
|
+
def sibu_attrs(section_id)
|
213
|
+
@sb_section = [section_id]
|
214
|
+
@sb_entity = @site
|
215
|
+
action_name != 'show' ? ('data-sb-id="' + section_id + '" data-sb-entity="site"').html_safe : ''
|
216
|
+
end
|
217
|
+
|
194
218
|
def section(id, tag, html_opts = {}, &block)
|
195
219
|
@sb_section = [id]
|
196
220
|
opts = action_name != 'show' ? html_opts.merge({"data-sb-id" => id, "data-sb-entity" => @sb_entity == @site ? 'site' : 'page'}) : html_opts
|
@@ -213,12 +237,14 @@ module Sibu
|
|
213
237
|
def link(elt, html_opts = {}, &block)
|
214
238
|
repeat = html_opts.delete(:repeat)
|
215
239
|
children = html_opts.delete(:children)
|
216
|
-
|
240
|
+
t_id = elt.is_a?(Hash) ? elt["id"] : elt
|
241
|
+
defaults = {"id" => t_id, "value" => "", "text" => Sibu::DEFAULT_TEXT}
|
217
242
|
link_elt = current_elt(elt)
|
218
243
|
content = defaults.merge(link_elt)
|
219
244
|
val = content.delete("value") || ""
|
220
245
|
text = content.delete("text")
|
221
|
-
|
246
|
+
@sb_section = (@sb_section || []) + [t_id]
|
247
|
+
html_opts.merge!({data: {id: @sb_section[1..-1].join('|'), type: "link", repeat: repeat, children: children}}) if action_name != 'show'
|
222
248
|
if val.to_s.start_with?('http')
|
223
249
|
content["href"] = val
|
224
250
|
elsif val.to_s.start_with?('#')
|
@@ -232,17 +258,16 @@ module Sibu
|
|
232
258
|
content["href"] = @links.keys.include?(val.to_s) ? (action_name == 'show' ? link_path(val) : site_page_edit_content_path(@site.id, val)) : '#'
|
233
259
|
end
|
234
260
|
if block_given?
|
235
|
-
|
236
|
-
html_output = content_tag(:a, capture(link_elt, elts(elt), &block), content.merge(html_opts).except("elements"))
|
237
|
-
@sb_section -= [elt_id(elt)]
|
238
|
-
html_output
|
261
|
+
html_output = content_tag(:a, capture(link_elt, nested_elements(elt), &block), content.merge(html_opts).except("elements"))
|
239
262
|
else
|
240
|
-
content_tag(:a, raw(text), content.merge(html_opts).except("elements"))
|
263
|
+
html_output = content_tag(:a, raw(text), content.merge(html_opts).except("elements"))
|
241
264
|
end
|
265
|
+
@sb_section -= [t_id]
|
266
|
+
html_output
|
242
267
|
end
|
243
268
|
|
244
269
|
def interactive_map(elt, html_opts = {})
|
245
|
-
defaults = {"data-lat" => "
|
270
|
+
defaults = {"data-lat" => "46.1988027", "data-lng" => "5.1748288", "data-title" => Sibu::DEFAULT_TEXT}
|
246
271
|
content = defaults.merge(elt.is_a?(Hash) ? elt : (select_element(elt) || {"id" => elt}))
|
247
272
|
html_opts.merge!({data: {id: elt_id(elt), type: "map"}}) if action_name != 'show'
|
248
273
|
content_tag(:div, nil, content.merge(html_opts))
|
data/app/models/sibu/page.rb
CHANGED
@@ -3,16 +3,19 @@
|
|
3
3
|
<head>
|
4
4
|
<title><%= conf[:title] %></title>
|
5
5
|
<%= stylesheet_link_tag 'sibu/sibu', media: 'all' %>
|
6
|
-
<%= stylesheet_link_tag conf[:stylesheet], media: 'all' %>
|
7
|
-
<%= javascript_include_tag "#{conf[:javascript]}-edit" %>
|
6
|
+
<%= stylesheet_link_tag "#{conf[:stylesheet]}-edit", media: 'all' %>
|
8
7
|
<% if @site %>
|
9
8
|
<%= stylesheet_link_tag (conf[:custom_styles] ? @site.style_url : @site.site_template.path), media: "all" %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% if @site %>
|
10
12
|
<%= javascript_include_tag @site.site_template.path %>
|
11
13
|
<% end %>
|
14
|
+
<%= javascript_include_tag "#{conf[:javascript]}-edit" %>
|
12
15
|
<%= csrf_meta_tags %>
|
13
16
|
<%= yield :styles %>
|
14
17
|
</head>
|
15
|
-
<body>
|
18
|
+
<body class="sibu_edit_content">
|
16
19
|
<% [:top_panel, :side_panel, :content_panel, :bottom_panel].each do |panel| %>
|
17
20
|
<% unless conf[panel].blank? %>
|
18
21
|
<div class="<%= panel == :content_panel ? 'sibu_content_panel' : 'sibu_panel' %>">
|
@@ -44,11 +47,8 @@
|
|
44
47
|
<%= javascript_include_tag 'sibu/sibu' %>
|
45
48
|
<script>
|
46
49
|
document.addEventListener("DOMContentLoaded", function() {
|
47
|
-
initOverlays();
|
50
|
+
initOverlays("<%= @edit_section || '' %>");
|
48
51
|
sibuCallback("editContent");
|
49
|
-
<% unless @edit_section.blank? %>
|
50
|
-
document.querySelector("[data-sb-overlay='<%= @edit_section %>']").click();
|
51
|
-
<% end %>
|
52
52
|
});
|
53
53
|
|
54
54
|
function setEditMode(section, overlay, left, top, width, height) {
|
@@ -77,7 +77,8 @@
|
|
77
77
|
editMode.querySelector("#new_section_after").style.display = "block";
|
78
78
|
editMode.querySelector("#delete_section").style.display = "block";
|
79
79
|
}
|
80
|
-
|
80
|
+
var topPadding = top <= 120 ? 60 : 120;
|
81
|
+
window.scrollTo(0, top - topPadding);
|
81
82
|
section.classList.add('sb-editing');
|
82
83
|
initInnerOverlays(section);
|
83
84
|
document.querySelector("#edit_overlays").innerHTML = "";
|
@@ -232,14 +233,14 @@
|
|
232
233
|
}
|
233
234
|
}
|
234
235
|
|
235
|
-
function initOverlays() {
|
236
|
+
function initOverlays(activeSection = "") {
|
236
237
|
setTimeout(function() {
|
237
238
|
var container = document.querySelector("#edit_overlays"), sections = document.querySelectorAll("[data-sb-id]");
|
238
239
|
container.innerHTML = "";
|
239
240
|
|
240
241
|
for (var i = 0; i < sections.length; i++) {
|
241
|
-
var sectionBox = sections[i]
|
242
|
-
var yOffset = sectionBox.top
|
242
|
+
var sectionBox = eltBox(sections[i]);
|
243
|
+
var yOffset = sectionBox.top;
|
243
244
|
var width = sections[i].offsetWidth, height = (sections[i].offsetHeight === 0 ? childrenHeight(sections[i]) : sections[i].offsetHeight);
|
244
245
|
var overlay = document.createElement("div");
|
245
246
|
overlay.setAttribute("data-sb-overlay", sections[i].getAttribute("data-sb-id"));
|
@@ -255,9 +256,31 @@
|
|
255
256
|
};
|
256
257
|
})(sections[i], sectionBox.left, yOffset, width, height));
|
257
258
|
}
|
259
|
+
if (activeSection) {
|
260
|
+
document.querySelector("[data-sb-overlay='" + activeSection + "']").click();
|
261
|
+
}
|
258
262
|
}, 800);
|
259
263
|
}
|
260
264
|
|
265
|
+
function eltBox(elt) {
|
266
|
+
var x, y, w, h, bbox = elt.getBoundingClientRect();
|
267
|
+
if (isIE()) {
|
268
|
+
x = bbox.left + window.scrollX;
|
269
|
+
y = bbox.top + window.scrollY;
|
270
|
+
} else {
|
271
|
+
x = bbox.x + window.scrollX;
|
272
|
+
y = bbox.y + window.scrollY;
|
273
|
+
}
|
274
|
+
w = bbox.width;
|
275
|
+
h = bbox.height;
|
276
|
+
return {top: y, left: x, width: w, height: h}
|
277
|
+
}
|
278
|
+
|
279
|
+
function isIE() {
|
280
|
+
let ua = navigator.userAgent;
|
281
|
+
return ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1;
|
282
|
+
}
|
283
|
+
|
261
284
|
function childrenHeight(parentElt) {
|
262
285
|
var height = 0, children = parentElt.querySelectorAll("*");
|
263
286
|
for (var i = 0; i < children.length; i++) {
|
@@ -1,10 +1,11 @@
|
|
1
1
|
<h2>Modifier le contenu</h2>
|
2
2
|
<div id="edit_msg"></div>
|
3
|
+
<%= render 'element_actions' %>
|
3
4
|
<div class="sibu_edit_form">
|
4
5
|
<form class="edit_element_form" action="<%= update_element_site_page_path(@site.id, @page.id, format: :js) %>" accept-charset="UTF-8" method="patch">
|
5
6
|
<div class="sibu_field">
|
6
7
|
<%= label_tag 'element[code]', "Code d'intégration du contenu" %>
|
7
|
-
<%= text_area_tag 'element[code]', @element["code"], placeholder: '
|
8
|
+
<%= text_area_tag 'element[code]', @element["code"], placeholder: 'ex: <iframe src="..."></iframe>' %>
|
8
9
|
</div>
|
9
10
|
<%= hidden_field_tag 'element[id]', @element["id"] %>
|
10
11
|
<%= hidden_field_tag :element_id, @element_id %>
|
@@ -13,6 +13,13 @@
|
|
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 :source, "Référence" %>
|
18
|
+
<div>
|
19
|
+
<%= f.text_field :source, placeholder: "Référence interne optionnelle (Ex: test mise en page 2) " %>
|
20
|
+
<small>Un bref descriptif de la page, à usage interne uniquement</small>
|
21
|
+
</div>
|
22
|
+
</div>
|
16
23
|
<div class="sibu_field">
|
17
24
|
<%= f.label :is_home, "Page d'accueil" %>
|
18
25
|
<div>
|
@@ -56,6 +63,7 @@
|
|
56
63
|
</div>
|
57
64
|
</div>
|
58
65
|
<%= f.hidden_field :site_id %>
|
66
|
+
<%= f.hidden_field :site_id %>
|
59
67
|
<div class="sibu_actions">
|
60
68
|
<%= f.submit 'Valider' %>
|
61
69
|
<%= link_to 'Annuler', :back %>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<h2>Modifier la carte</h2>
|
2
2
|
<div id="edit_msg"></div>
|
3
|
+
<%= render 'element_actions' %>
|
3
4
|
<div class="sibu_edit_form">
|
4
5
|
<form class="edit_element_form" action="<%= update_element_site_page_path(@site.id, @page.id, format: :js) %>" accept-charset="UTF-8" method="patch">
|
5
6
|
<div class="sibu_field">
|
@@ -86,8 +86,8 @@ setTimeout(function() {
|
|
86
86
|
document.querySelector("#clone_elt").style.display = "inline-block";
|
87
87
|
document.querySelector("#duplicate_elt").style.display = "inline-block";
|
88
88
|
<% else %>
|
89
|
-
document.querySelector("#clone_elt").remove();
|
90
|
-
document.querySelector("#duplicate_elt").remove();
|
89
|
+
if (document.querySelector("#clone_elt")) document.querySelector("#clone_elt").remove();
|
90
|
+
if (document.querySelector("#duplicate_elt")) document.querySelector("#duplicate_elt").remove();
|
91
91
|
<% end %>
|
92
92
|
|
93
93
|
<% if @children %>
|
@@ -1,6 +1,9 @@
|
|
1
1
|
<div id="pages" class="sibu_view">
|
2
2
|
<div class="actions">
|
3
|
-
<%= link_to
|
3
|
+
<%= link_to "Bibliothèque d'images", images_path %>
|
4
|
+
<%= link_to "Documents", documents_path %>
|
5
|
+
<%= link_to 'Créer une page', new_site_page_path(@site.id) %>
|
6
|
+
<%= link_to 'Retour', :back %>
|
4
7
|
</div>
|
5
8
|
<h2>Pages du site "<%= @site.name %>"</h2>
|
6
9
|
<table>
|
@@ -8,7 +11,7 @@
|
|
8
11
|
<tr>
|
9
12
|
<th>Nom</th>
|
10
13
|
<th>Chemin d'accès</th>
|
11
|
-
<th>
|
14
|
+
<th>Référence</th>
|
12
15
|
<th>Mise à jour</th>
|
13
16
|
<th></th>
|
14
17
|
</tr>
|
@@ -24,7 +27,7 @@
|
|
24
27
|
<%= link_to 'Voir', site_page_path(@site.id, p), target: '_blank' %> |
|
25
28
|
<%= link_to 'Editer', site_page_edit_content_path(site_id: @site.id, page_id: p.id) %> |
|
26
29
|
<%= link_to 'Copier', duplicate_site_page_path(@site.id, p), method: :post, data: {confirm: "Copier la page \"#{p.name}\" ?"} %> |
|
27
|
-
<%= link_to 'Paramétrer', edit_site_page_path(@site.id, p) %> |
|
30
|
+
<%= link_to 'Paramétrer cette page', edit_site_page_path(@site.id, p) %> |
|
28
31
|
<%= link_to 'Supprimer', site_page_path(@site.id, p), method: :delete, data: {confirm: "Supprimer la page \"#{p.name}\" ?"} %>
|
29
32
|
</td>
|
30
33
|
</tr>
|
@@ -16,8 +16,8 @@
|
|
16
16
|
<div class="sibu_field">
|
17
17
|
<%= f.label :site_template_id, 'Modèle' %>
|
18
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>
|
19
|
+
<%= f.collection_select(:site_template_id, Sibu::SiteTemplate.all.order(:name), :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 (voir exemples ci-dessous - non modifiable après création)</small>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
<div class="sibu_field">
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<td><%= l s.updated_at %></td>
|
25
25
|
<td colspan="2">
|
26
26
|
<%= link_to 'Pages', site_pages_path(s) %> |
|
27
|
-
<%= link_to '
|
27
|
+
<%= link_to 'Réglages du site', edit_site_path(s) %> |
|
28
28
|
<%= link_to 'Copier', duplicate_site_path(s), method: :post, data: {confirm: "Copier le site \"#{s.name}\" ?"} %> |
|
29
29
|
<%= link_to 'Supprimer', site_path(s), method: :delete, data: {confirm: "Supprimer le site \"#{s.name}\" ?"} %>
|
30
30
|
</td>
|
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: 1.0.
|
4
|
+
version: 1.0.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: 2020-04
|
11
|
+
date: 2020-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|