sibu 0.5.0 → 0.5.1

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: 3ab0e87dab04c591e1072ba7606a327ab09c39b2
4
- data.tar.gz: 55ad274ae00c536177c6b1b558a7c39bfc23b205
3
+ metadata.gz: 405cd4af1f8845dfe4b6231e130430052ffac0c4
4
+ data.tar.gz: 4a482f965d0b363a14ab74e4e4abee76ebb6fd17
5
5
  SHA512:
6
- metadata.gz: 6630c445f0902e0be6e6e0256b954a5815afa031c3fa3b5b3c7fc0dffa3dd39d18c64e44b5ac3e64e3edbf80a5bf035e499245c79b6625db356b0e8227d74ab3
7
- data.tar.gz: 4b8dc78d1031281490e6c6c2a43a9c75586783617358c3f323a37e6c8b1fa719656b35e3cb376a410ec053ef943ca991c8c4d78bb058fc24d7be25a175abe1cb
6
+ metadata.gz: 6da521391429cc8abfad5c2e2d807506d0a47d0b7a764caa3036cc75cc5fbfa6a9ba0e045f095c3a366dced3fbd629f925440d599b1a55ce925fc4efa54363b8
7
+ data.tar.gz: 15de774f8eb8b486cc37d4a3c63ef6ab8f73b3469e87ea58450716436dab9737e6cff4bd8ad4b214ee47b923bdc9e114d448c3b1ad353b020d9757e430ee0afd
@@ -6,7 +6,7 @@ module Sibu
6
6
  before_action :set_edition_context, only: [:new, :create]
7
7
 
8
8
  def index
9
- @images = Sibu::Image.for_user(sibu_user)
9
+ @images = Sibu::Image.shared + Sibu::Image.for_user(sibu_user)
10
10
  end
11
11
 
12
12
  def new
@@ -1,17 +1,19 @@
1
1
  <div class="sibu_image_preview">
2
2
  <%= image_tag @image.file_url(:medium) %>
3
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>
4
+ <% if @image.user_id %>
5
+ <%= form_for(@image) do |f| %>
6
+ <div class="sibu_field">
7
+ <%= f.label :alt, "Légende / texte alternatif" %>
8
+ <div>
9
+ <%= f.text_field :alt %><br/>
10
+ <small>Renseignez un texte décrivant l'image</small>
11
+ </div>
10
12
  </div>
11
- </div>
12
- <%= f.hidden_field :user_id %>
13
- <div class="sibu_actions">
14
- <%= f.submit 'Mettre à jour' %>
15
- <%= link_to 'Supprimer', image_path(@image.id), method: :delete, data: {confirm: "Supprimer l'image ?", disable_with: "Suppression en cours..."} %>
16
- </div>
13
+ <%= f.hidden_field :user_id %>
14
+ <div class="sibu_actions">
15
+ <%= f.submit 'Mettre à jour' %>
16
+ <%= link_to 'Supprimer', image_path(@image.id), method: :delete, data: {confirm: "Supprimer l'image ?", disable_with: "Suppression en cours..."} %>
17
+ </div>
18
+ <% end %>
17
19
  <% end %>
data/lib/sibu/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.5.0'
2
+ VERSION = '0.5.1'
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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain