comfy_carousel 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +7 -0
- data/LICENSE +20 -0
- data/README.md +35 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/app/assets/javascripts/slides.jquery.js +555 -0
- data/app/assets/javascripts/slides.min.jquery.js +20 -0
- data/app/controllers/admin/carousel/base_controller.rb +10 -0
- data/app/controllers/admin/carousel/carousels_controller.rb +50 -0
- data/app/controllers/admin/carousel/slides_controller.rb +12 -4
- data/app/helpers/carousel/application_helper.rb +12 -0
- data/app/models/carousel/carousel.rb +25 -0
- data/app/models/carousel/slide.rb +21 -17
- data/app/views/admin/carousel/_navigation.html.erb +1 -0
- data/app/views/admin/carousel/carousels/_form.html.erb +4 -0
- data/app/views/admin/carousel/carousels/edit.html.erb +5 -0
- data/app/views/admin/carousel/carousels/index.html.erb +20 -0
- data/app/views/admin/carousel/carousels/new.html.erb +5 -0
- data/app/views/admin/carousel/slides/_form.html.erb +12 -14
- data/app/views/admin/carousel/slides/edit.html.erb +4 -3
- data/app/views/admin/carousel/slides/index.html.erb +20 -21
- data/app/views/admin/carousel/slides/new.html.erb +4 -3
- data/comfy_carousel.gemspec +112 -0
- data/config/application.rb +3 -0
- data/config/environments/development.rb +1 -1
- data/config/environments/test.rb +1 -1
- data/config/initializers/comfy_carousel.rb +12 -0
- data/config/routes.rb +9 -1
- data/db/migrate/01_create_comfy_carousel.rb +17 -2
- data/db/schema.rb +40 -0
- data/lib/comfy_carousel.rb +25 -0
- data/lib/comfy_carousel/configuration.rb +22 -0
- data/lib/comfy_carousel/engine.rb +19 -0
- data/lib/comfy_carousel/form_builder.rb +50 -0
- data/lib/generators/comfy/carousel/README +11 -0
- data/lib/generators/comfy/carousel/carousel_generator.rb +35 -0
- data/lib/tasks/comfy_carousel.rake +4 -0
- data/test/fixtures/carousel/carousels.yml +3 -0
- data/test/fixtures/carousel/slides.yml +9 -0
- data/test/fixtures/files/image.jpg +0 -0
- data/test/functional/admin/carousel/carousels_controller_test.rb +92 -0
- data/test/functional/admin/carousel/slides_controller_test.rb +59 -30
- data/test/test_helper.rb +30 -5
- data/test/unit/carousel_test.rb +30 -0
- data/test/unit/configuration_test.rb +17 -0
- data/test/unit/slide_test.rb +29 -0
- metadata +49 -21
- data/app/assets/images/rails.png +0 -0
- data/app/assets/javascripts/application.js +0 -15
- data/app/assets/stylesheets/application.css +0 -13
- data/app/helpers/application_helper.rb +0 -2
- data/config/environments/production.rb +0 -67
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/inflections.rb +0 -15
- data/config/initializers/mime_types.rb +0 -5
- data/config/initializers/secret_token.rb +0 -7
- data/config/initializers/session_store.rb +0 -8
- data/config/initializers/wrap_parameters.rb +0 -14
- data/db/seeds.rb +0 -7
- data/lib/assets/.gitkeep +0 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
/*
|
2
|
+
* Slides, A Slideshow Plugin for jQuery
|
3
|
+
* Intructions: http://slidesjs.com
|
4
|
+
* By: Nathan Searles, http://nathansearles.com
|
5
|
+
* Version: 1.1.9
|
6
|
+
* Updated: September 5th, 2011
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
*/
|
20
|
+
(function(a){a.fn.slides=function(b){return b=a.extend({},a.fn.slides.option,b),this.each(function(){function w(g,h,i){if(!p&&o){p=!0,b.animationStart(n+1);switch(g){case"next":l=n,k=n+1,k=e===k?0:k,r=f*2,g=-f*2,n=k;break;case"prev":l=n,k=n-1,k=k===-1?e-1:k,r=0,g=0,n=k;break;case"pagination":k=parseInt(i,10),l=a("."+b.paginationClass+" li."+b.currentClass+" a",c).attr("href").match("[^#/]+$"),k>l?(r=f*2,g=-f*2):(r=0,g=0),n=k}h==="fade"?b.crossfade?d.children(":eq("+k+")",c).css({zIndex:10}).fadeIn(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1)}):d.children(":eq("+l+")",c).fadeOut(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing)}):d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing,function(){a.browser.msie&&a(this).get(0).style.removeAttribute("filter")}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+k+")").css({left:r,display:"block"}),b.autoHeight?d.animate({left:g,height:d.children(":eq("+k+")").outerHeight()},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1}):d.animate({left:g},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1})),b.pagination&&(a("."+b.paginationClass+" li."+b.currentClass,c).removeClass(b.currentClass),a("."+b.paginationClass+" li:eq("+k+")",c).addClass(b.currentClass))}}function x(){clearInterval(c.data("interval"))}function y(){b.pause?(clearTimeout(c.data("pause")),clearInterval(c.data("interval")),u=setTimeout(function(){clearTimeout(c.data("pause")),v=setInterval(function(){w("next",i)},b.play),c.data("interval",v)},b.pause),c.data("pause",u)):x()}a("."+b.container,a(this)).children().wrapAll('<div class="slides_control"/>');var c=a(this),d=a(".slides_control",c),e=d.children().size(),f=d.children().outerWidth(),g=d.children().outerHeight(),h=b.start-1,i=b.effect.indexOf(",")<0?b.effect:b.effect.replace(" ","").split(",")[0],j=b.effect.indexOf(",")<0?i:b.effect.replace(" ","").split(",")[1],k=0,l=0,m=0,n=0,o,p,q,r,s,t,u,v;if(e<2)return a("."+b.container,a(this)).fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()}),a("."+b.next+", ."+b.prev).fadeOut(0),!1;if(e<2)return;h<0&&(h=0),h>e&&(h=e-1),b.start&&(n=h),b.randomize&&d.randomize(),a("."+b.container,c).css({overflow:"hidden",position:"relative"}),d.children().css({position:"absolute",top:0,left:d.children().outerWidth(),zIndex:0,display:"none"}),d.css({position:"relative",width:f*3,height:g,left:-f}),a("."+b.container,c).css({display:"block"}),b.autoHeight&&(d.children().css({height:"auto"}),d.animate({height:d.children(":eq("+h+")").outerHeight()},b.autoHeightSpeed));if(b.preload&&d.find("img:eq("+h+")").length){a("."+b.container,c).css({background:"url("+b.preloadImage+") no-repeat 50% 50%"});var z=d.find("img:eq("+h+")").attr("src")+"?"+(new Date).getTime();a("img",c).parent().attr("class")!="slides_control"?t=d.children(":eq(0)")[0].tagName.toLowerCase():t=d.find("img:eq("+h+")"),d.find("img:eq("+h+")").attr("src",z).load(function(){d.find(t+":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){a(this).css({zIndex:5}),a("."+b.container,c).css({background:""}),o=!0,b.slidesLoaded()})})}else d.children(":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()});b.bigTarget&&(d.children().css({cursor:"pointer"}),d.children().click(function(){return w("next",i),!1})),b.hoverPause&&b.play&&(d.bind("mouseover",function(){x()}),d.bind("mouseleave",function(){y()})),b.generateNextPrev&&(a("."+b.container,c).after('<a href="#" class="'+b.prev+'">Prev</a>'),a("."+b.prev,c).after('<a href="#" class="'+b.next+'">Next</a>')),a("."+b.next,c).click(function(a){a.preventDefault(),b.play&&y(),w("next",i)}),a("."+b.prev,c).click(function(a){a.preventDefault(),b.play&&y(),w("prev",i)}),b.generatePagination?(b.prependPagination?c.prepend("<ul class="+b.paginationClass+"></ul>"):c.append("<ul class="+b.paginationClass+"></ul>"),d.children().each(function(){a("."+b.paginationClass,c).append('<li><a href="#'+m+'">'+(m+1)+"</a></li>"),m++})):a("."+b.paginationClass+" li a",c).each(function(){a(this).attr("href","#"+m),m++}),a("."+b.paginationClass+" li:eq("+h+")",c).addClass(b.currentClass),a("."+b.paginationClass+" li a",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$"),n!=q&&w("pagination",j,q),!1}),a("a.link",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$")-1,n!=q&&w("pagination",j,q),!1}),b.play&&(v=setInterval(function(){w("next",i)},b.play),c.data("interval",v))})},a.fn.slides.option={preload:!1,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}},a.fn.randomize=function(b){function c(){return Math.round(Math.random())-.5}return a(this).each(function(){var d=a(this),e=d.children(),f=e.length;if(f>1){e.hide();var g=[];for(i=0;i<f;i++)g[g.length]=i;g=g.sort(c),a.each(g,function(a,c){var f=e.eq(c),g=f.clone(!0);g.show().appendTo(d),b!==undefined&&b(f,g),f.remove()})}})}})(jQuery)
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class Admin::Carousel::BaseController < ComfyCarousel.config.admin_controller.to_s.constantize
|
2
|
+
|
3
|
+
def load_carousel
|
4
|
+
@carousel = Carousel::Carousel.find(params[:carousel_id] || params[:id])
|
5
|
+
rescue ActiveRecord::RecordNotFound
|
6
|
+
flash[:error] = 'Carousel not found'
|
7
|
+
redirect_to admin_carousel_carousels_path
|
8
|
+
end
|
9
|
+
|
10
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
class Admin::Carousel::CarouselsController < Admin::Carousel::BaseController
|
2
|
+
|
3
|
+
before_filter :build_carousel, :only => [:new, :create]
|
4
|
+
before_filter :load_carousel, :only => [:edit, :update, :destroy]
|
5
|
+
|
6
|
+
def index
|
7
|
+
@carousels = Carousel::Carousel.all
|
8
|
+
end
|
9
|
+
|
10
|
+
def new
|
11
|
+
render
|
12
|
+
end
|
13
|
+
|
14
|
+
def edit
|
15
|
+
render
|
16
|
+
end
|
17
|
+
|
18
|
+
def create
|
19
|
+
@carousel.save!
|
20
|
+
flash[:notice] = 'Carousel created'
|
21
|
+
redirect_to new_admin_carousel_carousel_slide_path(@carousel)
|
22
|
+
|
23
|
+
rescue ActiveRecord::RecordInvalid
|
24
|
+
flash.now[:error] = 'Failed to create Carousel'
|
25
|
+
render :action => :new
|
26
|
+
end
|
27
|
+
|
28
|
+
def update
|
29
|
+
@carousel.update_attributes!(params[:carousel])
|
30
|
+
flash[:notice] = 'Carousel updated'
|
31
|
+
redirect_to :action => :edit, :id => @carousel
|
32
|
+
|
33
|
+
rescue ActiveRecord::RecordInvalid
|
34
|
+
flash.now[:error] = 'Failed to update Carousel'
|
35
|
+
render :action => :edit
|
36
|
+
end
|
37
|
+
|
38
|
+
def destroy
|
39
|
+
@carousel.destroy
|
40
|
+
flash[:notice] = 'Carousel removed'
|
41
|
+
redirect_to :action => :index
|
42
|
+
end
|
43
|
+
|
44
|
+
protected
|
45
|
+
|
46
|
+
def build_carousel
|
47
|
+
@carousel = Carousel::Carousel.new(params[:carousel])
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
@@ -1,10 +1,11 @@
|
|
1
|
-
class Admin::Carousel::SlidesController <
|
1
|
+
class Admin::Carousel::SlidesController < Admin::Carousel::BaseController
|
2
2
|
|
3
|
+
before_filter :load_carousel
|
3
4
|
before_filter :build_slide, :only => [:new, :create]
|
4
5
|
before_filter :load_slide, :only => [:edit, :update, :destroy]
|
5
6
|
|
6
7
|
def index
|
7
|
-
@slides =
|
8
|
+
@slides = @carousel.slides
|
8
9
|
end
|
9
10
|
|
10
11
|
def new
|
@@ -38,15 +39,22 @@ class Admin::Carousel::SlidesController < CmsAdmin::BaseController
|
|
38
39
|
flash[:notice] = 'Slide deleted'
|
39
40
|
redirect_to :action => :index
|
40
41
|
end
|
42
|
+
|
43
|
+
def reorder
|
44
|
+
(params[:carousel_slide] || []).each_with_index do |id, index|
|
45
|
+
Carousel::Slide.where(:id => id).update_all(:position => index)
|
46
|
+
end
|
47
|
+
render :nothing => true
|
48
|
+
end
|
41
49
|
|
42
50
|
protected
|
43
51
|
|
44
52
|
def build_slide
|
45
|
-
@slide =
|
53
|
+
@slide = @carousel.slides.new(params[:slide])
|
46
54
|
end
|
47
55
|
|
48
56
|
def load_slide
|
49
|
-
@slide =
|
57
|
+
@slide = @carousel.slides.find(params[:id])
|
50
58
|
rescue ActiveRecord::RecordNotFound
|
51
59
|
flash[:error] = 'Slide not found'
|
52
60
|
redirect_to :action => :index
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Carousel::ApplicationHelper
|
2
|
+
|
3
|
+
def comfy_form_for(record_or_name_or_array, *args, &proc)
|
4
|
+
options = args.extract_options!
|
5
|
+
form_for(
|
6
|
+
record_or_name_or_array,
|
7
|
+
*(args << options.merge(:builder => ComfyCarousel.config.form_builder.to_s.constantize)),
|
8
|
+
&proc
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class Carousel::Carousel < ActiveRecord::Base
|
2
|
+
|
3
|
+
self.table_name = :carousel_carousels
|
4
|
+
|
5
|
+
# -- Relationships --------------------------------------------------------
|
6
|
+
has_many :slides,
|
7
|
+
:dependent => :destroy
|
8
|
+
|
9
|
+
# -- Validations ----------------------------------------------------------
|
10
|
+
validates :label,
|
11
|
+
:presence => true
|
12
|
+
validates :identifier,
|
13
|
+
:presence => true,
|
14
|
+
:format => { :with => /^\w[a-z0-9_-]*$/i }
|
15
|
+
|
16
|
+
# -- Callbacks ------------------------------------------------------------
|
17
|
+
before_validation :assign_label
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
def assign_label
|
22
|
+
self.label = self.label.blank?? self.identifier.try(:titleize) : self.label
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -1,23 +1,27 @@
|
|
1
1
|
class Carousel::Slide < ActiveRecord::Base
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
:title,
|
13
|
-
:sort
|
14
|
-
|
15
|
-
# -- Validations ----------------------------------------------------------
|
3
|
+
self.table_name = :carousel_slides
|
4
|
+
|
5
|
+
has_attached_file :file
|
6
|
+
|
7
|
+
# -- Relationships --------------------------------------------------------
|
8
|
+
belongs_to :carousel
|
9
|
+
|
10
|
+
# -- Callbacks ------------------------------------------------------------
|
11
|
+
before_create :assign_position
|
16
12
|
|
17
|
-
|
18
|
-
|
19
|
-
:title,
|
20
|
-
:sort,
|
13
|
+
# -- Validations ----------------------------------------------------------
|
14
|
+
validates :carousel_id, :label,
|
21
15
|
:presence => true
|
16
|
+
|
17
|
+
# -- Scopes ---------------------------------------------------------------
|
18
|
+
default_scope order('carousel_slides.position')
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
def assign_position
|
23
|
+
max = carousel.slides.maximum(:position)
|
24
|
+
self.position = max ? max + 1 : 0
|
25
|
+
end
|
22
26
|
|
23
27
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<li><%= active_link_to 'Carousels', admin_carousel_carousels_path %></li>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%= link_to 'Add New Carousel', new_admin_carousel_carousel_path, :class => 'big button' %>
|
2
|
+
|
3
|
+
<h1>Carousels</h1>
|
4
|
+
|
5
|
+
<ul class='list'>
|
6
|
+
<% @carousels.each do |carousel| %>
|
7
|
+
<li>
|
8
|
+
<div class='item'>
|
9
|
+
<div class='icon'></div>
|
10
|
+
<div class='action_links'>
|
11
|
+
<%= link_to 'Edit', edit_admin_carousel_carousel_path(carousel) %>
|
12
|
+
<%= link_to 'Delete', admin_carousel_carousel_path(carousel), :method => :delete, :confirm => 'Are you sure?' %>
|
13
|
+
</div>
|
14
|
+
<div class='label'>
|
15
|
+
<%= link_to carousel.label, admin_carousel_carousel_slides_path(carousel) %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</li>
|
19
|
+
<% end %>
|
20
|
+
</ul>
|
@@ -1,15 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
= form.text_field :sort
|
6
|
-
= form.file_field :slide, :label => "Slide Image"
|
7
|
-
- if @slide.slide.url
|
8
|
-
.form_element
|
9
|
-
.label
|
10
|
-
%label Current Image
|
11
|
-
.value= image_tag @slide.slide.url(:edit_page)
|
12
|
-
= form.text_field :url, :label => "Link to"
|
13
|
-
= form.text_area :description
|
1
|
+
<%= form.text_field :label %>
|
2
|
+
<%= form.text_area :content %>
|
3
|
+
<%= form.text_field :url %>
|
4
|
+
<%= form.file_field :file %>
|
14
5
|
|
15
|
-
|
6
|
+
<% if defined?(ComfortableMexicanSofa) %>
|
7
|
+
<% content_for :right_column do %>
|
8
|
+
<%= render :partial => 'cms_admin/files/index' %>
|
9
|
+
<% end %>
|
10
|
+
<%= cms_hook :carousel_slide, :locals => { :form => form } %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= form.submit (@slide.new_record? ? 'Create Slide' : 'Update Slide') %>
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
<h1>Editing Slide</h1>
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
<%= comfy_form_for @slide, :as => :slide, :url => {:action => :update} do |form| %>
|
4
|
+
<%= render :partial => form %>
|
5
|
+
<% end %>
|
@@ -1,23 +1,22 @@
|
|
1
|
-
|
2
|
-
%h1 Slides
|
1
|
+
<%= link_to 'Add New Slide', new_admin_carousel_carousel_slide_path(@carousel), :class => 'big button' %>
|
3
2
|
|
4
|
-
|
3
|
+
<h1>Slides</h1>
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
5
|
+
<ul class='list sortable'>
|
6
|
+
<% @slides.each do |slide| %>
|
7
|
+
<li id='carousel_slide_<%= slide.id %>'>
|
8
|
+
<div class='item'>
|
9
|
+
<div class='icon'>
|
10
|
+
<div class='dragger'><span>order</span></div>
|
11
|
+
</div>
|
12
|
+
<div class='action_links'>
|
13
|
+
<%= link_to 'Edit', edit_admin_carousel_carousel_slide_path(@carousel, slide) %>
|
14
|
+
<%= link_to 'Delete', admin_carousel_carousel_slide_path(@carousel, slide), :method => :delete, :confirm => 'Are you sure?' %>
|
15
|
+
</div>
|
16
|
+
<div class='label'>
|
17
|
+
<%= link_to slide.label, edit_admin_carousel_carousel_slide_path(@carousel, slide) %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
</li>
|
21
|
+
<% end %>
|
22
|
+
</ul>
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
<h1>New Slide</h1>
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
<%= comfy_form_for @slide, :as => :slide, :url => {:action => :create} do |form| %>
|
4
|
+
<%= render :partial => form %>
|
5
|
+
<% end %>
|
@@ -0,0 +1,112 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "comfy_carousel"
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Oleg Khabarov", "The Working Group Inc."]
|
12
|
+
s.date = "2012-02-07"
|
13
|
+
s.description = ""
|
14
|
+
s.email = "oleg@twg.ca"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
"Gemfile",
|
21
|
+
"Gemfile.lock",
|
22
|
+
"LICENSE",
|
23
|
+
"README.md",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"app/assets/javascripts/slides.jquery.js",
|
27
|
+
"app/assets/javascripts/slides.min.jquery.js",
|
28
|
+
"app/controllers/admin/carousel/base_controller.rb",
|
29
|
+
"app/controllers/admin/carousel/carousels_controller.rb",
|
30
|
+
"app/controllers/admin/carousel/slides_controller.rb",
|
31
|
+
"app/controllers/application_controller.rb",
|
32
|
+
"app/helpers/carousel/application_helper.rb",
|
33
|
+
"app/models/.gitkeep",
|
34
|
+
"app/models/carousel/carousel.rb",
|
35
|
+
"app/models/carousel/slide.rb",
|
36
|
+
"app/views/admin/carousel/_navigation.html.erb",
|
37
|
+
"app/views/admin/carousel/carousels/_form.html.erb",
|
38
|
+
"app/views/admin/carousel/carousels/edit.html.erb",
|
39
|
+
"app/views/admin/carousel/carousels/index.html.erb",
|
40
|
+
"app/views/admin/carousel/carousels/new.html.erb",
|
41
|
+
"app/views/admin/carousel/slides/_form.html.erb",
|
42
|
+
"app/views/admin/carousel/slides/edit.html.erb",
|
43
|
+
"app/views/admin/carousel/slides/index.html.erb",
|
44
|
+
"app/views/admin/carousel/slides/new.html.erb",
|
45
|
+
"app/views/layouts/application.html.erb",
|
46
|
+
"comfy_carousel.gemspec",
|
47
|
+
"config.ru",
|
48
|
+
"config/application.rb",
|
49
|
+
"config/boot.rb",
|
50
|
+
"config/database.yml",
|
51
|
+
"config/environment.rb",
|
52
|
+
"config/environments/development.rb",
|
53
|
+
"config/environments/test.rb",
|
54
|
+
"config/initializers/comfy_carousel.rb",
|
55
|
+
"config/locales/en.yml",
|
56
|
+
"config/routes.rb",
|
57
|
+
"db/migrate/01_create_comfy_carousel.rb",
|
58
|
+
"db/schema.rb",
|
59
|
+
"doc/README_FOR_APP",
|
60
|
+
"lib/comfy_carousel.rb",
|
61
|
+
"lib/comfy_carousel/configuration.rb",
|
62
|
+
"lib/comfy_carousel/engine.rb",
|
63
|
+
"lib/comfy_carousel/form_builder.rb",
|
64
|
+
"lib/generators/comfy/carousel/README",
|
65
|
+
"lib/generators/comfy/carousel/carousel_generator.rb",
|
66
|
+
"lib/tasks/.gitkeep",
|
67
|
+
"lib/tasks/comfy_carousel.rake",
|
68
|
+
"log/.gitkeep",
|
69
|
+
"script/rails",
|
70
|
+
"test/fixtures/.gitkeep",
|
71
|
+
"test/fixtures/carousel/carousels.yml",
|
72
|
+
"test/fixtures/carousel/slides.yml",
|
73
|
+
"test/fixtures/files/image.jpg",
|
74
|
+
"test/functional/.gitkeep",
|
75
|
+
"test/functional/admin/carousel/carousels_controller_test.rb",
|
76
|
+
"test/functional/admin/carousel/slides_controller_test.rb",
|
77
|
+
"test/integration/.gitkeep",
|
78
|
+
"test/performance/browsing_test.rb",
|
79
|
+
"test/test_helper.rb",
|
80
|
+
"test/unit/.gitkeep",
|
81
|
+
"test/unit/carousel_test.rb",
|
82
|
+
"test/unit/configuration_test.rb",
|
83
|
+
"test/unit/slide_test.rb",
|
84
|
+
"vendor/assets/javascripts/.gitkeep",
|
85
|
+
"vendor/assets/stylesheets/.gitkeep",
|
86
|
+
"vendor/plugins/.gitkeep"
|
87
|
+
]
|
88
|
+
s.homepage = "http://github.com/comfy/comfy_carousel"
|
89
|
+
s.licenses = ["MIT"]
|
90
|
+
s.require_paths = ["lib"]
|
91
|
+
s.rubygems_version = "1.8.10"
|
92
|
+
s.summary = "ComfyCarousel is a carousel engine for Rails 3.1+ apps (and ComfortableMexicanSofa)"
|
93
|
+
|
94
|
+
if s.respond_to? :specification_version then
|
95
|
+
s.specification_version = 3
|
96
|
+
|
97
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
98
|
+
s.add_runtime_dependency(%q<rails>, [">= 3.1.0"])
|
99
|
+
s.add_runtime_dependency(%q<jquery-rails>, [">= 1.0.0"])
|
100
|
+
s.add_runtime_dependency(%q<paperclip>, [">= 2.3.0"])
|
101
|
+
else
|
102
|
+
s.add_dependency(%q<rails>, [">= 3.1.0"])
|
103
|
+
s.add_dependency(%q<jquery-rails>, [">= 1.0.0"])
|
104
|
+
s.add_dependency(%q<paperclip>, [">= 2.3.0"])
|
105
|
+
end
|
106
|
+
else
|
107
|
+
s.add_dependency(%q<rails>, [">= 3.1.0"])
|
108
|
+
s.add_dependency(%q<jquery-rails>, [">= 1.0.0"])
|
109
|
+
s.add_dependency(%q<paperclip>, [">= 2.3.0"])
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|