Changeset 1194

Show
Ignore:
Timestamp:
07/02/08 14:32:08 (6 months ago)
Author:
kovit
Message:

Add 'comment/recent-user'

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/comment_controller.rb

    r1172 r1194  
    3939 end 
    4040 
     41  def recent_user 
     42    @title = _("Recent Comments By User") 
     43    @comments = Comment.paginate(:page => params[:page], :order => "created_at DESC" , :conditions => "user_id != 0" , :per_page => $ITEMS_PER_PAGE ) 
     44    respond_to do |format| 
     45      format.html { render :partial => 'comment_list', :layout => true } 
     46      format.all { redirect_to :action => "recent_anonymous" } 
     47    end   
     48 end 
     49 
    4150end 
  • trunk/config/routes.rb

    r1172 r1194  
    103103  map.portal_my_recently_asking_questions "portal/:username/my-recently-asking-questions", :controller => "portal", :action => "my_recently_asking_questions", :username => re_username 
    104104  map.portal_recently_commented_questions "portal/:username/recently-commented-questions", :controller => "portal", :action => "recently_commented_questions", :username => re_username 
     105 
     106  map.portal_my_recent_journal "portal/:username/my-recent-journal", :controller => "portal", :action => "my_recent_journal", :username => re_username 
     107  map.portal_my_journal_monitor "portal/:username/my-journal-monitor", :controller => "portal", :action => "my_journal_monitor", :username => re_username 
    105108 
    106109  # profile 
     
    354357  map.comment_recent "comment/recent", :controller => "comment", :action => "recent" 
    355358  map.comment_recent_anonymous "comment/recent-anonymous", :controller => "comment", :action => "recent_anonymous" 
     359  map.comment_recent_user "comment/recent-user", :controller => "comment", :action => "recent_user" 
    356360  map.comment_user "comment/:username", :controller => "comment", :action => "user", :username => re_username 
    357361