mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-15 05:28:13 +00:00
Show the entire projects tree on admin project list.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2154 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7353a628bf
commit
288c9a250a
@ -26,9 +26,6 @@ class AdminController < ApplicationController
|
||||
end
|
||||
|
||||
def projects
|
||||
sort_init 'name', 'asc'
|
||||
sort_update
|
||||
|
||||
@status = params[:status] ? params[:status].to_i : 1
|
||||
c = ARCondition.new(@status == 0 ? "status <> 0" : ["status = ?", @status])
|
||||
|
||||
@ -37,14 +34,8 @@ class AdminController < ApplicationController
|
||||
c << ["LOWER(identifier) LIKE ? OR LOWER(name) LIKE ?", name, name]
|
||||
end
|
||||
|
||||
@project_count = Project.count(:conditions => c.conditions)
|
||||
@project_pages = Paginator.new self, @project_count,
|
||||
per_page_option,
|
||||
params['page']
|
||||
@projects = Project.find :all, :order => sort_clause,
|
||||
:conditions => c.conditions,
|
||||
:limit => @project_pages.items_per_page,
|
||||
:offset => @project_pages.current.offset
|
||||
@projects = Project.find :all, :order => 'lft',
|
||||
:conditions => c.conditions
|
||||
|
||||
render :action => "projects", :layout => false if request.xhr?
|
||||
end
|
||||
|
||||
@ -17,20 +17,18 @@
|
||||
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<%= sort_header_tag('name', :caption => l(:label_project)) %>
|
||||
<th><%=l(:label_project)%></th>
|
||||
<th><%=l(:field_description)%></th>
|
||||
<th><%=l(:label_subproject_plural)%></th>
|
||||
<%= sort_header_tag('is_public', :caption => l(:field_is_public), :default_order => 'desc') %>
|
||||
<%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
|
||||
<th><%=l(:field_is_public)%></th>
|
||||
<th><%=l(:field_created_on)%></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% for project in @projects %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %>
|
||||
<td style="padding-left: <%= project.level %>em;"><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %>
|
||||
<td><%= textilizable project.short_description, :project => project %>
|
||||
<td align="center"><%= project.children.size %>
|
||||
<td align="center"><%= image_tag 'true.png' if project.is_public? %>
|
||||
<td align="center"><%= format_date(project.created_on) %>
|
||||
<td align="center" style="width:10%">
|
||||
@ -47,6 +45,4 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="pagination"><%= pagination_links_full @project_pages, @project_count %></p>
|
||||
|
||||
<% html_title(l(:label_project_plural)) -%>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user