beef-slides 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.7
1
+ 1.1.8
@@ -77,7 +77,10 @@ class Admin::SlidesController < Admin::BaseController
77
77
  @slide.destroy
78
78
 
79
79
  respond_to do |format|
80
- format.html { redirect_to( @slide.slide_show ? admin_slide_show_slides_url(@slide.slide_show) : admin_slides_url ) }
80
+ format.html do
81
+ flash[:notice] = 'Slide was successfully deleted.'
82
+ redirect_to( @slide.slide_show ? admin_slide_show_slides_url(@slide.slide_show) : admin_slides_url )
83
+ end
81
84
  format.xml { head :ok }
82
85
  end
83
86
  end
@@ -2,7 +2,7 @@ class SlidesController < ApplicationController
2
2
 
3
3
  def index
4
4
  respond_to do |format|
5
- format.json { render :json => Slide.all }
5
+ format.json { render :json => Slide.published }
6
6
  end
7
7
  end
8
8
 
@@ -10,7 +10,7 @@ class Slide < ActiveRecord::Base
10
10
  validate :attachment_attributes_valid?, :if => :has_file?
11
11
  belongs_to :slide_show
12
12
 
13
- attr_accessible :slide_show_id, :title, :date, :link, :strapline, :publish, :hide, :uploaded_data, :body
13
+ attr_accessible :slide_show_id, :title, :date, :link, :strapline, :publish, :hide, :uploaded_data, :body, :published_at, :published_to
14
14
 
15
15
  default_scope :order => 'position ASC'
16
16
 
@@ -11,8 +11,8 @@
11
11
  <th>Image</th>
12
12
  <%= sortable_table_header :name => "Title", :sort => "title" %>
13
13
  <th>Status</th>
14
- <%= sortable_table_header :name => "Created At", :sort => "created_at" %>
15
- <%= sortable_table_header :name => "Updated At", :sort => "updated_at" %>
14
+ <%= sortable_table_header :name => "Created", :sort => "created_at" %>
15
+ <%= sortable_table_header :name => "Updated", :sort => "updated_at" %>
16
16
  <%= sortable_table_header :name => "Published At", :sort => "published_at" %>
17
17
  <%= sortable_table_header :name => "Published To", :sort => "published_to" %>
18
18
  <th>Actions</th>
@@ -22,14 +22,14 @@
22
22
  <tbody>
23
23
  <% @slides.each do |slide| %>
24
24
  <tr>
25
- <th><%= slide.position %></th>
25
+ <td><%= slide.position %></td>
26
26
  <td><%= image_tag slide.public_filename, :width => 100 unless slide.filename == 'no_file' %></td>
27
27
  <td><%=h slide.title %></td>
28
28
  <td><%= content_status(slide) %></td>
29
- <td><%=h slide.created_at.strftime('%d %b') %></td>
30
- <td><%=h slide.updated_at.strftime('%d %b') %></td>
31
- <td><%=h slide.published_at.strftime('%d %b') unless slide.published_at.blank? %></td>
32
- <td><%=h slide.published_to.strftime('%d %b') unless slide.published_to.blank? %></td>
29
+ <td><%=h slide.created_at.to_formatted_s(:short) %></td>
30
+ <td><%=h slide.updated_at.to_formatted_s(:short) %></td>
31
+ <td><%=h slide.published_at.to_formatted_s(:short) unless slide.published_at.blank? %></td>
32
+ <td><%=h slide.published_to.to_formatted_s(:short) unless slide.published_to.blank? %></td>
33
33
  <td>
34
34
  <%= link_to 'Move Up', move_up_admin_slide_path(slide), :class => 'move-up' unless slide.first? %>
35
35
  <%= link_to 'Move Down', move_down_admin_slide_path(slide), :class => 'move-down' unless slide.last? %>
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beef-slides}
8
- s.version = "1.1.7"
8
+ s.version = "1.1.8"
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"]
12
- s.date = %q{2009-11-02}
12
+ s.date = %q{2010-01-05}
13
13
  s.email = %q{daniel@wearebeef.co.uk}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
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: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Craig
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-02 00:00:00 +00:00
12
+ date: 2010-01-05 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies: []
15
15