sibu 0.1.21 → 0.1.22

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c5d82061f85ff21bd3989f9b12554ed157a9338
4
- data.tar.gz: b11f19b5ee199a81cea6dbbd5703916349e01bb0
3
+ metadata.gz: 3bd4c7f3ddac097c6e3ff1718357d64f3769f886
4
+ data.tar.gz: c45772f2d3851da0c553d0fb7b76a427fc6fdea6
5
5
  SHA512:
6
- metadata.gz: 75fe75f7afaa6dd93753f4c11c4106f5dd386244daab9765733ad73651091f6e76e86012ca6209096bba78898659fef9450dfeb3549541c02f8810b5369e9c22
7
- data.tar.gz: 7a88ff8ceddec27e47629ddad26c66636670290fbef6e4eb8a581f444b79050ed1678856abe495758b352c12260c40eeb31c7e78a1a959031dcfd2e832a5d60b
6
+ metadata.gz: 02475b5b1707ec2f4807be144549aa06234050e9f2c34e600d34fcb807c29858a698d4b64697719763911b857aa4087b14ed29b9b62a51441205e418709a39eb
7
+ data.tar.gz: d9383148391ef403d4cc9de8ec3203853eb7870bc9c6de18ddd6b623d8277e9b505cff40ac738cbe668188175867189a7232eed49532f8c26d72a87e578cfda4
@@ -29,11 +29,12 @@ module Sibu
29
29
  end
30
30
 
31
31
  def edit
32
+ @next_page = params[:next_page]
32
33
  end
33
34
 
34
35
  def update
35
36
  if @site.update(site_params)
36
- redirect_to sites_url, notice: "Le site a bien été mis à jour."
37
+ redirect_to (params[:next_page].blank? ? sites_url : params[:next_page]), notice: "Le site a bien été mis à jour."
37
38
  else
38
39
  flash.now[:alert] = "Une erreur s'est produite lors de l'enregistrement du site."
39
40
  render :edit
@@ -58,7 +58,7 @@
58
58
  editMode.find(".overlay_bottom").css("top", top + height);
59
59
  editMode.find(".overlay_left").css({"height": height, "width": left, "top": top});
60
60
  editMode.find(".overlay_right").css({"height": height, "left": left + width, "top": top});
61
- editMode.find(".edit_mode_actions").css({"top": (top <= 40 ? (top + height) : (top - 40)), left: left, width: width});
61
+ editMode.find(".edit_mode_actions").css({"top": (top <= 40 ? (top + height) : (top - 40 - 20)), left: left, width: width});
62
62
  editMode.find("#edit_section_msg").text("Modifier la section");
63
63
  editMode.show();
64
64
  if(!section.data('sb-repeat')) {
@@ -226,6 +226,7 @@
226
226
  return height;
227
227
  }
228
228
  </script>
229
- <%= yield :scripts %>
229
+ <%= yield :site_scripts %>
230
+ <%= yield :page_scripts %>
230
231
  </body>
231
232
  </html>
@@ -23,6 +23,7 @@
23
23
 
24
24
  <%= yield %>
25
25
 
26
- <%= yield :scripts %>
26
+ <%= yield :site_scripts %>
27
+ <%= yield :page_scripts %>
27
28
  </body>
28
29
  </html>
@@ -37,6 +37,7 @@
37
37
  <%= f.label :name, 'Police de caractères (corps)' %>
38
38
  <%= f.select :secondary_font, secondary_fonts, {prompt: 'Police par défaut'} %>
39
39
  </div>
40
+ <%= hidden_field_tag :next_page, @next_page %>
40
41
  <%= f.hidden_field :user_id %>
41
42
  <div class="sibu_actions">
42
43
  <%= f.submit 'Valider' %>
@@ -0,0 +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>
9
+ </div>
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.1.21'
2
+ VERSION = '0.1.22'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain
@@ -162,6 +162,7 @@ files:
162
162
  - app/views/sibu/sites/_form.html.erb
163
163
  - app/views/sibu/sites/destroy.html.erb
164
164
  - app/views/sibu/sites/edit.html.erb
165
+ - app/views/sibu/sites/edit_styles.html.erb
165
166
  - app/views/sibu/sites/index.html.erb
166
167
  - app/views/sibu/sites/new.html.erb
167
168
  - app/views/sibu/sites/show.html.erb