| 1 |
class SiteController < ApplicationController |
| 2 |
|
| 3 |
before_filter :login_required, :only => [ :dashboard ] |
| 4 |
|
| 5 |
def index |
| 6 |
@articles = Article.find_home(current_user) |
| 7 |
render :action => "ac_index" |
| 8 |
end |
| 9 |
|
| 10 |
def dashboard |
| 11 |
@projects = current_user.projects |
| 12 |
project_ids = @projects.map(&:id) |
| 13 |
@recent_comments = Comment.find(:all, :limit => 10, |
| 14 |
:conditions => ["comments.project_id in (?)", project_ids], |
| 15 |
:order => "comments.created_at desc", :include => [:user, :repository]) |
| 16 |
@repository_clones = Repository.find(:all, :order => "created_at desc", |
| 17 |
:conditions => ["project_id in (?) and mainline = ?", project_ids, false]) |
| 18 |
|
| 19 |
@repositories = current_user.repositories.find(:all, :conditions => ["mainline = ?", false]) |
| 20 |
end |
| 21 |
|
| 22 |
def about |
| 23 |
|
| 24 |
@wiki = Wiki.find_by_slug("about") |
| 25 |
@wiki_breadcrumb = false |
| 26 |
@title = "About" |
| 27 |
render :action => 'ac_about' |
| 28 |
end |
| 29 |
|
| 30 |
def faq |
| 31 |
end |
| 32 |
|
| 33 |
end |