@@ -1,260 +1,278 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | class ProjectsController < ApplicationController |
|
19 |
|
|
|
20 |
|
|
|
19 | layout 'base' | |
|
20 | before_filter :find_project, :authorize, :except => [ :index, :list, :add ] | |
|
21 | 21 | before_filter :require_admin, :only => [ :add, :destroy ] |
|
22 | 22 | |
|
23 | 23 | helper :sort |
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
24 | include SortHelper | |
|
25 | helper :search_filter | |
|
26 | include SearchFilterHelper | |
|
27 | helper :custom_fields | |
|
28 | include CustomFieldsHelper | |
|
29 | 29 | |
|
30 |
|
|
|
31 | list | |
|
32 |
|
|
|
33 |
|
|
|
30 | def index | |
|
31 | list | |
|
32 | render :action => 'list' | |
|
33 | end | |
|
34 | 34 | |
|
35 | 35 | # Lists public projects |
|
36 | 36 | def list |
|
37 | 37 | sort_init 'projects.name', 'asc' |
|
38 | 38 | sort_update |
|
39 | 39 | @project_count = Project.count(["public=?", true]) |
|
40 | 40 | @project_pages = Paginator.new self, @project_count, |
|
41 | 41 | 15, |
|
42 | 42 | @params['page'] |
|
43 | 43 | @projects = Project.find :all, :order => sort_clause, |
|
44 | 44 | :conditions => ["public=?", true], |
|
45 | 45 | :limit => @project_pages.items_per_page, |
|
46 | 46 | :offset => @project_pages.current.offset |
|
47 | 47 | end |
|
48 | 48 | |
|
49 | 49 | # Add a new project |
|
50 | 50 | def add |
|
51 | 51 | @custom_fields = CustomField::find_all |
|
52 | 52 | @project = Project.new(params[:project]) |
|
53 | 53 | if request.post? |
|
54 | 54 | @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids] |
|
55 | 55 | if @project.save |
|
56 | 56 | flash[:notice] = 'Project was successfully created.' |
|
57 | 57 | redirect_to :controller => 'admin', :action => 'projects' |
|
58 | 58 | end |
|
59 | 59 | end |
|
60 | 60 | end |
|
61 | 61 | |
|
62 | 62 | # Show @project |
|
63 | 63 | def show |
|
64 | 64 | @members = @project.members.find(:all, :include => [:user, :role]) |
|
65 | 65 | end |
|
66 | 66 | |
|
67 | 67 | def settings |
|
68 | 68 | @custom_fields = CustomField::find_all |
|
69 | 69 | @issue_category ||= IssueCategory.new |
|
70 | 70 | @member ||= @project.members.new |
|
71 | 71 | @roles = Role.find_all |
|
72 | 72 | @users = User.find_all - @project.members.find(:all, :include => :user).collect{|m| m.user } |
|
73 | 73 | end |
|
74 | 74 | |
|
75 | 75 | # Edit @project |
|
76 | 76 | def edit |
|
77 | 77 | if request.post? |
|
78 | 78 | @project.custom_fields = CustomField.find(@params[:custom_field_ids]) if @params[:custom_field_ids] |
|
79 | 79 | if @project.update_attributes(params[:project]) |
|
80 | 80 | flash[:notice] = 'Project was successfully updated.' |
|
81 | 81 | redirect_to :action => 'settings', :id => @project |
|
82 | 82 | else |
|
83 | 83 | settings |
|
84 | 84 | render :action => 'settings' |
|
85 | 85 | end |
|
86 | 86 | end |
|
87 | 87 | end |
|
88 | 88 | |
|
89 | 89 | # Delete @project |
|
90 | 90 | def destroy |
|
91 | 91 | if request.post? and params[:confirm] |
|
92 | 92 | @project.destroy |
|
93 | 93 | redirect_to :controller => 'admin', :action => 'projects' |
|
94 | 94 | end |
|
95 | 95 | end |
|
96 | 96 | |
|
97 | 97 | # Add a new issue category to @project |
|
98 | 98 | def add_issue_category |
|
99 | 99 | if request.post? |
|
100 | 100 | @issue_category = @project.issue_categories.build(params[:issue_category]) |
|
101 | 101 | if @issue_category.save |
|
102 | 102 | redirect_to :action => 'settings', :id => @project |
|
103 | 103 | else |
|
104 | 104 | settings |
|
105 | 105 | render :action => 'settings' |
|
106 | 106 | end |
|
107 | 107 | end |
|
108 | 108 | end |
|
109 | 109 | |
|
110 | 110 | # Add a new version to @project |
|
111 | 111 | def add_version |
|
112 | 112 | @version = @project.versions.build(params[:version]) |
|
113 | 113 | if request.post? and @version.save |
|
114 | 114 | redirect_to :action => 'settings', :id => @project |
|
115 | 115 | end |
|
116 | 116 | end |
|
117 | 117 | |
|
118 | 118 | # Add a new member to @project |
|
119 | 119 | def add_member |
|
120 | 120 | @member = @project.members.build(params[:member]) |
|
121 | 121 | if request.post? |
|
122 | 122 | if @member.save |
|
123 | 123 | flash[:notice] = 'Member was successfully added.' |
|
124 | 124 | redirect_to :action => 'settings', :id => @project |
|
125 | 125 | else |
|
126 | 126 | settings |
|
127 | 127 | render :action => 'settings' |
|
128 | 128 | end |
|
129 | 129 | end |
|
130 | 130 | end |
|
131 | 131 | |
|
132 | 132 | # Show members list of @project |
|
133 | 133 | def list_members |
|
134 | 134 | @members = @project.members |
|
135 | 135 | end |
|
136 | 136 | |
|
137 | 137 | # Add a new document to @project |
|
138 | 138 | def add_document |
|
139 | 139 | @categories = Enumeration::get_values('DCAT') |
|
140 | 140 | @document = @project.documents.build(params[:document]) |
|
141 | 141 | if request.post? |
|
142 | 142 | # Save the attachment |
|
143 | 143 | if params[:attachment][:file].size > 0 |
|
144 | 144 | @attachment = @document.attachments.build(params[:attachment]) |
|
145 | 145 | @attachment.author_id = session[:user].id unless session[:user].nil? |
|
146 | 146 | end |
|
147 | 147 | if @document.save |
|
148 | 148 | redirect_to :action => 'list_documents', :id => @project |
|
149 | 149 | end |
|
150 | 150 | end |
|
151 | 151 | end |
|
152 | 152 | |
|
153 | 153 | # Show documents list of @project |
|
154 | 154 | def list_documents |
|
155 | 155 | @documents = @project.documents |
|
156 | 156 | end |
|
157 | 157 | |
|
158 | 158 | # Add a new issue to @project |
|
159 | 159 | def add_issue |
|
160 | 160 | @trackers = Tracker.find(:all) |
|
161 | 161 | @priorities = Enumeration::get_values('IPRI') |
|
162 | 162 | if request.get? |
|
163 | 163 | @issue = @project.issues.build |
|
164 | 164 | @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x) } |
|
165 | 165 | else |
|
166 | 166 | # Create the issue and set the author |
|
167 | 167 | @issue = @project.issues.build(params[:issue]) |
|
168 | 168 | @issue.author = session[:user] unless session[:user].nil? |
|
169 | 169 | # Create the document if a file was sent |
|
170 | 170 | if params[:attachment][:file].size > 0 |
|
171 | 171 | @attachment = @issue.attachments.build(params[:attachment]) |
|
172 | 172 | @attachment.author_id = session[:user].id unless session[:user].nil? |
|
173 | 173 | end |
|
174 | 174 | @custom_values = @project.custom_fields_for_issues.collect { |x| CustomValue.new(:custom_field => x, :value => params["custom_fields"][x.id.to_s]) } |
|
175 | 175 | @issue.custom_values = @custom_values |
|
176 | 176 | if @issue.save |
|
177 | 177 | flash[:notice] = "Issue was successfully added." |
|
178 | 178 | Mailer.deliver_issue_add(@issue) if Permission.find_by_controller_and_action(@params[:controller], @params[:action]).mail_enabled? |
|
179 | 179 | redirect_to :action => 'list_issues', :id => @project |
|
180 | 180 | end |
|
181 | 181 | end |
|
182 | 182 | end |
|
183 | 183 | |
|
184 |
|
|
|
185 |
|
|
|
186 |
|
|
|
187 |
|
|
|
188 | ||
|
189 | search_filter_criteria 'issues.tracker_id', :values => "Tracker.find(:all)" | |
|
190 | search_filter_criteria 'issues.priority_id', :values => "Enumeration.find(:all, :conditions => ['opt=?','IPRI'])" | |
|
191 | search_filter_criteria 'issues.category_id', :values => "@project.issue_categories" | |
|
192 | search_filter_criteria 'issues.status_id', :values => "IssueStatus.find(:all)" | |
|
193 | search_filter_criteria 'issues.author_id', :values => "User.find(:all)", :label => "display_name" | |
|
194 | search_filter_update if params[:set_filter] or request.post? | |
|
195 | ||
|
196 | @issue_count = @project.issues.count(search_filter_clause) | |
|
197 | @issue_pages = Paginator.new self, @issue_count, | |
|
198 | 15, | |
|
199 | @params['page'] | |
|
200 | @issues = @project.issues.find :all, :order => sort_clause, | |
|
184 | # Show issues list of @project | |
|
185 | def list_issues | |
|
186 | sort_init 'issues.id', 'desc' | |
|
187 | sort_update | |
|
188 | ||
|
189 | search_filter_init_list_issues | |
|
190 | search_filter_update if params[:set_filter] or request.post? | |
|
191 | ||
|
192 | @issue_count = Issue.count(:include => :status, :conditions => search_filter_clause) | |
|
193 | @issue_pages = Paginator.new self, @issue_count, 15, @params['page'] | |
|
194 | @issues = Issue.find :all, :order => sort_clause, | |
|
201 | 195 | :include => [ :author, :status, :tracker ], |
|
202 | 196 | :conditions => search_filter_clause, |
|
203 | 197 | :limit => @issue_pages.items_per_page, |
|
204 | 198 | :offset => @issue_pages.current.offset |
|
205 |
|
|
|
199 | end | |
|
200 | ||
|
201 | # Export filtered/sorted issues list to CSV | |
|
202 | def export_issues_csv | |
|
203 | sort_init 'issues.id', 'desc' | |
|
204 | sort_update | |
|
205 | ||
|
206 | search_filter_init_list_issues | |
|
207 | ||
|
208 | @issues = Issue.find :all, :order => sort_clause, | |
|
209 | :include => [ :author, :status, :tracker ], | |
|
210 | :conditions => search_filter_clause | |
|
206 | 211 | |
|
212 | export = StringIO.new | |
|
213 | CSV::Writer.generate(export, ',') do |csv| | |
|
214 | csv << %w(Id Status Tracker Subject Author Created Updated) | |
|
215 | @issues.each do |issue| | |
|
216 | csv << [issue.id, issue.status.name, issue.tracker.name, issue.subject, issue.author.display_name, _('(time)', issue.created_on), _('(time)', issue.updated_on)] | |
|
217 | end | |
|
218 | end | |
|
219 | export.rewind | |
|
220 | send_data(export.read, | |
|
221 | :type => 'text/csv; charset=utf-8; header=present', | |
|
222 | :filename => 'export.csv') | |
|
223 | end | |
|
224 | ||
|
207 | 225 | # Add a news to @project |
|
208 | 226 | def add_news |
|
209 | 227 | @news = @project.news.build(params[:news]) |
|
210 | 228 | if request.post? |
|
211 | 229 | @news.author = session[:user] unless session[:user].nil? |
|
212 | 230 | if @news.save |
|
213 | 231 | redirect_to :action => 'list_news', :id => @project |
|
214 | 232 | end |
|
215 | 233 | end |
|
216 | 234 | end |
|
217 | 235 | |
|
218 | 236 | # Show news list of @project |
|
219 |
|
|
|
237 | def list_news | |
|
220 | 238 | @news_pages, @news = paginate :news, :per_page => 10, :conditions => ["project_id=?", @project.id], :include => :author, :order => "news.created_on DESC" |
|
221 |
|
|
|
239 | end | |
|
222 | 240 | |
|
223 | 241 | def add_file |
|
224 | 242 | if request.post? |
|
225 | 243 | # Save the attachment |
|
226 | 244 | if params[:attachment][:file].size > 0 |
|
227 | 245 | @attachment = @project.versions.find(params[:version_id]).attachments.build(params[:attachment]) |
|
228 | 246 | @attachment.author_id = session[:user].id unless session[:user].nil? |
|
229 | 247 | if @attachment.save |
|
230 | 248 | redirect_to :controller => 'projects', :action => 'list_files', :id => @project |
|
231 | 249 | end |
|
232 | 250 | end |
|
233 | 251 | end |
|
234 | 252 | @versions = @project.versions |
|
235 | 253 | end |
|
236 | 254 | |
|
237 | 255 | def list_files |
|
238 | 256 | @versions = @project.versions |
|
239 | 257 | end |
|
240 | 258 | |
|
241 |
|
|
|
242 |
|
|
|
243 | @fixed_issues = @project.issues.find(:all, | |
|
244 |
|
|
|
245 |
|
|
|
246 |
|
|
|
247 |
|
|
|
259 | # Show changelog of @project | |
|
260 | def changelog | |
|
261 | @fixed_issues = @project.issues.find(:all, | |
|
262 | :include => [ :fixed_version, :status, :tracker ], | |
|
263 | :conditions => [ "issue_statuses.is_closed=? and trackers.is_in_chlog=? and issues.fixed_version_id is not null", true, true] | |
|
264 | ) | |
|
265 | end | |
|
248 | 266 | |
|
249 | 267 | private |
|
250 | 268 | # Find project of id params[:id] |
|
251 | 269 | # if not found, redirect to project list |
|
252 | 270 | # used as a before_filter |
|
253 | 271 | def find_project |
|
254 | 272 | @project = Project.find(params[:id]) |
|
255 | 273 | rescue |
|
256 | 274 | flash[:notice] = 'Project not found.' |
|
257 | 275 | redirect_to :action => 'list' |
|
258 | 276 | end |
|
259 | 277 | |
|
260 | 278 | end |
@@ -1,55 +1,85 | |||
|
1 | 1 | # redMine - project management software |
|
2 | 2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
3 | 3 | # |
|
4 | 4 | # This program is free software; you can redistribute it and/or |
|
5 | 5 | # modify it under the terms of the GNU General Public License |
|
6 | 6 | # as published by the Free Software Foundation; either version 2 |
|
7 | 7 | # of the License, or (at your option) any later version. |
|
8 | 8 | # |
|
9 | 9 | # This program is distributed in the hope that it will be useful, |
|
10 | 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 | 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 | 12 | # GNU General Public License for more details. |
|
13 | 13 | # |
|
14 | 14 | # You should have received a copy of the GNU General Public License |
|
15 | 15 | # along with this program; if not, write to the Free Software |
|
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
17 | 17 | |
|
18 | 18 | module SearchFilterHelper |
|
19 | 19 | |
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
|
23 | # session[:search_filter][field][:values] = options[:values] unless options[:values].nil? | |
|
24 | # session[:search_filter][field][:label] = options[:label] unless options[:label].nil? | |
|
25 | end | |
|
20 | def search_filter_criteria(name, options = {}) | |
|
21 | session[:search_filter] ||= {} | |
|
22 | session[:search_filter][name] ||= {} | |
|
23 | unless session[:search_filter][name][:options] and session[:search_filter][name][:conditions] | |
|
24 | session[:search_filter][name][:options] = [] | |
|
25 | session[:search_filter][name][:conditions] = {} | |
|
26 | yield.each { |c| | |
|
27 | session[:search_filter][name][:options] << [c[0], c[1].to_s] | |
|
28 | session[:search_filter][name][:conditions].store(c[1].to_s, c[2]) | |
|
29 | } | |
|
30 | end | |
|
31 | end | |
|
26 | 32 | |
|
27 |
|
|
|
28 |
|
|
|
29 | #@search_filter[:value] = params[@search_filter[:field]] | |
|
30 | end | |
|
33 | def search_filter_update | |
|
34 | session[:search_filter].each_key {|field| session[:search_filter][field][:value] = params[field] } | |
|
35 | end | |
|
31 | 36 | |
|
32 |
|
|
|
33 | clause = "1=1" | |
|
34 | session[:search_filter].each {|field, criteria| clause = clause + " AND " + field + "='" + session[:search_filter][field][:value] + "'" unless session[:search_filter][field][:value].nil? || session[:search_filter][field][:value].empty? } | |
|
35 | clause | |
|
36 | #@search_filter[:field] + "='" + @search_filter[:value] + "'" unless @search_filter[:value].nil? || @search_filter[:value].empty? | |
|
37 | end | |
|
37 | def search_filter_clause | |
|
38 | clause = ["issues.project_id=?", @project.id] | |
|
39 | session[:search_filter].each { |k, v| | |
|
40 | v[:value] ||= v[:options][0][1] | |
|
41 | if (!v[:conditions][v[:value]][0].empty?) | |
|
42 | clause[0] = clause[0] + " AND " + v[:conditions][v[:value]][0] | |
|
43 | clause << v[:conditions][v[:value]][1] if !v[:conditions][v[:value]][1].nil? | |
|
44 | end | |
|
45 | } | |
|
46 | clause | |
|
47 | end | |
|
38 | 48 | |
|
39 |
|
|
|
40 | option_values = [] | |
|
41 | #values = eval @search_filter[:values_expr] | |
|
42 | option_values = eval session[:search_filter][field][:values] | |
|
43 | ||
|
44 | content_tag("select", | |
|
45 | content_tag("option", "[All]", :value => "") + | |
|
46 | options_from_collection_for_select(option_values, | |
|
47 | "id", | |
|
48 | session[:search_filter][field][:label] || "name", | |
|
49 | session[:search_filter][field][:value].to_i | |
|
50 | ), | |
|
51 | :name => field | |
|
49 | def search_filter_tag(criteria) | |
|
50 | content_tag("select", | |
|
51 | options_for_select(session[:search_filter][criteria][:options], session[:search_filter][criteria][:value]), | |
|
52 | :name => criteria | |
|
52 | 53 | ) |
|
53 |
|
|
|
54 | end | |
|
55 | ||
|
56 | def search_filter_init_list_issues | |
|
57 | search_filter_criteria('status_id') { | |
|
58 | [ ["[Open]", "O", ["issue_statuses.is_closed=?", false]], | |
|
59 | ["[All]", "A", ["", false]] | |
|
60 | ] + IssueStatus.find(:all).collect {|s| [s.name, s.id, ["issues.status_id=?", s.id]] } | |
|
61 | } | |
|
62 | ||
|
63 | search_filter_criteria('tracker_id') { | |
|
64 | [ ["[All]", "A", ["", false]] | |
|
65 | ] + Tracker.find(:all).collect {|s| [s.name, s.id, ["issues.tracker_id=?", s.id]] } | |
|
66 | } | |
|
67 | ||
|
68 | search_filter_criteria('priority_id') { | |
|
69 | [ ["[All]", "A", ["", false]] | |
|
70 | ] + Enumeration.find(:all, :conditions => ['opt=?','IPRI']).collect {|s| [s.name, s.id, ["issues.priority_id=?", s.id]] } | |
|
71 | } | |
|
72 | ||
|
73 | search_filter_criteria('category_id') { | |
|
74 | [ ["[All]", "A", ["", false]], | |
|
75 | ["[None]", "N", ["issues.category_id is null"]] | |
|
76 | ] + @project.issue_categories.find(:all).collect {|s| [s.name, s.id, ["issues.category_id=?", s.id]] } | |
|
77 | } | |
|
54 | 78 | |
|
79 | search_filter_criteria('assigned_to_id') { | |
|
80 | [ ["[All]", "A", ["", false]], | |
|
81 | ["[Nobody]", "N", ["issues.assigned_to_id is null"]] | |
|
82 | ] + User.find(:all).collect {|s| [s.display_name, s.id, ["issues.assigned_to_id=?", s.id]] } | |
|
83 | } | |
|
84 | end | |
|
55 | 85 | end No newline at end of file |
@@ -1,56 +1,58 | |||
|
1 | 1 | <h2><%=_('Issues')%></h2> |
|
2 | 2 | |
|
3 | 3 | <form method="post" class="noborder"> |
|
4 | 4 | <table cellpadding=2> |
|
5 | 5 | <tr> |
|
6 |
<td><%=_('Status')%>:<br /><%= search_filter_tag(" |
|
|
7 |
<td><%=_('Tracker')%>:<br /><%= search_filter_tag(" |
|
|
8 |
<td><%=_('Priority')%>:<br /><%= search_filter_tag(" |
|
|
9 |
<td><%=_('Category')%>:<br /><%= search_filter_tag(" |
|
|
10 |
<td><%=_('A |
|
|
6 | <td><%=_('Status')%>:<br /><%= search_filter_tag("status_id") %></td> | |
|
7 | <td><%=_('Tracker')%>:<br /><%= search_filter_tag("tracker_id") %></td> | |
|
8 | <td><%=_('Priority')%>:<br /><%= search_filter_tag("priority_id") %></td> | |
|
9 | <td><%=_('Category')%>:<br /><%= search_filter_tag("category_id") %></td> | |
|
10 | <td><%=_('Assigned to')%>:<br /><%= search_filter_tag("assigned_to_id") %></td> | |
|
11 | 11 | <td valign="bottom"> |
|
12 | 12 | <%= submit_tag _('Apply filter') %> |
|
13 | 13 | <%= end_form_tag %> |
|
14 | 14 | |
|
15 | 15 | <%= start_form_tag %> |
|
16 | 16 | <%= submit_tag _('Reset') %> |
|
17 | 17 | <%= end_form_tag %> |
|
18 | 18 | </td> |
|
19 | 19 | </tr> |
|
20 |
|
|
|
21 | ||
|
22 | | |
|
23 | ||
|
20 | </table> | |
|
21 | | |
|
24 | 22 | <table border="0" cellspacing="1" cellpadding="2" class="listTableContent"> |
|
25 | 23 | |
|
24 | <tr><td colspan="7" align="right"> | |
|
25 | <small><%= link_to 'Export to CSV', :action => 'export_issues_csv', :id => @project.id %></small> | |
|
26 | </td></tr> | |
|
27 | ||
|
26 | 28 | <tr class="ListHead"> |
|
27 | 29 | <%= sort_header_tag('issues.id', :caption => '#') %> |
|
28 | 30 | <%= sort_header_tag('issue_statuses.name', :caption => _('Status')) %> |
|
29 | 31 | <%= sort_header_tag('issues.tracker_id', :caption => _('Tracker')) %> |
|
30 | 32 | <th><%=_('Subject')%></th> |
|
31 | 33 | <%= sort_header_tag('users.lastname', :caption => _('Author')) %> |
|
32 | 34 | <%= sort_header_tag('issues.created_on', :caption => _('Created on')) %> |
|
33 | 35 | <%= sort_header_tag('issues.updated_on', :caption => _('Last update')) %> |
|
34 | 36 | </tr> |
|
35 | 37 | |
|
36 | 38 | <% for issue in @issues %> |
|
37 | 39 | <tr bgcolor="#<%= issue.status.html_color %>"> |
|
38 | 40 | <td align="center"><%= link_to issue.long_id, :controller => 'issues', :action => 'show', :id => issue %></td> |
|
39 | 41 | <td align="center"><%= issue.status.name %></td> |
|
40 | 42 | <td align="center"><%= issue.tracker.name %></td> |
|
41 | 43 | <td><%= link_to issue.subject, :controller => 'issues', :action => 'show', :id => issue %></td> |
|
42 | 44 | <td align="center"><%= issue.author.display_name %></td> |
|
43 | 45 | <td align="center"><%= format_time(issue.created_on) %></td> |
|
44 | 46 | <td align="center"><%= format_time(issue.updated_on) %></td> |
|
45 | 47 | </tr> |
|
46 | 48 | <% end %> |
|
47 | 49 | </table> |
|
48 | 50 | <p> |
|
49 | 51 | <%= pagination_links_full @issue_pages %> |
|
50 | 52 | [ <%= @issue_pages.current.first_item %> - <%= @issue_pages.current.last_item %> / <%= @issue_count %> ] |
|
51 |
|
|
|
52 | ||
|
53 | </p> | |
|
54 | ||
|
53 | 55 | |
|
54 | 56 | <p> |
|
55 | 57 | <%= link_to_if_authorized '» ' + _('Report an issue'), :controller => 'projects', :action => 'add_issue', :id => @project %> |
|
56 | 58 | </p> No newline at end of file |
@@ -1,34 +1,39 | |||
|
1 | 1 | <% col_width = 70 / (@statuses.length+3) %> |
|
2 | 2 | |
|
3 | 3 | <table border="0" cellspacing="1" cellpadding="2" width="100%"> |
|
4 | 4 | <tr> |
|
5 | 5 | <td width="25%"></td> |
|
6 | 6 | <% for status in @statuses %> |
|
7 | 7 | <td align="center" width="<%= col_width %>%" bgcolor="#<%= status.html_color %>"><small><%= status.name %></small></td> |
|
8 | 8 | <% end %> |
|
9 | 9 | <td align="center" width="<%= col_width %>%"><strong><%=_('Open')%></strong></td> |
|
10 | 10 | <td align="center" width="<%= col_width %>%"><strong><%=_('Closed')%></strong></td> |
|
11 | 11 | <td align="center" width="<%= col_width %>%"><strong><%=_('Total')%></strong></td> |
|
12 | 12 | </tr> |
|
13 | 13 | |
|
14 | 14 | <% for row in rows %> |
|
15 | 15 | <tr style="background-color:#CEE1ED"> |
|
16 | 16 | <td><%= link_to row.name, :controller => 'projects', :action => 'list_issues', :id => @project, |
|
17 | 17 | :set_filter => 1, |
|
18 |
" |
|
|
18 | "#{field_name}" => row.id %></td> | |
|
19 | 19 | <% for status in @statuses %> |
|
20 | 20 | <td align="center"><%= link_to (aggregate data, { field_name => row.id, "status_id" => status.id }), |
|
21 | 21 | :controller => 'projects', :action => 'list_issues', :id => @project, |
|
22 | 22 | :set_filter => 1, |
|
23 |
" |
|
|
24 |
" |
|
|
23 | "status_id" => status.id, | |
|
24 | "#{field_name}" => row.id %></td> | |
|
25 | 25 | <% end %> |
|
26 |
<td align="center"><%= aggregate data, { field_name => row.id, "closed" => 0 } |
|
|
26 | <td align="center"><%= link_to (aggregate data, { field_name => row.id, "closed" => 0 }), | |
|
27 | :controller => 'projects', :action => 'list_issues', :id => @project, | |
|
28 | :set_filter => 1, | |
|
29 | "#{field_name}" => row.id, | |
|
30 | "status_id" => "O" %></td> | |
|
27 | 31 | <td align="center"><%= aggregate data, { field_name => row.id, "closed" => 1 } %></td> |
|
28 | 32 | <td align="center"><%= link_to (aggregate data, { field_name => row.id }), |
|
29 | 33 | :controller => 'projects', :action => 'list_issues', :id => @project, |
|
30 | 34 | :set_filter => 1, |
|
31 |
" |
|
|
35 | "#{field_name}" => row.id, | |
|
36 | "status_id" => "A" %></td> | |
|
32 | 37 | <% end %> |
|
33 | 38 | </tr> |
|
34 | 39 | </table> No newline at end of file |
@@ -1,17 +1,25 | |||
|
1 | 1 | == redMine changelog |
|
2 | 2 | |
|
3 | 3 | redMine - project management software |
|
4 | 4 | Copyright (C) 2006 Jean-Philippe Lang |
|
5 | 5 | http://redmine.sourceforge.net/ |
|
6 | 6 | |
|
7 | 7 | |
|
8 | == xx/xx/2006 | |
|
9 | ||
|
10 | * More filter options in issues list | |
|
11 | * Issues list exportable to CSV | |
|
12 | * Fixed: Error on tables creation with PostgreSQL (rev5) | |
|
13 | * Fixed: SQL error in "issue reports" view with PostgreSQL (rev5) | |
|
14 | ||
|
15 | ||
|
8 | 16 | == 06/25/2006 - v0.1.0 |
|
9 | 17 | |
|
10 | 18 | * multiple users/multiple projects |
|
11 | 19 | * role based access control |
|
12 | 20 | * issue tracking system |
|
13 | 21 | * fully customizable workflow |
|
14 | 22 | * documents/files repository |
|
15 | 23 | * email notifications on issue creation and update |
|
16 | 24 | * multilanguage support (except for error messages):english, french, spanish |
|
17 | 25 | * online manual in french (unfinished) No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now