##// END OF EJS Templates
Remove pagination on trackers, roles and issue statuses (#12909)....
Jean-Philippe Lang -
r14891:08c9a5e3ef1a
parent child
Show More
@@ -1,81 +1,77
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2016 Jean-Philippe Lang
2 # Copyright (C) 2006-2016 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class IssueStatusesController < ApplicationController
18 class IssueStatusesController < ApplicationController
19 layout 'admin'
19 layout 'admin'
20
20
21 before_filter :require_admin, :except => :index
21 before_filter :require_admin, :except => :index
22 before_filter :require_admin_or_api_request, :only => :index
22 before_filter :require_admin_or_api_request, :only => :index
23 accept_api_auth :index
23 accept_api_auth :index
24
24
25 def index
25 def index
26 @issue_statuses = IssueStatus.sorted.to_a
26 respond_to do |format|
27 respond_to do |format|
27 format.html {
28 format.html { render :layout => false if request.xhr? }
28 @issue_status_pages, @issue_statuses = paginate IssueStatus.sorted, :per_page => 25
29 format.api
29 render :action => "index", :layout => false if request.xhr?
30 }
31 format.api {
32 @issue_statuses = IssueStatus.order('position').to_a
33 }
34 end
30 end
35 end
31 end
36
32
37 def new
33 def new
38 @issue_status = IssueStatus.new
34 @issue_status = IssueStatus.new
39 end
35 end
40
36
41 def create
37 def create
42 @issue_status = IssueStatus.new(params[:issue_status])
38 @issue_status = IssueStatus.new(params[:issue_status])
43 if @issue_status.save
39 if @issue_status.save
44 flash[:notice] = l(:notice_successful_create)
40 flash[:notice] = l(:notice_successful_create)
45 redirect_to issue_statuses_path
41 redirect_to issue_statuses_path
46 else
42 else
47 render :action => 'new'
43 render :action => 'new'
48 end
44 end
49 end
45 end
50
46
51 def edit
47 def edit
52 @issue_status = IssueStatus.find(params[:id])
48 @issue_status = IssueStatus.find(params[:id])
53 end
49 end
54
50
55 def update
51 def update
56 @issue_status = IssueStatus.find(params[:id])
52 @issue_status = IssueStatus.find(params[:id])
57 if @issue_status.update_attributes(params[:issue_status])
53 if @issue_status.update_attributes(params[:issue_status])
58 flash[:notice] = l(:notice_successful_update)
54 flash[:notice] = l(:notice_successful_update)
59 redirect_to issue_statuses_path(:page => params[:page])
55 redirect_to issue_statuses_path(:page => params[:page])
60 else
56 else
61 render :action => 'edit'
57 render :action => 'edit'
62 end
58 end
63 end
59 end
64
60
65 def destroy
61 def destroy
66 IssueStatus.find(params[:id]).destroy
62 IssueStatus.find(params[:id]).destroy
67 redirect_to issue_statuses_path
63 redirect_to issue_statuses_path
68 rescue
64 rescue
69 flash[:error] = l(:error_unable_delete_issue_status)
65 flash[:error] = l(:error_unable_delete_issue_status)
70 redirect_to issue_statuses_path
66 redirect_to issue_statuses_path
71 end
67 end
72
68
73 def update_issue_done_ratio
69 def update_issue_done_ratio
74 if request.post? && IssueStatus.update_issue_done_ratios
70 if request.post? && IssueStatus.update_issue_done_ratios
75 flash[:notice] = l(:notice_issue_done_ratios_updated)
71 flash[:notice] = l(:notice_issue_done_ratios_updated)
76 else
72 else
77 flash[:error] = l(:error_issue_done_ratios_not_updated)
73 flash[:error] = l(:error_issue_done_ratios_not_updated)
78 end
74 end
79 redirect_to issue_statuses_path
75 redirect_to issue_statuses_path
80 end
76 end
81 end
77 end
@@ -1,110 +1,110
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2016 Jean-Philippe Lang
2 # Copyright (C) 2006-2016 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class RolesController < ApplicationController
18 class RolesController < ApplicationController
19 layout 'admin'
19 layout 'admin'
20
20
21 before_filter :require_admin, :except => [:index, :show]
21 before_filter :require_admin, :except => [:index, :show]
22 before_filter :require_admin_or_api_request, :only => [:index, :show]
22 before_filter :require_admin_or_api_request, :only => [:index, :show]
23 before_filter :find_role, :only => [:show, :edit, :update, :destroy]
23 before_filter :find_role, :only => [:show, :edit, :update, :destroy]
24 accept_api_auth :index, :show
24 accept_api_auth :index, :show
25
25
26 require_sudo_mode :create, :update, :destroy
26 require_sudo_mode :create, :update, :destroy
27
27
28 def index
28 def index
29 respond_to do |format|
29 respond_to do |format|
30 format.html {
30 format.html {
31 @role_pages, @roles = paginate Role.sorted, :per_page => 25
31 @roles = Role.sorted.to_a
32 render :action => "index", :layout => false if request.xhr?
32 render :layout => false if request.xhr?
33 }
33 }
34 format.api {
34 format.api {
35 @roles = Role.givable.to_a
35 @roles = Role.givable.to_a
36 }
36 }
37 end
37 end
38 end
38 end
39
39
40 def show
40 def show
41 respond_to do |format|
41 respond_to do |format|
42 format.api
42 format.api
43 end
43 end
44 end
44 end
45
45
46 def new
46 def new
47 # Prefills the form with 'Non member' role permissions by default
47 # Prefills the form with 'Non member' role permissions by default
48 @role = Role.new(params[:role] || {:permissions => Role.non_member.permissions})
48 @role = Role.new(params[:role] || {:permissions => Role.non_member.permissions})
49 if params[:copy].present? && @copy_from = Role.find_by_id(params[:copy])
49 if params[:copy].present? && @copy_from = Role.find_by_id(params[:copy])
50 @role.copy_from(@copy_from)
50 @role.copy_from(@copy_from)
51 end
51 end
52 @roles = Role.sorted.to_a
52 @roles = Role.sorted.to_a
53 end
53 end
54
54
55 def create
55 def create
56 @role = Role.new(params[:role])
56 @role = Role.new(params[:role])
57 if request.post? && @role.save
57 if request.post? && @role.save
58 # workflow copy
58 # workflow copy
59 if !params[:copy_workflow_from].blank? && (copy_from = Role.find_by_id(params[:copy_workflow_from]))
59 if !params[:copy_workflow_from].blank? && (copy_from = Role.find_by_id(params[:copy_workflow_from]))
60 @role.workflow_rules.copy(copy_from)
60 @role.workflow_rules.copy(copy_from)
61 end
61 end
62 flash[:notice] = l(:notice_successful_create)
62 flash[:notice] = l(:notice_successful_create)
63 redirect_to roles_path
63 redirect_to roles_path
64 else
64 else
65 @roles = Role.sorted.to_a
65 @roles = Role.sorted.to_a
66 render :action => 'new'
66 render :action => 'new'
67 end
67 end
68 end
68 end
69
69
70 def edit
70 def edit
71 end
71 end
72
72
73 def update
73 def update
74 if @role.update_attributes(params[:role])
74 if @role.update_attributes(params[:role])
75 flash[:notice] = l(:notice_successful_update)
75 flash[:notice] = l(:notice_successful_update)
76 redirect_to roles_path(:page => params[:page])
76 redirect_to roles_path(:page => params[:page])
77 else
77 else
78 render :action => 'edit'
78 render :action => 'edit'
79 end
79 end
80 end
80 end
81
81
82 def destroy
82 def destroy
83 @role.destroy
83 @role.destroy
84 redirect_to roles_path
84 redirect_to roles_path
85 rescue
85 rescue
86 flash[:error] = l(:error_can_not_remove_role)
86 flash[:error] = l(:error_can_not_remove_role)
87 redirect_to roles_path
87 redirect_to roles_path
88 end
88 end
89
89
90 def permissions
90 def permissions
91 @roles = Role.sorted.to_a
91 @roles = Role.sorted.to_a
92 @permissions = Redmine::AccessControl.permissions.select { |p| !p.public? }
92 @permissions = Redmine::AccessControl.permissions.select { |p| !p.public? }
93 if request.post?
93 if request.post?
94 @roles.each do |role|
94 @roles.each do |role|
95 role.permissions = params[:permissions][role.id.to_s]
95 role.permissions = params[:permissions][role.id.to_s]
96 role.save
96 role.save
97 end
97 end
98 flash[:notice] = l(:notice_successful_update)
98 flash[:notice] = l(:notice_successful_update)
99 redirect_to roles_path
99 redirect_to roles_path
100 end
100 end
101 end
101 end
102
102
103 private
103 private
104
104
105 def find_role
105 def find_role
106 @role = Role.find(params[:id])
106 @role = Role.find(params[:id])
107 rescue ActiveRecord::RecordNotFound
107 rescue ActiveRecord::RecordNotFound
108 render_404
108 render_404
109 end
109 end
110 end
110 end
@@ -1,101 +1,97
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2016 Jean-Philippe Lang
2 # Copyright (C) 2006-2016 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class TrackersController < ApplicationController
18 class TrackersController < ApplicationController
19 layout 'admin'
19 layout 'admin'
20
20
21 before_filter :require_admin, :except => :index
21 before_filter :require_admin, :except => :index
22 before_filter :require_admin_or_api_request, :only => :index
22 before_filter :require_admin_or_api_request, :only => :index
23 accept_api_auth :index
23 accept_api_auth :index
24
24
25 def index
25 def index
26 @trackers = Tracker.sorted.to_a
26 respond_to do |format|
27 respond_to do |format|
27 format.html {
28 format.html { render :layout => false if request.xhr? }
28 @tracker_pages, @trackers = paginate Tracker.sorted, :per_page => 25
29 format.api
29 render :action => "index", :layout => false if request.xhr?
30 }
31 format.api {
32 @trackers = Tracker.sorted.to_a
33 }
34 end
30 end
35 end
31 end
36
32
37 def new
33 def new
38 @tracker ||= Tracker.new(params[:tracker])
34 @tracker ||= Tracker.new(params[:tracker])
39 @trackers = Tracker.sorted.to_a
35 @trackers = Tracker.sorted.to_a
40 @projects = Project.all
36 @projects = Project.all
41 end
37 end
42
38
43 def create
39 def create
44 @tracker = Tracker.new(params[:tracker])
40 @tracker = Tracker.new(params[:tracker])
45 if @tracker.save
41 if @tracker.save
46 # workflow copy
42 # workflow copy
47 if !params[:copy_workflow_from].blank? && (copy_from = Tracker.find_by_id(params[:copy_workflow_from]))
43 if !params[:copy_workflow_from].blank? && (copy_from = Tracker.find_by_id(params[:copy_workflow_from]))
48 @tracker.workflow_rules.copy(copy_from)
44 @tracker.workflow_rules.copy(copy_from)
49 end
45 end
50 flash[:notice] = l(:notice_successful_create)
46 flash[:notice] = l(:notice_successful_create)
51 redirect_to trackers_path
47 redirect_to trackers_path
52 return
48 return
53 end
49 end
54 new
50 new
55 render :action => 'new'
51 render :action => 'new'
56 end
52 end
57
53
58 def edit
54 def edit
59 @tracker ||= Tracker.find(params[:id])
55 @tracker ||= Tracker.find(params[:id])
60 @projects = Project.all
56 @projects = Project.all
61 end
57 end
62
58
63 def update
59 def update
64 @tracker = Tracker.find(params[:id])
60 @tracker = Tracker.find(params[:id])
65 if @tracker.update_attributes(params[:tracker])
61 if @tracker.update_attributes(params[:tracker])
66 flash[:notice] = l(:notice_successful_update)
62 flash[:notice] = l(:notice_successful_update)
67 redirect_to trackers_path(:page => params[:page])
63 redirect_to trackers_path(:page => params[:page])
68 return
64 return
69 end
65 end
70 edit
66 edit
71 render :action => 'edit'
67 render :action => 'edit'
72 end
68 end
73
69
74 def destroy
70 def destroy
75 @tracker = Tracker.find(params[:id])
71 @tracker = Tracker.find(params[:id])
76 unless @tracker.issues.empty?
72 unless @tracker.issues.empty?
77 flash[:error] = l(:error_can_not_delete_tracker)
73 flash[:error] = l(:error_can_not_delete_tracker)
78 else
74 else
79 @tracker.destroy
75 @tracker.destroy
80 end
76 end
81 redirect_to trackers_path
77 redirect_to trackers_path
82 end
78 end
83
79
84 def fields
80 def fields
85 if request.post? && params[:trackers]
81 if request.post? && params[:trackers]
86 params[:trackers].each do |tracker_id, tracker_params|
82 params[:trackers].each do |tracker_id, tracker_params|
87 tracker = Tracker.find_by_id(tracker_id)
83 tracker = Tracker.find_by_id(tracker_id)
88 if tracker
84 if tracker
89 tracker.core_fields = tracker_params[:core_fields]
85 tracker.core_fields = tracker_params[:core_fields]
90 tracker.custom_field_ids = tracker_params[:custom_field_ids]
86 tracker.custom_field_ids = tracker_params[:custom_field_ids]
91 tracker.save
87 tracker.save
92 end
88 end
93 end
89 end
94 flash[:notice] = l(:notice_successful_update)
90 flash[:notice] = l(:notice_successful_update)
95 redirect_to fields_trackers_path
91 redirect_to fields_trackers_path
96 return
92 return
97 end
93 end
98 @trackers = Tracker.sorted.to_a
94 @trackers = Tracker.sorted.to_a
99 @custom_fields = IssueCustomField.all.sort
95 @custom_fields = IssueCustomField.all.sort
100 end
96 end
101 end
97 end
@@ -1,37 +1,35
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_issue_status_new), new_issue_status_path, :class => 'icon icon-add' %>
2 <%= link_to l(:label_issue_status_new), new_issue_status_path, :class => 'icon icon-add' %>
3 <%= link_to(l(:label_update_issue_done_ratios), update_issue_done_ratio_issue_statuses_path, :class => 'icon icon-multiple', :method => 'post', :data => {:confirm => l(:text_are_you_sure)}) if Issue.use_status_for_done_ratio? %>
3 <%= link_to(l(:label_update_issue_done_ratios), update_issue_done_ratio_issue_statuses_path, :class => 'icon icon-multiple', :method => 'post', :data => {:confirm => l(:text_are_you_sure)}) if Issue.use_status_for_done_ratio? %>
4 </div>
4 </div>
5
5
6 <h2><%=l(:label_issue_status_plural)%></h2>
6 <h2><%=l(:label_issue_status_plural)%></h2>
7
7
8 <table class="list">
8 <table class="list">
9 <thead><tr>
9 <thead><tr>
10 <th><%=l(:field_status)%></th>
10 <th><%=l(:field_status)%></th>
11 <% if Issue.use_status_for_done_ratio? %>
11 <% if Issue.use_status_for_done_ratio? %>
12 <th><%=l(:field_done_ratio)%></th>
12 <th><%=l(:field_done_ratio)%></th>
13 <% end %>
13 <% end %>
14 <th><%=l(:field_is_closed)%></th>
14 <th><%=l(:field_is_closed)%></th>
15 <th><%=l(:button_sort)%></th>
15 <th><%=l(:button_sort)%></th>
16 <th></th>
16 <th></th>
17 </tr></thead>
17 </tr></thead>
18 <tbody>
18 <tbody>
19 <% for status in @issue_statuses %>
19 <% for status in @issue_statuses %>
20 <tr class="<%= cycle("odd", "even") %>">
20 <tr class="<%= cycle("odd", "even") %>">
21 <td class="name"><%= link_to status.name, edit_issue_status_path(status) %></td>
21 <td class="name"><%= link_to status.name, edit_issue_status_path(status) %></td>
22 <% if Issue.use_status_for_done_ratio? %>
22 <% if Issue.use_status_for_done_ratio? %>
23 <td><%= status.default_done_ratio %></td>
23 <td><%= status.default_done_ratio %></td>
24 <% end %>
24 <% end %>
25 <td><%= checked_image status.is_closed? %></td>
25 <td><%= checked_image status.is_closed? %></td>
26 <td class="reorder"><%= reorder_links('issue_status', {:action => 'update', :id => status, :page => params[:page]}, :put) %></td>
26 <td class="reorder"><%= reorder_links('issue_status', {:action => 'update', :id => status, :page => params[:page]}, :put) %></td>
27 <td class="buttons">
27 <td class="buttons">
28 <%= delete_link issue_status_path(status) %>
28 <%= delete_link issue_status_path(status) %>
29 </td>
29 </td>
30 </tr>
30 </tr>
31 <% end %>
31 <% end %>
32 </tbody>
32 </tbody>
33 </table>
33 </table>
34
34
35 <span class="pagination"><%= pagination_links_full @issue_status_pages %></span>
36
37 <% html_title(l(:label_issue_status_plural)) -%>
35 <% html_title(l(:label_issue_status_plural)) -%>
@@ -1,34 +1,32
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_role_new), new_role_path, :class => 'icon icon-add' %>
2 <%= link_to l(:label_role_new), new_role_path, :class => 'icon icon-add' %>
3 <%= link_to l(:label_permissions_report), permissions_roles_path, :class => 'icon icon-summary' %>
3 <%= link_to l(:label_permissions_report), permissions_roles_path, :class => 'icon icon-summary' %>
4 </div>
4 </div>
5
5
6 <h2><%=l(:label_role_plural)%></h2>
6 <h2><%=l(:label_role_plural)%></h2>
7
7
8 <table class="list">
8 <table class="list">
9 <thead><tr>
9 <thead><tr>
10 <th><%=l(:label_role)%></th>
10 <th><%=l(:label_role)%></th>
11 <th><%=l(:button_sort)%></th>
11 <th><%=l(:button_sort)%></th>
12 <th></th>
12 <th></th>
13 </tr></thead>
13 </tr></thead>
14 <tbody>
14 <tbody>
15 <% for role in @roles %>
15 <% for role in @roles %>
16 <tr class="<%= cycle("odd", "even") %>">
16 <tr class="<%= cycle("odd", "even") %>">
17 <td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
17 <td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(role.name, edit_role_path(role))) %></td>
18 <td class="reorder">
18 <td class="reorder">
19 <% unless role.builtin? %>
19 <% unless role.builtin? %>
20 <%= reorder_links('role', {:action => 'update', :id => role, :page => params[:page]}, :put) %>
20 <%= reorder_links('role', {:action => 'update', :id => role, :page => params[:page]}, :put) %>
21 <% end %>
21 <% end %>
22 </td>
22 </td>
23 <td class="buttons">
23 <td class="buttons">
24 <%= link_to l(:button_copy), new_role_path(:copy => role), :class => 'icon icon-copy' %>
24 <%= link_to l(:button_copy), new_role_path(:copy => role), :class => 'icon icon-copy' %>
25 <%= delete_link role_path(role) unless role.builtin? %>
25 <%= delete_link role_path(role) unless role.builtin? %>
26 </td>
26 </td>
27 </tr>
27 </tr>
28 <% end %>
28 <% end %>
29 </tbody>
29 </tbody>
30 </table>
30 </table>
31
31
32 <span class="pagination"><%= pagination_links_full @role_pages %></span>
33
34 <% html_title(l(:label_role_plural)) -%>
32 <% html_title(l(:label_role_plural)) -%>
@@ -1,39 +1,37
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_tracker_new), new_tracker_path, :class => 'icon icon-add' %>
2 <%= link_to l(:label_tracker_new), new_tracker_path, :class => 'icon icon-add' %>
3 <%= link_to l(:field_summary), fields_trackers_path, :class => 'icon icon-summary' %>
3 <%= link_to l(:field_summary), fields_trackers_path, :class => 'icon icon-summary' %>
4 </div>
4 </div>
5
5
6 <h2><%=l(:label_tracker_plural)%></h2>
6 <h2><%=l(:label_tracker_plural)%></h2>
7
7
8 <table class="list">
8 <table class="list">
9 <thead><tr>
9 <thead><tr>
10 <th><%=l(:label_tracker)%></th>
10 <th><%=l(:label_tracker)%></th>
11 <th></th>
11 <th></th>
12 <th><%=l(:button_sort)%></th>
12 <th><%=l(:button_sort)%></th>
13 <th></th>
13 <th></th>
14 </tr></thead>
14 </tr></thead>
15 <tbody>
15 <tbody>
16 <% for tracker in @trackers %>
16 <% for tracker in @trackers %>
17 <tr class="<%= cycle("odd", "even") %>">
17 <tr class="<%= cycle("odd", "even") %>">
18 <td class="name"><%= link_to tracker.name, edit_tracker_path(tracker) %></td>
18 <td class="name"><%= link_to tracker.name, edit_tracker_path(tracker) %></td>
19 <td>
19 <td>
20 <% unless tracker.workflow_rules.count > 0 %>
20 <% unless tracker.workflow_rules.count > 0 %>
21 <span class="icon icon-warning">
21 <span class="icon icon-warning">
22 <%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:tracker_id => tracker) %>)
22 <%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:tracker_id => tracker) %>)
23 </span>
23 </span>
24 <% end %>
24 <% end %>
25 </td>
25 </td>
26 <td class="reorder">
26 <td class="reorder">
27 <%= reorder_links('tracker', {:action => 'update', :id => tracker, :page => params[:page]}, :put) %>
27 <%= reorder_links('tracker', {:action => 'update', :id => tracker, :page => params[:page]}, :put) %>
28 </td>
28 </td>
29 <td class="buttons">
29 <td class="buttons">
30 <%= delete_link tracker_path(tracker) %>
30 <%= delete_link tracker_path(tracker) %>
31 </td>
31 </td>
32 </tr>
32 </tr>
33 <% end %>
33 <% end %>
34 </tbody>
34 </tbody>
35 </table>
35 </table>
36
36
37 <span class="pagination"><%= pagination_links_full @tracker_pages %></span>
38
39 <% html_title(l(:label_tracker_plural)) -%>
37 <% html_title(l(:label_tracker_plural)) -%>
General Comments 0
You need to be logged in to leave comments. Login now