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
|
# Show @project
|
||||||
def show
|
def show
|
||||||
@members_by_role = @project.members.find(:all, :include => [:user, :role], :order => 'position').group_by {|m| m.role}
|
@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")
|
@news = @project.news.find(:all, :limit => 5, :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC")
|
||||||
@trackers = @project.rolled_up_trackers
|
@trackers = @project.rolled_up_trackers
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
<%= textilizable @project.description %>
|
<%= textilizable @project.description %>
|
||||||
<ul>
|
<ul>
|
||||||
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to(h(@project.homepage), @project.homepage) %></li><% end %>
|
<% unless @project.homepage.blank? %><li><%=l(:field_homepage)%>: <%= link_to(h(@project.homepage), @project.homepage) %></li><% end %>
|
||||||
<% if @subprojects.any? %>
|
<% if @subprojects.any? %>
|
||||||
<li><%=l(:label_subproject_plural)%>: <%= @subprojects.collect{|p| link_to(h(p.name), :action => 'show', :id => p)}.join(", ") %></li>
|
<li><%=l(:label_subproject_plural)%>:
|
||||||
<% end %>
|
<%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %></li>
|
||||||
<% if @project.parent %>
|
<% end %>
|
||||||
<li><%=l(:field_parent)%>: <%= link_to h(@project.parent.name), :controller => 'projects', :action => 'show', :id => @project.parent %></li>
|
<% if @ancestors.any? %>
|
||||||
|
<li><%=l(:field_parent)%>:
|
||||||
|
<%= @ancestors.collect {|p| link_to(h(p), :action => 'show', :id => p)}.join(" » ") %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% @project.custom_values.each do |custom_value| %>
|
<% @project.custom_values.each do |custom_value| %>
|
||||||
<% if !custom_value.value.empty? %>
|
<% if !custom_value.value.empty? %>
|
||||||
|
|||||||
Reference in New Issue
Block a user