The requested changes are too big and content was truncated. Show full diff
@@ -1,73 +1,81 | |||||
1 | # encoding: utf-8 |
|
1 | # encoding: utf-8 | |
2 | # |
|
2 | # | |
3 | # Redmine - project management software |
|
3 | # Redmine - project management software | |
4 | # Copyright (C) 2006-2016 Jean-Philippe Lang |
|
4 | # Copyright (C) 2006-2016 Jean-Philippe Lang | |
5 | # |
|
5 | # | |
6 | # This program is free software; you can redistribute it and/or |
|
6 | # This program is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU General Public License |
|
7 | # modify it under the terms of the GNU General Public License | |
8 | # as published by the Free Software Foundation; either version 2 |
|
8 | # as published by the Free Software Foundation; either version 2 | |
9 | # of the License, or (at your option) any later version. |
|
9 | # of the License, or (at your option) any later version. | |
10 | # |
|
10 | # | |
11 | # This program is distributed in the hope that it will be useful, |
|
11 | # This program is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. |
|
14 | # GNU General Public License for more details. | |
15 | # |
|
15 | # | |
16 | # You should have received a copy of the GNU General Public License |
|
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software |
|
17 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
19 |
|
19 | |||
20 | module RoutesHelper |
|
20 | module RoutesHelper | |
21 |
|
21 | |||
22 | # Returns the path to project issues or to the cross-project |
|
22 | # Returns the path to project issues or to the cross-project | |
23 | # issue list if project is nil |
|
23 | # issue list if project is nil | |
24 | def _project_issues_path(project, *args) |
|
24 | def _project_issues_path(project, *args) | |
25 | if project |
|
25 | if project | |
26 | project_issues_path(project, *args) |
|
26 | project_issues_path(project, *args) | |
27 | else |
|
27 | else | |
28 | issues_path(*args) |
|
28 | issues_path(*args) | |
29 | end |
|
29 | end | |
30 | end |
|
30 | end | |
31 |
|
31 | |||
|
32 | def _new_project_issue_path(project, *args) | |||
|
33 | if project | |||
|
34 | new_project_issue_path(project, *args) | |||
|
35 | else | |||
|
36 | new_issue_path(*args) | |||
|
37 | end | |||
|
38 | end | |||
|
39 | ||||
32 | def _project_calendar_path(project, *args) |
|
40 | def _project_calendar_path(project, *args) | |
33 | project ? project_calendar_path(project, *args) : issues_calendar_path(*args) |
|
41 | project ? project_calendar_path(project, *args) : issues_calendar_path(*args) | |
34 | end |
|
42 | end | |
35 |
|
43 | |||
36 | def _project_gantt_path(project, *args) |
|
44 | def _project_gantt_path(project, *args) | |
37 | project ? project_gantt_path(project, *args) : issues_gantt_path(*args) |
|
45 | project ? project_gantt_path(project, *args) : issues_gantt_path(*args) | |
38 | end |
|
46 | end | |
39 |
|
47 | |||
40 | def _time_entries_path(project, issue, *args) |
|
48 | def _time_entries_path(project, issue, *args) | |
41 | if issue |
|
49 | if issue | |
42 | issue_time_entries_path(issue, *args) |
|
50 | issue_time_entries_path(issue, *args) | |
43 | elsif project |
|
51 | elsif project | |
44 | project_time_entries_path(project, *args) |
|
52 | project_time_entries_path(project, *args) | |
45 | else |
|
53 | else | |
46 | time_entries_path(*args) |
|
54 | time_entries_path(*args) | |
47 | end |
|
55 | end | |
48 | end |
|
56 | end | |
49 |
|
57 | |||
50 | def _report_time_entries_path(project, issue, *args) |
|
58 | def _report_time_entries_path(project, issue, *args) | |
51 | if issue |
|
59 | if issue | |
52 | report_issue_time_entries_path(issue, *args) |
|
60 | report_issue_time_entries_path(issue, *args) | |
53 | elsif project |
|
61 | elsif project | |
54 | report_project_time_entries_path(project, *args) |
|
62 | report_project_time_entries_path(project, *args) | |
55 | else |
|
63 | else | |
56 | report_time_entries_path(*args) |
|
64 | report_time_entries_path(*args) | |
57 | end |
|
65 | end | |
58 | end |
|
66 | end | |
59 |
|
67 | |||
60 | def _new_time_entry_path(project, issue, *args) |
|
68 | def _new_time_entry_path(project, issue, *args) | |
61 | if issue |
|
69 | if issue | |
62 | new_issue_time_entry_path(issue, *args) |
|
70 | new_issue_time_entry_path(issue, *args) | |
63 | elsif project |
|
71 | elsif project | |
64 | new_project_time_entry_path(project, *args) |
|
72 | new_project_time_entry_path(project, *args) | |
65 | else |
|
73 | else | |
66 | new_time_entry_path(*args) |
|
74 | new_time_entry_path(*args) | |
67 | end |
|
75 | end | |
68 | end |
|
76 | end | |
69 |
|
77 | |||
70 | def board_path(board, *args) |
|
78 | def board_path(board, *args) | |
71 | project_board_path(board.project, board, *args) |
|
79 | project_board_path(board.project, board, *args) | |
72 | end |
|
80 | end | |
73 | end |
|
81 | end |
@@ -1,127 +1,127 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 |
<% if |
|
2 | <% if User.current.allowed_to?(:add_issues, @project, :global => true) && (@project.nil? || @project.trackers.any?) %> | |
3 | <%= link_to l(:label_issue_new), new_project_issue_path(@project), :class => 'icon icon-add new-issue' %> |
|
3 | <%= link_to l(:label_issue_new), _new_project_issue_path(@project), :class => 'icon icon-add new-issue' %> | |
4 | <% end %> |
|
4 | <% end %> | |
5 | </div> |
|
5 | </div> | |
6 |
|
6 | |||
7 | <h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2> |
|
7 | <h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2> | |
8 | <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %> |
|
8 | <% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %> | |
9 |
|
9 | |||
10 | <%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, |
|
10 | <%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, | |
11 | :method => :get, :id => 'query_form') do %> |
|
11 | :method => :get, :id => 'query_form') do %> | |
12 | <div id="query_form_with_buttons" class="hide-when-print"> |
|
12 | <div id="query_form_with_buttons" class="hide-when-print"> | |
13 | <%= hidden_field_tag 'set_filter', '1' %> |
|
13 | <%= hidden_field_tag 'set_filter', '1' %> | |
14 | <div id="query_form_content"> |
|
14 | <div id="query_form_content"> | |
15 | <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> |
|
15 | <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>"> | |
16 | <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend> |
|
16 | <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend> | |
17 | <div style="<%= @query.new_record? ? "" : "display: none;" %>"> |
|
17 | <div style="<%= @query.new_record? ? "" : "display: none;" %>"> | |
18 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> |
|
18 | <%= render :partial => 'queries/filters', :locals => {:query => @query} %> | |
19 | </div> |
|
19 | </div> | |
20 | </fieldset> |
|
20 | </fieldset> | |
21 | <fieldset id="options" class="collapsible collapsed"> |
|
21 | <fieldset id="options" class="collapsible collapsed"> | |
22 | <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend> |
|
22 | <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend> | |
23 | <div style="display: none;"> |
|
23 | <div style="display: none;"> | |
24 | <table> |
|
24 | <table> | |
25 | <tr> |
|
25 | <tr> | |
26 | <td class="field"><%= l(:field_column_names) %></td> |
|
26 | <td class="field"><%= l(:field_column_names) %></td> | |
27 | <td><%= render_query_columns_selection(@query) %></td> |
|
27 | <td><%= render_query_columns_selection(@query) %></td> | |
28 | </tr> |
|
28 | </tr> | |
29 | <tr> |
|
29 | <tr> | |
30 | <td class="field"><label for='group_by'><%= l(:field_group_by) %></label></td> |
|
30 | <td class="field"><label for='group_by'><%= l(:field_group_by) %></label></td> | |
31 | <td><%= select_tag('group_by', |
|
31 | <td><%= select_tag('group_by', | |
32 | options_for_select( |
|
32 | options_for_select( | |
33 | [[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, |
|
33 | [[]] + @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, | |
34 | @query.group_by) |
|
34 | @query.group_by) | |
35 | ) %></td> |
|
35 | ) %></td> | |
36 | </tr> |
|
36 | </tr> | |
37 | <tr> |
|
37 | <tr> | |
38 | <td class="field"><%= l(:button_show) %></td> |
|
38 | <td class="field"><%= l(:button_show) %></td> | |
39 | <td><%= available_block_columns_tags(@query) %></td> |
|
39 | <td><%= available_block_columns_tags(@query) %></td> | |
40 | </tr> |
|
40 | </tr> | |
41 | <tr> |
|
41 | <tr> | |
42 | <td><%= l(:label_total_plural) %></td> |
|
42 | <td><%= l(:label_total_plural) %></td> | |
43 | <td><%= available_totalable_columns_tags(@query) %></td> |
|
43 | <td><%= available_totalable_columns_tags(@query) %></td> | |
44 | </tr> |
|
44 | </tr> | |
45 | </table> |
|
45 | </table> | |
46 | </div> |
|
46 | </div> | |
47 | </fieldset> |
|
47 | </fieldset> | |
48 | </div> |
|
48 | </div> | |
49 | <p class="buttons"> |
|
49 | <p class="buttons"> | |
50 | <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %> |
|
50 | <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %> | |
51 | <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %> |
|
51 | <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %> | |
52 | <% if @query.new_record? %> |
|
52 | <% if @query.new_record? %> | |
53 | <% if User.current.allowed_to?(:save_queries, @project, :global => true) %> |
|
53 | <% if User.current.allowed_to?(:save_queries, @project, :global => true) %> | |
54 | <%= link_to_function l(:button_save), |
|
54 | <%= link_to_function l(:button_save), | |
55 | "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()", |
|
55 | "$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()", | |
56 | :class => 'icon icon-save' %> |
|
56 | :class => 'icon icon-save' %> | |
57 | <% end %> |
|
57 | <% end %> | |
58 | <% else %> |
|
58 | <% else %> | |
59 | <% if @query.editable_by?(User.current) %> |
|
59 | <% if @query.editable_by?(User.current) %> | |
60 | <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> |
|
60 | <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %> | |
61 | <%= delete_link query_path(@query) %> |
|
61 | <%= delete_link query_path(@query) %> | |
62 | <% end %> |
|
62 | <% end %> | |
63 | <% end %> |
|
63 | <% end %> | |
64 | </p> |
|
64 | </p> | |
65 | </div> |
|
65 | </div> | |
66 | <% end %> |
|
66 | <% end %> | |
67 |
|
67 | |||
68 | <%= error_messages_for 'query' %> |
|
68 | <%= error_messages_for 'query' %> | |
69 | <% if @query.valid? %> |
|
69 | <% if @query.valid? %> | |
70 | <% if @issues.empty? %> |
|
70 | <% if @issues.empty? %> | |
71 | <p class="nodata"><%= l(:label_no_data) %></p> |
|
71 | <p class="nodata"><%= l(:label_no_data) %></p> | |
72 | <% else %> |
|
72 | <% else %> | |
73 | <%= render_query_totals(@query) %> |
|
73 | <%= render_query_totals(@query) %> | |
74 | <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> |
|
74 | <%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %> | |
75 | <span class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></span> |
|
75 | <span class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></span> | |
76 | <% end %> |
|
76 | <% end %> | |
77 |
|
77 | |||
78 | <% other_formats_links do |f| %> |
|
78 | <% other_formats_links do |f| %> | |
79 | <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> |
|
79 | <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> | |
80 | <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '350px'); return false;" %> |
|
80 | <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '350px'); return false;" %> | |
81 | <%= f.link_to 'PDF', :url => params %> |
|
81 | <%= f.link_to 'PDF', :url => params %> | |
82 | <% end %> |
|
82 | <% end %> | |
83 |
|
83 | |||
84 | <div id="csv-export-options" style="display:none;"> |
|
84 | <div id="csv-export-options" style="display:none;"> | |
85 | <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3> |
|
85 | <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3> | |
86 | <%= form_tag(_project_issues_path(@project, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %> |
|
86 | <%= form_tag(_project_issues_path(@project, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %> | |
87 | <%= query_as_hidden_field_tags(@query) %> |
|
87 | <%= query_as_hidden_field_tags(@query) %> | |
88 | <%= hidden_field_tag 'sort', @sort_criteria.to_param, :id => nil %> |
|
88 | <%= hidden_field_tag 'sort', @sort_criteria.to_param, :id => nil %> | |
89 | <p> |
|
89 | <p> | |
90 | <label><%= radio_button_tag 'csv[columns]', '', true %> <%= l(:description_selected_columns) %></label><br /> |
|
90 | <label><%= radio_button_tag 'csv[columns]', '', true %> <%= l(:description_selected_columns) %></label><br /> | |
91 | <label><%= radio_button_tag 'csv[columns]', 'all' %> <%= l(:description_all_columns) %></label> |
|
91 | <label><%= radio_button_tag 'csv[columns]', 'all' %> <%= l(:description_all_columns) %></label> | |
92 | </p> |
|
92 | </p> | |
93 | <p> |
|
93 | <p> | |
94 | <label><%= check_box_tag 'csv[description]', '1', @query.has_column?(:description) %> <%= l(:field_description) %></label> |
|
94 | <label><%= check_box_tag 'csv[description]', '1', @query.has_column?(:description) %> <%= l(:field_description) %></label> | |
95 | </p> |
|
95 | </p> | |
96 | <% if @issue_count > Setting.issues_export_limit.to_i %> |
|
96 | <% if @issue_count > Setting.issues_export_limit.to_i %> | |
97 | <p class="icon icon-warning"> |
|
97 | <p class="icon icon-warning"> | |
98 | <%= l(:setting_issues_export_limit) %>: <%= Setting.issues_export_limit.to_i %> |
|
98 | <%= l(:setting_issues_export_limit) %>: <%= Setting.issues_export_limit.to_i %> | |
99 | </p> |
|
99 | </p> | |
100 | <% end %> |
|
100 | <% end %> | |
101 | <p class="buttons"> |
|
101 | <p class="buttons"> | |
102 | <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %> |
|
102 | <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %> | |
103 | <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %> |
|
103 | <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %> | |
104 | </p> |
|
104 | </p> | |
105 | <% end %> |
|
105 | <% end %> | |
106 | </div> |
|
106 | </div> | |
107 |
|
107 | |||
108 | <% end %> |
|
108 | <% end %> | |
109 | <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %> |
|
109 | <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %> | |
110 |
|
110 | |||
111 | <% content_for :sidebar do %> |
|
111 | <% content_for :sidebar do %> | |
112 | <%= render :partial => 'issues/sidebar' %> |
|
112 | <%= render :partial => 'issues/sidebar' %> | |
113 | <% end %> |
|
113 | <% end %> | |
114 |
|
114 | |||
115 | <% content_for :header_tags do %> |
|
115 | <% content_for :header_tags do %> | |
116 | <%= auto_discovery_link_tag(:atom, |
|
116 | <%= auto_discovery_link_tag(:atom, | |
117 | {:query_id => @query, :format => 'atom', |
|
117 | {:query_id => @query, :format => 'atom', | |
118 | :page => nil, :key => User.current.rss_key}, |
|
118 | :page => nil, :key => User.current.rss_key}, | |
119 | :title => l(:label_issue_plural)) %> |
|
119 | :title => l(:label_issue_plural)) %> | |
120 | <%= auto_discovery_link_tag(:atom, |
|
120 | <%= auto_discovery_link_tag(:atom, | |
121 | {:controller => 'journals', :action => 'index', |
|
121 | {:controller => 'journals', :action => 'index', | |
122 | :query_id => @query, :format => 'atom', |
|
122 | :query_id => @query, :format => 'atom', | |
123 | :page => nil, :key => User.current.rss_key}, |
|
123 | :page => nil, :key => User.current.rss_key}, | |
124 | :title => l(:label_changes_details)) %> |
|
124 | :title => l(:label_changes_details)) %> | |
125 | <% end %> |
|
125 | <% end %> | |
126 |
|
126 | |||
127 | <%= context_menu issues_context_menu_path %> |
|
127 | <%= context_menu issues_context_menu_path %> |
1 | NO CONTENT: modified file |
|
NO CONTENT: modified file | ||
The requested commit or file is too big and content was truncated. Show full diff |
General Comments 0
You need to be logged in to leave comments.
Login now