changeset 345:361602c5e6bb feature_122

Do not show issue tracking box if there are no open issues to track
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 31 Mar 2011 15:21:24 +0100
parents 3564e1ae2ff7
children f039bb649d0c c46fbe5d58ce e5ea7a2487c9
files app/views/projects/show.rhtml
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/views/projects/show.rhtml	Thu Mar 31 11:13:21 2011 +0100
+++ b/app/views/projects/show.rhtml	Thu Mar 31 15:21:24 2011 +0100
@@ -23,7 +23,8 @@
 	<% end %>
 	</ul>	
 
-  <% if User.current.allowed_to?(:view_issues, @project) %>
+  <% if User.current.allowed_to?(:view_issues, @project) and @open_issues_by_tracker.values.any? %>
+
   <div class="issues box">    
     <h3><%=l(:label_issue_tracking)%></h3>
     <ul>
@@ -46,6 +47,7 @@
 			<% end %>
 		</p>
   </div>
+
   <% end %>
   <%= call_hook(:view_projects_show_left, :project => @project) %>
 </div>