beef-slides 0.2.4 → 1.0.0

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 1.0.0
@@ -18,7 +18,7 @@
18
18
  <td><%= link_to slide_show.title, admin_slide_show_slides_path(slide_show) %></td>
19
19
  <td><%= link_to pluralize(slide_show.slides.count, "Slide"), admin_slide_show_slides_path(slide_show) %></td>
20
20
  <td><%= link_to 'Edit', admin_slide_show_path(slide_show), :class => 'edit' %></td>
21
- <td><%= link_to 'Destroy', admin_slide_show_path(slide_show), :confirm => 'Are you sure?', :method => :delete, :class => 'delete' %></td>
21
+ <td><%= link_to 'Destroy', admin_slide_show_path(slide_show), :confirm => 'Are you sure?', :method => :delete, :class => 'delete' unless slide_show.lock_level >=1 || !current_user.admin? %></td>
22
22
  </tr>
23
23
  <% end %>
24
24
  </tbody>
@@ -3,10 +3,19 @@
3
3
  <% form_for([:admin, @slide_show]) do |f| %>
4
4
  <%= f.error_messages %>
5
5
 
6
+ <% if @slide_show.lock_level < 3 %>
6
7
  <p>
7
8
  <%= f.label :title %><br />
8
9
  <%= f.text_field :title %>
9
10
  </p>
11
+ <% else %>
12
+ <p>
13
+ <%= f.label :title %><br />
14
+ <%= @slide_show.title %> (locked)
15
+ </p>
16
+ <% end %>
17
+
18
+
10
19
  <p class="submission">
11
20
  <%= f.submit @slide_show.new_record? ? 'Create' : 'Update', :disable_with => 'Submitting...' %> or <%= link_to 'Cancel', admin_slide_shows_path %>
12
21
  </p>
@@ -13,7 +13,8 @@ class CreateSlides < ActiveRecord::Migration
13
13
  t.integer :size, :height, :width
14
14
  t.references :parent, :slide_show
15
15
  t.string :thumbnail
16
-
16
+ t.integer :lock_level, :default => 0
17
+
17
18
  t.timestamps
18
19
  end
19
20
 
data/slides.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{slides}
8
- s.version = "0.2.4"
8
+ s.version = "1.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Craig"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beef-slides
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Craig