public
Description: Newsletter system based on Radiant CMS
Homepage: http://gravityblast.com/projects/radiant-newsletter-extension/
Clone URL: git://github.com/pilu/radiant-newsletter.git
Search Repo:
Now it uses the will_paginate plugin for pagination
pilu (author)
Sat Apr 05 06:23:22 -0700 2008
commit  97ac36c26da151a7bffdbfcea2ee616f910be00b
tree    499fcf7ad8f87f3fab541aebb829cbb742634aa4
parent  51ccb2ba7e099a1698d8b51aadb8eac5a3394fa2
0
...
1
2
3
4
 
5
6
7
...
22
23
24
 
 
 
 
25
26
27
...
1
2
3
 
4
5
6
7
...
22
23
24
25
26
27
28
29
30
31
0
@@ -1,7 +1,7 @@
0
 = Newsletter
0
   
0
   Created by: Andrea Franz - http://gravityblast.com
0
- Version: 0.1.4
0
+ Version: 0.1.5
0
   Contact: andrea AT gravityblast DOT com
0
 
0
 This extensions adds a newsletter system to RadiantCMS
0
@@ -22,6 +22,10 @@ More info can be found at the following url:
0
   environment.rb:
0
 
0
     config.extensions = [ :shards, :all ]
0
+
0
+ Also you need to install the will_paginate rails plugin, you can find more info here:
0
+
0
+ http://rock.errtheblog.com/will_paginate
0
 
0
   Then you can proceed with installation:
0
                                                            
...
8
9
10
11
 
12
13
14
...
8
9
10
 
11
12
13
14
0
@@ -8,7 +8,7 @@ class NewsletterSubscribersController < ApplicationController
0
     @list_options[:by] = params[:by] if params[:by] && NewsletterSubscriber.columns.find{|column| column.name == params[:by]}
0
     @list_options[:order] = params[:order].to_s.downcase if ['desc', 'asc'].include?(params[:order].to_s.downcase)
0
     @list_options[:pp] = params[:pp].to_i if params[:pp].to_i > 1
0
- @subscribers_pages, @subscribers = paginate(:newsletter_subscriber, :conditions => ["newsletter_id = ?", @newsletter.id], :per_page => @list_options[:pp], :order => "#{@list_options[:by]} #{@list_options[:order]}")
0
+ @subscribers = NewsletterSubscriber.paginate(:page => params[:page], :per_page => '10', :conditions => ["newsletter_id = ?", @newsletter.id], :per_page => @list_options[:pp], :order => "#{@list_options[:by]} #{@list_options[:order]}")
0
   end
0
 
0
   def new
...
28
29
30
31
 
32
33
34
35
...
28
29
30
 
31
32
33
34
35
0
@@ -28,7 +28,7 @@
0
 </table>
0
 
0
 <div style="text-align: center; margin-top: 10px">
0
- <%= pagination_links @subscribers_pages, :params => @list_options %>
0
+ <%= will_paginate @subscribers, :params => @list_options %>
0
 </div>
0
 
0
 <%= link_to 'New subscriber', :action => 'new' %>
0
\ No newline at end of file
...
2
3
4
5
 
6
7
8
...
2
3
4
 
5
6
7
8
0
@@ -2,7 +2,7 @@
0
 # require_dependency 'application'
0
 
0
 class NewsletterExtension < Radiant::Extension
0
- version "0.1.4"
0
+ version "0.1.5"
0
   description "Adds a newsletter system to RadiantCMS"
0
   url "http://gravityblast.com/projects/radiant-newsletter-extension/"
0
   

Comments

    No one has commented yet.