mirror of
https://github.com/redmine/redmine.git
synced 2026-03-06 04:21:23 +01:00
Show only visible children/ancestors on project overview.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2278 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -80,7 +80,8 @@ class ProjectsController < ApplicationController
|
||||
# Show @project
|
||||
def show
|
||||
@members_by_role = @project.members.find(:all, :include => [:user, :role], :order => 'position').group_by {|m| m.role}
|
||||
@subprojects = @project.children.find(:all, :conditions => Project.visible_by(User.current))
|
||||
@subprojects = @project.children.visible
|
||||
@ancestors = @project.ancestors.visible
|
||||
@news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC")
|
||||
@trackers = @project.rolled_up_trackers
|
||||
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
<%= textilizable @project.description %>
|
||||
<ul>
|
||||
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to(h(@project.homepage), @project.homepage) %></li><% end %>
|
||||
<% if @subprojects.any? %>
|
||||
<li><%=l(:label_subproject_plural)%>: <%= @subprojects.collect{|p| link_to(h(p.name), :action => 'show', :id => p)}.join(", ") %></li>
|
||||
<% end %>
|
||||
<% if @project.parent %>
|
||||
<li><%=l(:field_parent)%>: <%= link_to h(@project.parent.name), :controller => 'projects', :action => 'show', :id => @project.parent %></li>
|
||||
<% if @subprojects.any? %>
|
||||
<li><%=l(:label_subproject_plural)%>:
|
||||
<%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
|
||||
<% end %>
|
||||
<% if @ancestors.any? %>
|
||||
<li><%=l(:field_parent)%>:
|
||||
<%= @ancestors.collect {|p| link_to(h(p), :action => 'show', :id => p)}.join(" » ") %></li>
|
||||
<% end %>
|
||||
<% @project.custom_values.each do |custom_value| %>
|
||||
<% if !custom_value.value.empty? %>
|
||||
|
||||
Reference in New Issue
Block a user