@@ -1,35 +1,35 | |||
|
1 | 1 | <form id="status_by_form"> |
|
2 | 2 | <fieldset> |
|
3 | 3 | <legend> |
|
4 | 4 | <%= l(:label_issues_by, |
|
5 | 5 | select_tag('status_by', |
|
6 | 6 | status_by_options_for_select(criteria), |
|
7 | 7 | :id => 'status_by_select', |
|
8 |
:onchange => remote_function(:url => |
|
|
8 | :onchange => remote_function(:url => status_by_project_version_path(version.project, version), | |
|
9 | 9 | :with => "Form.serialize('status_by_form')"))) %> |
|
10 | 10 | </legend> |
|
11 | 11 | <% if counts.empty? %> |
|
12 | 12 | <p><em><%= l(:label_no_data) %></em></p> |
|
13 | 13 | <% else %> |
|
14 | 14 | <table> |
|
15 | 15 | <% counts.each do |count| %> |
|
16 | 16 | <tr> |
|
17 | 17 | <td width="130px" align="right" > |
|
18 | 18 | <%= link_to count[:group], {:controller => 'issues', |
|
19 | 19 | :action => 'index', |
|
20 | 20 | :project_id => version.project, |
|
21 | 21 | :set_filter => 1, |
|
22 | 22 | :fixed_version_id => version, |
|
23 | 23 | "#{criteria}_id" => count[:group]} %> |
|
24 | 24 | </td> |
|
25 | 25 | <td width="240px"> |
|
26 | 26 | <%= progress_bar((count[:closed].to_f / count[:total])*100, |
|
27 | 27 | :legend => "#{count[:closed]}/#{count[:total]}", |
|
28 | 28 | :width => "#{(count[:total].to_f / max * 200).floor}px;") %> |
|
29 | 29 | </td> |
|
30 | 30 | </tr> |
|
31 | 31 | <% end %> |
|
32 | 32 | </table> |
|
33 | 33 | <% end %> |
|
34 | 34 | </fieldset> |
|
35 | 35 | </form> |
@@ -1,269 +1,269 | |||
|
1 | 1 | ActionController::Routing::Routes.draw do |map| |
|
2 | 2 | # Add your own custom routes here. |
|
3 | 3 | # The priority is based upon order of creation: first created -> highest priority. |
|
4 | 4 | |
|
5 | 5 | # Here's a sample route: |
|
6 | 6 | # map.connect 'products/:id', :controller => 'catalog', :action => 'view' |
|
7 | 7 | # Keep in mind you can assign values other than :controller and :action |
|
8 | 8 | |
|
9 | 9 | map.home '', :controller => 'welcome' |
|
10 | 10 | |
|
11 | 11 | map.signin 'login', :controller => 'account', :action => 'login' |
|
12 | 12 | map.signout 'logout', :controller => 'account', :action => 'logout' |
|
13 | 13 | |
|
14 | 14 | map.connect 'roles/workflow/:id/:role_id/:tracker_id', :controller => 'roles', :action => 'workflow' |
|
15 | 15 | map.connect 'help/:ctrl/:page', :controller => 'help' |
|
16 | 16 | |
|
17 | 17 | map.connect 'time_entries/:id/edit', :action => 'edit', :controller => 'timelog' |
|
18 | 18 | map.connect 'projects/:project_id/time_entries/new', :action => 'edit', :controller => 'timelog' |
|
19 | 19 | map.connect 'projects/:project_id/issues/:issue_id/time_entries/new', :action => 'edit', :controller => 'timelog' |
|
20 | 20 | |
|
21 | 21 | map.with_options :controller => 'timelog' do |timelog| |
|
22 | 22 | timelog.connect 'projects/:project_id/time_entries', :action => 'details' |
|
23 | 23 | |
|
24 | 24 | timelog.with_options :action => 'details', :conditions => {:method => :get} do |time_details| |
|
25 | 25 | time_details.connect 'time_entries' |
|
26 | 26 | time_details.connect 'time_entries.:format' |
|
27 | 27 | time_details.connect 'issues/:issue_id/time_entries' |
|
28 | 28 | time_details.connect 'issues/:issue_id/time_entries.:format' |
|
29 | 29 | time_details.connect 'projects/:project_id/time_entries.:format' |
|
30 | 30 | time_details.connect 'projects/:project_id/issues/:issue_id/time_entries' |
|
31 | 31 | time_details.connect 'projects/:project_id/issues/:issue_id/time_entries.:format' |
|
32 | 32 | end |
|
33 | 33 | timelog.connect 'projects/:project_id/time_entries/report', :action => 'report' |
|
34 | 34 | timelog.with_options :action => 'report',:conditions => {:method => :get} do |time_report| |
|
35 | 35 | time_report.connect 'time_entries/report' |
|
36 | 36 | time_report.connect 'time_entries/report.:format' |
|
37 | 37 | time_report.connect 'projects/:project_id/time_entries/report.:format' |
|
38 | 38 | end |
|
39 | 39 | |
|
40 | 40 | timelog.with_options :action => 'edit', :conditions => {:method => :get} do |time_edit| |
|
41 | 41 | time_edit.connect 'issues/:issue_id/time_entries/new' |
|
42 | 42 | end |
|
43 | 43 | |
|
44 | 44 | timelog.connect 'time_entries/:id/destroy', :action => 'destroy', :conditions => {:method => :post} |
|
45 | 45 | end |
|
46 | 46 | |
|
47 | 47 | map.connect 'projects/:id/wiki', :controller => 'wikis', :action => 'edit', :conditions => {:method => :post} |
|
48 | 48 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :get} |
|
49 | 49 | map.connect 'projects/:id/wiki/destroy', :controller => 'wikis', :action => 'destroy', :conditions => {:method => :post} |
|
50 | 50 | map.with_options :controller => 'wiki' do |wiki_routes| |
|
51 | 51 | wiki_routes.with_options :conditions => {:method => :get} do |wiki_views| |
|
52 | 52 | wiki_views.connect 'projects/:id/wiki/:page', :action => 'special', :page => /page_index|date_index|export/i |
|
53 | 53 | wiki_views.connect 'projects/:id/wiki/:page', :action => 'index', :page => nil |
|
54 | 54 | wiki_views.connect 'projects/:id/wiki/:page/edit', :action => 'edit' |
|
55 | 55 | wiki_views.connect 'projects/:id/wiki/:page/rename', :action => 'rename' |
|
56 | 56 | wiki_views.connect 'projects/:id/wiki/:page/history', :action => 'history' |
|
57 | 57 | wiki_views.connect 'projects/:id/wiki/:page/diff/:version/vs/:version_from', :action => 'diff' |
|
58 | 58 | wiki_views.connect 'projects/:id/wiki/:page/annotate/:version', :action => 'annotate' |
|
59 | 59 | end |
|
60 | 60 | |
|
61 | 61 | wiki_routes.connect 'projects/:id/wiki/:page/:action', |
|
62 | 62 | :action => /edit|rename|destroy|preview|protect/, |
|
63 | 63 | :conditions => {:method => :post} |
|
64 | 64 | end |
|
65 | 65 | |
|
66 | 66 | map.with_options :controller => 'messages' do |messages_routes| |
|
67 | 67 | messages_routes.with_options :conditions => {:method => :get} do |messages_views| |
|
68 | 68 | messages_views.connect 'boards/:board_id/topics/new', :action => 'new' |
|
69 | 69 | messages_views.connect 'boards/:board_id/topics/:id', :action => 'show' |
|
70 | 70 | messages_views.connect 'boards/:board_id/topics/:id/edit', :action => 'edit' |
|
71 | 71 | end |
|
72 | 72 | messages_routes.with_options :conditions => {:method => :post} do |messages_actions| |
|
73 | 73 | messages_actions.connect 'boards/:board_id/topics/new', :action => 'new' |
|
74 | 74 | messages_actions.connect 'boards/:board_id/topics/:id/replies', :action => 'reply' |
|
75 | 75 | messages_actions.connect 'boards/:board_id/topics/:id/:action', :action => /edit|destroy/ |
|
76 | 76 | end |
|
77 | 77 | end |
|
78 | 78 | |
|
79 | 79 | map.with_options :controller => 'boards' do |board_routes| |
|
80 | 80 | board_routes.with_options :conditions => {:method => :get} do |board_views| |
|
81 | 81 | board_views.connect 'projects/:project_id/boards', :action => 'index' |
|
82 | 82 | board_views.connect 'projects/:project_id/boards/new', :action => 'new' |
|
83 | 83 | board_views.connect 'projects/:project_id/boards/:id', :action => 'show' |
|
84 | 84 | board_views.connect 'projects/:project_id/boards/:id.:format', :action => 'show' |
|
85 | 85 | board_views.connect 'projects/:project_id/boards/:id/edit', :action => 'edit' |
|
86 | 86 | end |
|
87 | 87 | board_routes.with_options :conditions => {:method => :post} do |board_actions| |
|
88 | 88 | board_actions.connect 'projects/:project_id/boards', :action => 'new' |
|
89 | 89 | board_actions.connect 'projects/:project_id/boards/:id/:action', :action => /edit|destroy/ |
|
90 | 90 | end |
|
91 | 91 | end |
|
92 | 92 | |
|
93 | 93 | map.with_options :controller => 'documents' do |document_routes| |
|
94 | 94 | document_routes.with_options :conditions => {:method => :get} do |document_views| |
|
95 | 95 | document_views.connect 'projects/:project_id/documents', :action => 'index' |
|
96 | 96 | document_views.connect 'projects/:project_id/documents/new', :action => 'new' |
|
97 | 97 | document_views.connect 'documents/:id', :action => 'show' |
|
98 | 98 | document_views.connect 'documents/:id/edit', :action => 'edit' |
|
99 | 99 | end |
|
100 | 100 | document_routes.with_options :conditions => {:method => :post} do |document_actions| |
|
101 | 101 | document_actions.connect 'projects/:project_id/documents', :action => 'new' |
|
102 | 102 | document_actions.connect 'documents/:id/:action', :action => /destroy|edit/ |
|
103 | 103 | end |
|
104 | 104 | end |
|
105 | 105 | |
|
106 | 106 | map.resources :issue_moves, :only => [:new, :create], :path_prefix => '/issues', :as => 'move' |
|
107 | 107 | |
|
108 | 108 | # Misc issue routes. TODO: move into resources |
|
109 | 109 | map.auto_complete_issues '/issues/auto_complete', :controller => 'auto_completes', :action => 'issues' |
|
110 | 110 | map.preview_issue '/issues/preview/:id', :controller => 'previews', :action => 'issue' # TODO: would look nicer as /issues/:id/preview |
|
111 | 111 | map.issues_context_menu '/issues/context_menu', :controller => 'context_menus', :action => 'issues' |
|
112 | 112 | map.issue_changes '/issues/changes', :controller => 'journals', :action => 'index' |
|
113 | 113 | map.bulk_edit_issue 'issues/bulk_edit', :controller => 'issues', :action => 'bulk_edit', :conditions => { :method => :get } |
|
114 | 114 | map.bulk_update_issue 'issues/bulk_edit', :controller => 'issues', :action => 'bulk_update', :conditions => { :method => :post } |
|
115 | 115 | map.quoted_issue '/issues/:id/quoted', :controller => 'journals', :action => 'new', :id => /\d+/, :conditions => { :method => :post } |
|
116 | 116 | map.connect '/issues/:id/destroy', :controller => 'issues', :action => 'destroy', :conditions => { :method => :post } # legacy |
|
117 | 117 | |
|
118 | 118 | map.resource :gantt, :path_prefix => '/issues', :controller => 'gantts', :only => [:show, :update] |
|
119 | 119 | map.resource :gantt, :path_prefix => '/projects/:project_id/issues', :controller => 'gantts', :only => [:show, :update] |
|
120 | 120 | map.resource :calendar, :path_prefix => '/issues', :controller => 'calendars', :only => [:show, :update] |
|
121 | 121 | map.resource :calendar, :path_prefix => '/projects/:project_id/issues', :controller => 'calendars', :only => [:show, :update] |
|
122 | 122 | |
|
123 | 123 | map.with_options :controller => 'reports', :conditions => {:method => :get} do |reports| |
|
124 | 124 | reports.connect 'projects/:id/issues/report', :action => 'issue_report' |
|
125 | 125 | reports.connect 'projects/:id/issues/report/:detail', :action => 'issue_report_details' |
|
126 | 126 | end |
|
127 | 127 | |
|
128 | 128 | # Following two routes conflict with the resources because #index allows POST |
|
129 | 129 | map.connect '/issues', :controller => 'issues', :action => 'index', :conditions => { :method => :post } |
|
130 | 130 | map.connect '/issues/create', :controller => 'issues', :action => 'index', :conditions => { :method => :post } |
|
131 | 131 | |
|
132 | 132 | map.resources :issues, :member => { :edit => :post }, :collection => {} |
|
133 | 133 | map.resources :issues, :path_prefix => '/projects/:project_id', :collection => { :create => :post } |
|
134 | 134 | |
|
135 | 135 | map.with_options :controller => 'issue_relations', :conditions => {:method => :post} do |relations| |
|
136 | 136 | relations.connect 'issues/:issue_id/relations/:id', :action => 'new' |
|
137 | 137 | relations.connect 'issues/:issue_id/relations/:id/destroy', :action => 'destroy' |
|
138 | 138 | end |
|
139 | 139 | |
|
140 | 140 | map.with_options :controller => 'news' do |news_routes| |
|
141 | 141 | news_routes.with_options :conditions => {:method => :get} do |news_views| |
|
142 | 142 | news_views.connect 'news', :action => 'index' |
|
143 | 143 | news_views.connect 'projects/:project_id/news', :action => 'index' |
|
144 | 144 | news_views.connect 'projects/:project_id/news.:format', :action => 'index' |
|
145 | 145 | news_views.connect 'news.:format', :action => 'index' |
|
146 | 146 | news_views.connect 'projects/:project_id/news/new', :action => 'new' |
|
147 | 147 | news_views.connect 'news/:id', :action => 'show' |
|
148 | 148 | news_views.connect 'news/:id/edit', :action => 'edit' |
|
149 | 149 | end |
|
150 | 150 | news_routes.with_options do |news_actions| |
|
151 | 151 | news_actions.connect 'projects/:project_id/news', :action => 'new' |
|
152 | 152 | news_actions.connect 'news/:id/edit', :action => 'edit' |
|
153 | 153 | news_actions.connect 'news/:id/destroy', :action => 'destroy' |
|
154 | 154 | end |
|
155 | 155 | end |
|
156 | 156 | |
|
157 | 157 | map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new' |
|
158 | 158 | |
|
159 | 159 | map.with_options :controller => 'users' do |users| |
|
160 | 160 | users.with_options :conditions => {:method => :get} do |user_views| |
|
161 | 161 | user_views.connect 'users', :action => 'index' |
|
162 | 162 | user_views.connect 'users/:id', :action => 'show', :id => /\d+/ |
|
163 | 163 | user_views.connect 'users/new', :action => 'add' |
|
164 | 164 | user_views.connect 'users/:id/edit/:tab', :action => 'edit', :tab => nil |
|
165 | 165 | end |
|
166 | 166 | users.with_options :conditions => {:method => :post} do |user_actions| |
|
167 | 167 | user_actions.connect 'users', :action => 'add' |
|
168 | 168 | user_actions.connect 'users/new', :action => 'add' |
|
169 | 169 | user_actions.connect 'users/:id/edit', :action => 'edit' |
|
170 | 170 | user_actions.connect 'users/:id/memberships', :action => 'edit_membership' |
|
171 | 171 | user_actions.connect 'users/:id/memberships/:membership_id', :action => 'edit_membership' |
|
172 | 172 | user_actions.connect 'users/:id/memberships/:membership_id/destroy', :action => 'destroy_membership' |
|
173 | 173 | end |
|
174 | 174 | end |
|
175 | 175 | |
|
176 | 176 | # For nice "roadmap" in the url for the index action |
|
177 | 177 | map.connect 'projects/:project_id/roadmap', :controller => 'versions', :action => 'index' |
|
178 | 178 | |
|
179 | 179 | map.resources :projects, :member => { |
|
180 | 180 | :copy => [:get, :post], |
|
181 | 181 | :settings => :get, |
|
182 | 182 | :modules => :post, |
|
183 | 183 | :archive => :post, |
|
184 | 184 | :unarchive => :post |
|
185 | 185 | } do |project| |
|
186 | 186 | project.resource :project_enumerations, :as => 'enumerations', :only => [:update, :destroy] |
|
187 | 187 | project.resources :files, :only => [:index, :new, :create] |
|
188 | project.resources :versions, :collection => {:close_completed => :put} | |
|
188 | project.resources :versions, :collection => {:close_completed => :put}, :member => {:status_by => :post} | |
|
189 | 189 | end |
|
190 | 190 | |
|
191 | 191 | # Destroy uses a get request to prompt the user before the actual DELETE request |
|
192 | 192 | map.project_destroy_confirm 'projects/:id/destroy', :controller => 'projects', :action => 'destroy', :conditions => {:method => :get} |
|
193 | 193 | |
|
194 | 194 | # TODO: port to be part of the resources route(s) |
|
195 | 195 | map.with_options :controller => 'projects' do |project_mapper| |
|
196 | 196 | project_mapper.with_options :conditions => {:method => :get} do |project_views| |
|
197 | 197 | project_views.connect 'projects/:id/settings/:tab', :controller => 'projects', :action => 'settings' |
|
198 | 198 | project_views.connect 'projects/:project_id/issues/:copy_from/copy', :controller => 'issues', :action => 'new' |
|
199 | 199 | end |
|
200 | 200 | end |
|
201 | 201 | |
|
202 | 202 | map.with_options :controller => 'activities', :action => 'index', :conditions => {:method => :get} do |activity| |
|
203 | 203 | activity.connect 'projects/:id/activity' |
|
204 | 204 | activity.connect 'projects/:id/activity.:format' |
|
205 | 205 | activity.connect 'activity', :id => nil |
|
206 | 206 | activity.connect 'activity.:format', :id => nil |
|
207 | 207 | end |
|
208 | 208 | |
|
209 | 209 | |
|
210 | 210 | map.with_options :controller => 'issue_categories' do |categories| |
|
211 | 211 | categories.connect 'projects/:project_id/issue_categories/new', :action => 'new' |
|
212 | 212 | end |
|
213 | 213 | |
|
214 | 214 | map.with_options :controller => 'repositories' do |repositories| |
|
215 | 215 | repositories.with_options :conditions => {:method => :get} do |repository_views| |
|
216 | 216 | repository_views.connect 'projects/:id/repository', :action => 'show' |
|
217 | 217 | repository_views.connect 'projects/:id/repository/edit', :action => 'edit' |
|
218 | 218 | repository_views.connect 'projects/:id/repository/statistics', :action => 'stats' |
|
219 | 219 | repository_views.connect 'projects/:id/repository/revisions', :action => 'revisions' |
|
220 | 220 | repository_views.connect 'projects/:id/repository/revisions.:format', :action => 'revisions' |
|
221 | 221 | repository_views.connect 'projects/:id/repository/revisions/:rev', :action => 'revision' |
|
222 | 222 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff', :action => 'diff' |
|
223 | 223 | repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format', :action => 'diff' |
|
224 | 224 | repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path', :action => 'entry', :format => 'raw', :requirements => { :rev => /[a-z0-9\.\-_]+/ } |
|
225 | 225 | repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path', :requirements => { :rev => /[a-z0-9\.\-_]+/ } |
|
226 | 226 | repository_views.connect 'projects/:id/repository/raw/*path', :action => 'entry', :format => 'raw' |
|
227 | 227 | # TODO: why the following route is required? |
|
228 | 228 | repository_views.connect 'projects/:id/repository/entry/*path', :action => 'entry' |
|
229 | 229 | repository_views.connect 'projects/:id/repository/:action/*path' |
|
230 | 230 | end |
|
231 | 231 | |
|
232 | 232 | repositories.connect 'projects/:id/repository/:action', :conditions => {:method => :post} |
|
233 | 233 | end |
|
234 | 234 | |
|
235 | 235 | map.connect 'attachments/:id', :controller => 'attachments', :action => 'show', :id => /\d+/ |
|
236 | 236 | map.connect 'attachments/:id/:filename', :controller => 'attachments', :action => 'show', :id => /\d+/, :filename => /.*/ |
|
237 | 237 | map.connect 'attachments/download/:id/:filename', :controller => 'attachments', :action => 'download', :id => /\d+/, :filename => /.*/ |
|
238 | 238 | |
|
239 | 239 | map.resources :groups |
|
240 | 240 | |
|
241 | 241 | #left old routes at the bottom for backwards compat |
|
242 | 242 | map.connect 'projects/:project_id/issues/:action', :controller => 'issues' |
|
243 | 243 | map.connect 'projects/:project_id/documents/:action', :controller => 'documents' |
|
244 | 244 | map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards' |
|
245 | 245 | map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages' |
|
246 | 246 | map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki' |
|
247 | 247 | map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations' |
|
248 | 248 | map.connect 'projects/:project_id/news/:action', :controller => 'news' |
|
249 | 249 | map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/ |
|
250 | 250 | map.with_options :controller => 'repositories' do |omap| |
|
251 | 251 | omap.repositories_show 'repositories/browse/:id/*path', :action => 'browse' |
|
252 | 252 | omap.repositories_changes 'repositories/changes/:id/*path', :action => 'changes' |
|
253 | 253 | omap.repositories_diff 'repositories/diff/:id/*path', :action => 'diff' |
|
254 | 254 | omap.repositories_entry 'repositories/entry/:id/*path', :action => 'entry' |
|
255 | 255 | omap.repositories_entry 'repositories/annotate/:id/*path', :action => 'annotate' |
|
256 | 256 | omap.connect 'repositories/revision/:id/:rev', :action => 'revision' |
|
257 | 257 | end |
|
258 | 258 | |
|
259 | 259 | map.with_options :controller => 'sys' do |sys| |
|
260 | 260 | sys.connect 'sys/projects.:format', :action => 'projects', :conditions => {:method => :get} |
|
261 | 261 | sys.connect 'sys/projects/:id/repository.:format', :action => 'create_project_repository', :conditions => {:method => :post} |
|
262 | 262 | end |
|
263 | 263 | |
|
264 | 264 | # Install the default route as the lowest priority. |
|
265 | 265 | map.connect ':controller/:action/:id' |
|
266 | 266 | map.connect 'robots.txt', :controller => 'welcome', :action => 'robots' |
|
267 | 267 | # Used for OpenID |
|
268 | 268 | map.root :controller => 'account', :action => 'login' |
|
269 | 269 | end |
General Comments 0
You need to be logged in to leave comments.
Login now