summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-17 20:06:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-17 20:06:52 +0000
commit388805ad58381a95bec3da8204c0784f0483c1a0 (patch)
treeee3d8df8840e3b75d851862ebdf6e6b809c344dc
parent0e0b8e0799695c631d7ececa23ce941701069a46 (diff)
downloadredmine-388805ad58381a95bec3da8204c0784f0483c1a0.tar.gz
redmine-388805ad58381a95bec3da8204c0784f0483c1a0.zip
Do not query the database for project level on projects list.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3599 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/admin/projects.rhtml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/admin/projects.rhtml b/app/views/admin/projects.rhtml
index d136c699c..f267c136e 100644
--- a/app/views/admin/projects.rhtml
+++ b/app/views/admin/projects.rhtml
@@ -25,9 +25,9 @@
<th></th>
</tr></thead>
<tbody>
-<% for project in @projects %>
+<% project_tree(@projects) do |project, level| %>
<tr class="<%= cycle("odd", "even") %> <%= css_project_classes(project) %>">
- <td class="name" style="padding-left: <%= project.level %>em;"><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %></td>
+ <td class="name" style="padding-left: <%= level %>em;"><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %></td>
<td><%= textilizable project.short_description, :project => project %></td>
<td align="center"><%= image_tag 'true.png' if project.is_public? %></td>
<td align="center"><%= format_date(project.created_on) %></td>