public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
added overview feed

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@943 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Sat Mar 04 12:20:55 -0800 2006
commit  8aea59b93ec3866d0ac63e30e98e63d5bee3ad11
tree    eb880bcf37d89528ac37dc0c86897d52ae1c7ba9
parent  42976f172573cbfff05af229942afb582a1b9e64
...
13
14
15
16
 
 
 
 
 
17
...
13
14
15
 
16
17
18
19
20
21
0
@@ -13,5 +13,9 @@ class Admin::OverviewController < Admin::BaseController
0
       end << event
0
     end
0
   end
0
-
0
+
0
+ def feed
0
+ @events = Event.find(:all, :order => 'events.created_at DESC', :include => [:article, :user])
0
+ render :layout => false
0
+ end
0
 end
...
1
2
3
4
 
5
6
7
...
1
2
3
 
4
5
6
7
0
@@ -1,6 +1,6 @@
0
 <li class="event-comment<%= " shade" if shaded %>">
0
   <span class="event-time"><%= event_time_for event, later %></span>
0
   <blockquote><p><%= truncate event.body, 100 %></p></blockquote>
0
- <%= link_to event.title, :controller => 'articles', :action => 'show', :id => event.article_id %> was created.
0
+ <%= link_to event.title, :controller => 'articles', :action => 'show', :id => event.article_id %> was commented on.
0
   <span class="meta">by <%= author_link_for event %></span>
0
 </li>
0
\ No newline at end of file
...
2
3
4
5
6
 
 
7
8
9
...
20
21
22
23
 
24
25
26
...
2
3
4
 
 
5
6
7
8
9
...
20
21
22
 
23
24
25
26
0
@@ -2,8 +2,8 @@
0
 <!-- begin action nav -->
0
 <div class="round" id="page-nav">
0
   <ul id="act-nav">
0
- <li><%= link_to "Create new article", :controller => 'articles', :action => "new" %></li>
0
- <li><%= link_to "Create new section", :controller => 'sections' %></li>
0
+ <li><%= link_to "Create new article", :controller => 'articles', :action => "new" %></li>
0
+ <li><%= link_to "Create new section", :controller => 'sections' %></li>
0
     <li><%= link_to "Update your account", :controller => 'users', :action => 'show', :id => current_user %></li>
0
   </ul>
0
 </div>
0
@@ -20,7 +20,7 @@
0
 
0
 <!-- begin overview -->
0
 <div id="overview">
0
- <a href="#" class="feed right">Subscribe via RSS</a>
0
+ <%= link_to 'Subscribe via RSS', overview_url, :class => 'feed right' %>
0
   <h3>Whats happening around <%= current_site.title %></h3>
0
   
0
   <h4>Today <%= todays_short_date %></h4>
...
7
8
9
 
 
10
11
12
...
7
8
9
10
11
12
13
14
0
@@ -7,6 +7,8 @@ ActionController::Routing::Routes.draw do |map|
0
     m.images 'images/*path', :dir => 'images'
0
   end
0
 
0
+ map.overview 'admin/overview.xml', :controller => 'admin/overview', :action => 'feed'
0
+
0
   map.connect ':controller/:action/:id/:version', :version => nil,
0
       :requirements => { :controller => /account|(admin\/\w+)/ }
0
 
...
13
14
15
16
 
 
 
 
 
 
 
 
17
18
19
 
 
 
 
 
20
...
13
14
15
 
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
0
@@ -13,8 +13,20 @@ class Admin::OverviewControllerTest < Test::Unit::TestCase
0
     login_as :quentin
0
   end
0
 
0
- def test_truth
0
+ def test_routing
0
+ with_options :controller => 'admin/overview' do |test|
0
+ test.assert_routing 'admin/overview', :action => 'index'
0
+ test.assert_routing 'admin/overview.xml', :action => 'feed'
0
+ end
0
+ end
0
+
0
+ def test_should_not_explode_on_home_page
0
     get :index
0
     assert_response :success
0
   end
0
+
0
+ def test_should_not_explode_on_feed
0
+ get :feed
0
+ assert_response :success
0
+ end
0
 end

Comments

    No one has commented yet.