mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Projects menu item now shows the list of public projects and projects for which the user is a member (marked with a star).
If current user is admin, private projects are also listed. git-svn-id: http://redmine.rubyforge.org/svn/trunk@460 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -41,12 +41,12 @@ class ProjectsController < ApplicationController
|
||||
def list
|
||||
sort_init "#{Project.table_name}.name", "asc"
|
||||
sort_update
|
||||
@project_count = Project.count(:all, :conditions => ["is_public=?", true])
|
||||
@project_count = Project.count(:all, :conditions => Project.visible_by(logged_in_user))
|
||||
@project_pages = Paginator.new self, @project_count,
|
||||
15,
|
||||
params['page']
|
||||
@projects = Project.find :all, :order => sort_clause,
|
||||
:conditions => ["#{Project.table_name}.is_public=?", true],
|
||||
:conditions => Project.visible_by(logged_in_user),
|
||||
:include => :parent,
|
||||
:limit => @project_pages.items_per_page,
|
||||
:offset => @project_pages.current.offset
|
||||
|
||||
Reference in New Issue
Block a user