Revision 1015:52be96e83080 app/controllers
| app/controllers/activities_controller.rb | ||
|---|---|---|
| 40 | 40 |
|
| 41 | 41 |
events = @activity.events(@date_from, @date_to) |
| 42 | 42 |
|
| 43 |
if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, events.first, User.current, current_language]) |
|
| 43 |
@institution_name = params[:institution] |
|
| 44 |
if !@institution_name.blank? |
|
| 45 |
events = events.select do |e| |
|
| 46 |
e.respond_to?(:event_author) and e.event_author and |
|
| 47 |
e.event_author.respond_to?(:ssamr_user_detail) and |
|
| 48 |
!e.event_author.ssamr_user_detail.nil? and |
|
| 49 |
e.event_author.ssamr_user_detail.institution_name == @institution_name |
|
| 50 |
end |
|
| 51 |
if events.empty? |
|
| 52 |
# We don't want to dump into the output any arbitrary string |
|
| 53 |
# from the URL that has no matching events |
|
| 54 |
@institution_name = "" |
|
| 55 |
end |
|
| 56 |
end |
|
| 57 |
|
|
| 58 |
if events.empty? || stale?(:etag => [@activity.scope, @date_to, @date_from, @with_subprojects, @author, @institution_name, events.first, User.current, current_language]) |
|
| 44 | 59 |
respond_to do |format| |
| 45 | 60 |
format.html {
|
| 46 | 61 |
@events_by_day = events.group_by(&:event_date) |
| app/controllers/projects_controller.rb | ||
|---|---|---|
| 20 | 20 |
menu_item :roadmap, :only => :roadmap |
| 21 | 21 |
menu_item :settings, :only => :settings |
| 22 | 22 |
|
| 23 |
before_filter :find_project, :except => [ :index, :list, :new, :create, :copy ] |
|
| 24 |
before_filter :authorize, :except => [ :index, :list, :new, :create, :copy, :archive, :unarchive, :destroy] |
|
| 23 |
before_filter :find_project, :except => [ :index, :list, :explore, :new, :create, :copy ]
|
|
| 24 |
before_filter :authorize, :except => [ :index, :list, :explore, :new, :create, :copy, :archive, :unarchive, :destroy]
|
|
| 25 | 25 |
before_filter :authorize_global, :only => [:new, :create] |
| 26 | 26 |
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ] |
| 27 | 27 |
accept_rss_auth :index |
| ... | ... | |
| 43 | 43 |
helper :repositories |
| 44 | 44 |
include RepositoriesHelper |
| 45 | 45 |
include ProjectsHelper |
| 46 |
include ActivitiesHelper |
|
| 47 |
helper :activities |
|
| 46 | 48 |
|
| 47 | 49 |
# Lists visible projects. Paginator is for top-level projects only |
| 48 | 50 |
# (subprojects belong to them) |
| ... | ... | |
| 76 | 78 |
end |
| 77 | 79 |
end |
| 78 | 80 |
|
| 81 |
# A different view of projects using explore boxes |
|
| 82 |
def explore |
|
| 83 |
respond_to do |format| |
|
| 84 |
format.html {
|
|
| 85 |
@projects = Project.visible |
|
| 86 |
render :template => 'projects/explore.html.erb', :layout => !request.xhr? |
|
| 87 |
} |
|
| 88 |
end |
|
| 89 |
end |
|
| 90 |
|
|
| 79 | 91 |
def new |
| 80 | 92 |
@issue_custom_fields = IssueCustomField.find(:all, :order => "#{CustomField.table_name}.position")
|
| 81 | 93 |
@trackers = Tracker.all |
| app/controllers/welcome_controller.rb | ||
|---|---|---|
| 25 | 25 |
@site_project = Project.find_by_identifier "soundsoftware-site" |
| 26 | 26 |
@site_news = [] |
| 27 | 27 |
@site_news = News.latest_for @site_project if @site_project |
| 28 |
@projects = Project.latest User.current |
|
| 29 | 28 |
|
| 30 | 29 |
# tests if user is logged in to generate the tips of the day list |
| 31 | 30 |
if User.current.logged? |
Also available in: Unified diff