@@ -94,7 +94,7 class IssuesController < ApplicationController | |||||
94 | Issue.load_relations(@issues) if include_in_api_response?('relations') |
|
94 | Issue.load_relations(@issues) if include_in_api_response?('relations') | |
95 | } |
|
95 | } | |
96 | format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") } |
|
96 | format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") } | |
97 | format.csv { send_data(issues_to_csv(@issues, @project), :type => 'text/csv; header=present', :filename => 'export.csv') } |
|
97 | format.csv { send_data(issues_to_csv(@issues, @project, @query, params), :type => 'text/csv; header=present', :filename => 'export.csv') } | |
98 | format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'export.pdf') } |
|
98 | format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'export.pdf') } | |
99 | end |
|
99 | end | |
100 | else |
|
100 | else |
@@ -263,62 +263,39 module IssuesHelper | |||||
263 | end |
|
263 | end | |
264 | end |
|
264 | end | |
265 |
|
265 | |||
266 |
def issues_to_csv(issues, project = |
|
266 | def issues_to_csv(issues, project, query, options={}) | |
|
267 | ic = Iconv.new(l(:general_csv_encoding), 'UTF-8') | |||
267 | decimal_separator = l(:general_csv_decimal_separator) |
|
268 | decimal_separator = l(:general_csv_decimal_separator) | |
|
269 | encoding = l(:general_csv_encoding) | |||
|
270 | columns = (options[:columns] == 'all' ? query.available_columns : query.columns) | |||
|
271 | ||||
268 | export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv| |
|
272 | export = FCSV.generate(:col_sep => l(:general_csv_separator)) do |csv| | |
269 | # csv header fields |
|
273 | # csv header fields | |
270 | headers = [ "#", |
|
274 | csv << [ "#" ] + columns.collect {|c| Redmine::CodesetUtil.from_utf8(c.caption.to_s, encoding) } + | |
271 | l(:field_status), |
|
275 | (options[:description] ? [Redmine::CodesetUtil.from_utf8(l(:field_description), encoding)] : []) | |
272 | l(:field_project), |
|
276 | ||
273 | l(:field_tracker), |
|
|||
274 | l(:field_priority), |
|
|||
275 | l(:field_subject), |
|
|||
276 | l(:field_assigned_to), |
|
|||
277 | l(:field_category), |
|
|||
278 | l(:field_fixed_version), |
|
|||
279 | l(:field_author), |
|
|||
280 | l(:field_start_date), |
|
|||
281 | l(:field_due_date), |
|
|||
282 | l(:field_done_ratio), |
|
|||
283 | l(:field_estimated_hours), |
|
|||
284 | l(:field_parent_issue), |
|
|||
285 | l(:field_created_on), |
|
|||
286 | l(:field_updated_on) |
|
|||
287 | ] |
|
|||
288 | # Export project custom fields if project is given |
|
|||
289 | # otherwise export custom fields marked as "For all projects" |
|
|||
290 | custom_fields = project.nil? ? IssueCustomField.for_all : project.all_issue_custom_fields |
|
|||
291 | custom_fields.each {|f| headers << f.name} |
|
|||
292 | # Description in the last column |
|
|||
293 | headers << l(:field_description) |
|
|||
294 | csv << headers.collect {|c| Redmine::CodesetUtil.from_utf8( |
|
|||
295 | c.to_s, |
|
|||
296 | l(:general_csv_encoding) ) } |
|
|||
297 | # csv lines |
|
277 | # csv lines | |
298 | issues.each do |issue| |
|
278 | issues.each do |issue| | |
299 | fields = [issue.id, |
|
279 | col_values = columns.collect do |column| | |
300 | issue.status.name, |
|
280 | s = if column.is_a?(QueryCustomFieldColumn) | |
301 | issue.project.name, |
|
281 | cv = issue.custom_values.detect {|v| v.custom_field_id == column.custom_field.id} | |
302 | issue.tracker.name, |
|
282 | show_value(cv) | |
303 | issue.priority.name, |
|
283 | else | |
304 |
|
|
284 | value = issue.send(column.name) | |
305 | issue.assigned_to, |
|
285 | if value.is_a?(Date) | |
306 | issue.category, |
|
286 | format_date(value) | |
307 | issue.fixed_version, |
|
287 | elsif value.is_a?(Time) | |
308 | issue.author.name, |
|
288 | format_time(value) | |
309 | format_date(issue.start_date), |
|
289 | elsif value.is_a?(Float) | |
310 | format_date(issue.due_date), |
|
290 | value.to_s.gsub('.', decimal_separator) | |
311 | issue.done_ratio, |
|
291 | else | |
312 | issue.estimated_hours.to_s.gsub('.', decimal_separator), |
|
292 | value | |
313 |
|
|
293 | end | |
314 | format_time(issue.created_on), |
|
294 | end | |
315 | format_time(issue.updated_on) |
|
295 | s.to_s | |
316 | ] |
|
296 | end | |
317 | custom_fields.each {|f| fields << show_value(issue.custom_value_for(f)) } |
|
297 | csv << [ issue.id.to_s ] + col_values.collect {|c| Redmine::CodesetUtil.from_utf8(c.to_s, encoding) } + | |
318 | fields << issue.description |
|
298 | (options[:description] ? [Redmine::CodesetUtil.from_utf8(issue.description, encoding)] : []) | |
319 | csv << fields.collect {|c| Redmine::CodesetUtil.from_utf8( |
|
|||
320 | c.to_s, |
|
|||
321 | l(:general_csv_encoding) ) } |
|
|||
322 | end |
|
299 | end | |
323 | end |
|
300 | end | |
324 | export |
|
301 | export |
@@ -54,10 +54,27 | |||||
54 |
|
54 | |||
55 | <% other_formats_links do |f| %> |
|
55 | <% other_formats_links do |f| %> | |
56 | <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> |
|
56 | <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> | |
57 | <%= f.link_to 'CSV', :url => params %> |
|
57 | <%= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %> | |
58 | <%= f.link_to 'PDF', :url => params %> |
|
58 | <%= f.link_to 'PDF', :url => params %> | |
59 | <% end %> |
|
59 | <% end %> | |
60 |
|
60 | |||
|
61 | <div id="csv-export-options" style="display:none;"> | |||
|
62 | <h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3> | |||
|
63 | <% form_tag(params.merge({:format => 'csv',:page=>nil}), :method => :get, :id => 'csv-export-form') do %> | |||
|
64 | <p> | |||
|
65 | <label><%= radio_button_tag 'columns', '', true %> <%= l(:description_selected_columns) %></label><br /> | |||
|
66 | <label><%= radio_button_tag 'columns', 'all' %> <%= l(:description_all_columns) %></label> | |||
|
67 | </p> | |||
|
68 | <p> | |||
|
69 | <label><%= check_box_tag 'description', '1' %> <%= l(:field_description) %></label> | |||
|
70 | </p> | |||
|
71 | <p style="text-align:right; margin-bottom:0"> | |||
|
72 | <%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %> | |||
|
73 | <%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %> | |||
|
74 | </p> | |||
|
75 | <% end %> | |||
|
76 | </div> | |||
|
77 | ||||
61 | <% end %> |
|
78 | <% end %> | |
62 | <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %> |
|
79 | <%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %> | |
63 |
|
80 |
@@ -1000,3 +1000,6 bg: | |||||
1000 | description_date_from: Въведете начална дата |
|
1000 | description_date_from: Въведете начална дата | |
1001 | description_date_to: Въведете крайна дата |
|
1001 | description_date_to: Въведете крайна дата | |
1002 | setting_repositories_encodings: Attachments and repositories encodings |
|
1002 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1003 | description_all_columns: All Columns | |||
|
1004 | button_export: Export | |||
|
1005 | label_export_options: "%{export_format} export options" |
@@ -1016,3 +1016,6 bs: | |||||
1016 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1016 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1017 | button_edit_section: Edit this section |
|
1017 | button_edit_section: Edit this section | |
1018 | setting_repositories_encodings: Attachments and repositories encodings |
|
1018 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1019 | description_all_columns: All Columns | |||
|
1020 | button_export: Export | |||
|
1021 | label_export_options: "%{export_format} export options" |
@@ -1005,3 +1005,6 ca: | |||||
1005 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1005 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1006 | button_edit_section: Edit this section |
|
1006 | button_edit_section: Edit this section | |
1007 | setting_repositories_encodings: Attachments and repositories encodings |
|
1007 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1008 | description_all_columns: All Columns | |||
|
1009 | button_export: Export | |||
|
1010 | label_export_options: "%{export_format} export options" |
@@ -1006,3 +1006,6 cs: | |||||
1006 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1006 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1007 | button_edit_section: Edit this section |
|
1007 | button_edit_section: Edit this section | |
1008 | setting_repositories_encodings: Attachments and repositories encodings |
|
1008 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1009 | description_all_columns: All Columns | |||
|
1010 | button_export: Export | |||
|
1011 | label_export_options: "%{export_format} export options" |
@@ -1019,3 +1019,6 da: | |||||
1019 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1019 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1020 | button_edit_section: Edit this section |
|
1020 | button_edit_section: Edit this section | |
1021 | setting_repositories_encodings: Attachments and repositories encodings |
|
1021 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1022 | description_all_columns: All Columns | |||
|
1023 | button_export: Export | |||
|
1024 | label_export_options: "%{export_format} export options" |
@@ -1023,3 +1023,6 de: | |||||
1023 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1023 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1024 | button_edit_section: Edit this section |
|
1024 | button_edit_section: Edit this section | |
1025 | setting_repositories_encodings: Attachments and repositories encodings |
|
1025 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1026 | description_all_columns: All Columns | |||
|
1027 | button_export: Export | |||
|
1028 | label_export_options: "%{export_format} export options" |
@@ -1002,3 +1002,6 el: | |||||
1002 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1002 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1003 | button_edit_section: Edit this section |
|
1003 | button_edit_section: Edit this section | |
1004 | setting_repositories_encodings: Attachments and repositories encodings |
|
1004 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1005 | description_all_columns: All Columns | |||
|
1006 | button_export: Export | |||
|
1007 | label_export_options: "%{export_format} export options" |
@@ -1005,3 +1005,6 en-GB: | |||||
1005 | label_child_revision: Child |
|
1005 | label_child_revision: Child | |
1006 | button_edit_section: Edit this section |
|
1006 | button_edit_section: Edit this section | |
1007 | setting_repositories_encodings: Attachments and repositories encodings |
|
1007 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1008 | description_all_columns: All Columns | |||
|
1009 | button_export: Export | |||
|
1010 | label_export_options: "%{export_format} export options" |
@@ -827,6 +827,7 en: | |||||
827 | label_git_report_last_commit: Report last commit for files and directories |
|
827 | label_git_report_last_commit: Report last commit for files and directories | |
828 | label_parent_revision: Parent |
|
828 | label_parent_revision: Parent | |
829 | label_child_revision: Child |
|
829 | label_child_revision: Child | |
|
830 | label_export_options: %{export_format} export options | |||
830 |
|
831 | |||
831 | button_login: Login |
|
832 | button_login: Login | |
832 | button_submit: Submit |
|
833 | button_submit: Submit | |
@@ -875,6 +876,7 en: | |||||
875 | button_duplicate: Duplicate |
|
876 | button_duplicate: Duplicate | |
876 | button_show: Show |
|
877 | button_show: Show | |
877 | button_edit_section: Edit this section |
|
878 | button_edit_section: Edit this section | |
|
879 | button_export: Export | |||
878 |
|
880 | |||
879 | status_active: active |
|
881 | status_active: active | |
880 | status_registered: registered |
|
882 | status_registered: registered | |
@@ -994,6 +996,7 en: | |||||
994 | description_user_mail_notification: Mail notification settings |
|
996 | description_user_mail_notification: Mail notification settings | |
995 | description_available_columns: Available Columns |
|
997 | description_available_columns: Available Columns | |
996 | description_selected_columns: Selected Columns |
|
998 | description_selected_columns: Selected Columns | |
|
999 | description_all_columns: All Columns | |||
997 | description_issue_category_reassign: Choose issue category |
|
1000 | description_issue_category_reassign: Choose issue category | |
998 | description_wiki_subpages_reassign: Choose new parent page |
|
1001 | description_wiki_subpages_reassign: Choose new parent page | |
999 | description_date_range_list: Choose range from list |
|
1002 | description_date_range_list: Choose range from list |
@@ -1039,3 +1039,6 es: | |||||
1039 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1039 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1040 | button_edit_section: Edit this section |
|
1040 | button_edit_section: Edit this section | |
1041 | setting_repositories_encodings: Attachments and repositories encodings |
|
1041 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1042 | description_all_columns: All Columns | |||
|
1043 | button_export: Export | |||
|
1044 | label_export_options: "%{export_format} export options" |
@@ -1006,3 +1006,6 eu: | |||||
1006 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1006 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1007 | button_edit_section: Edit this section |
|
1007 | button_edit_section: Edit this section | |
1008 | setting_repositories_encodings: Attachments and repositories encodings |
|
1008 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1009 | description_all_columns: All Columns | |||
|
1010 | button_export: Export | |||
|
1011 | label_export_options: "%{export_format} export options" |
@@ -1005,3 +1005,6 fa: | |||||
1005 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1005 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1006 | button_edit_section: Edit this section |
|
1006 | button_edit_section: Edit this section | |
1007 | setting_repositories_encodings: Attachments and repositories encodings |
|
1007 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1008 | description_all_columns: All Columns | |||
|
1009 | button_export: Export | |||
|
1010 | label_export_options: "%{export_format} export options" |
@@ -1023,3 +1023,6 fi: | |||||
1023 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1023 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1024 | button_edit_section: Edit this section |
|
1024 | button_edit_section: Edit this section | |
1025 | setting_repositories_encodings: Attachments and repositories encodings |
|
1025 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1026 | description_all_columns: All Columns | |||
|
1027 | button_export: Export | |||
|
1028 | label_export_options: "%{export_format} export options" |
@@ -803,6 +803,7 fr: | |||||
803 | label_issues_visibility_all: Toutes les demandes |
|
803 | label_issues_visibility_all: Toutes les demandes | |
804 | label_issues_visibility_public: Toutes les demandes non privées |
|
804 | label_issues_visibility_public: Toutes les demandes non privées | |
805 | label_issues_visibility_own: Demandes créées par ou assignées à l'utilisateur |
|
805 | label_issues_visibility_own: Demandes créées par ou assignées à l'utilisateur | |
|
806 | label_export_options: Options d'exportation %{export_format} | |||
806 |
|
807 | |||
807 | button_login: Connexion |
|
808 | button_login: Connexion | |
808 | button_submit: Soumettre |
|
809 | button_submit: Soumettre | |
@@ -850,6 +851,7 fr: | |||||
850 | button_duplicate: Dupliquer |
|
851 | button_duplicate: Dupliquer | |
851 | button_show: Afficher |
|
852 | button_show: Afficher | |
852 | button_edit_section: Modifier cette section |
|
853 | button_edit_section: Modifier cette section | |
|
854 | button_export: Exporter | |||
853 |
|
855 | |||
854 | status_active: actif |
|
856 | status_active: actif | |
855 | status_registered: enregistré |
|
857 | status_registered: enregistré | |
@@ -1002,7 +1004,8 fr: | |||||
1002 | description_user_mail_notification: Mail notification settings |
|
1004 | description_user_mail_notification: Mail notification settings | |
1003 | description_date_from: Enter start date |
|
1005 | description_date_from: Enter start date | |
1004 | description_message_content: Message content |
|
1006 | description_message_content: Message content | |
1005 |
description_available_columns: |
|
1007 | description_available_columns: Colonnes disponibles | |
|
1008 | description_all_columns: Toutes les colonnes | |||
1006 | description_date_range_interval: Choose range by selecting start and end date |
|
1009 | description_date_range_interval: Choose range by selecting start and end date | |
1007 | description_issue_category_reassign: Choose issue category |
|
1010 | description_issue_category_reassign: Choose issue category | |
1008 | description_search: Searchfield |
|
1011 | description_search: Searchfield | |
@@ -1012,7 +1015,7 fr: | |||||
1012 | description_date_to: Enter end date |
|
1015 | description_date_to: Enter end date | |
1013 | description_query_sort_criteria_attribute: Sort attribute |
|
1016 | description_query_sort_criteria_attribute: Sort attribute | |
1014 | description_wiki_subpages_reassign: Choose new parent page |
|
1017 | description_wiki_subpages_reassign: Choose new parent page | |
1015 |
description_selected_columns: |
|
1018 | description_selected_columns: Colonnes sélectionnées | |
1016 | label_parent_revision: Parent |
|
1019 | label_parent_revision: Parent | |
1017 | label_child_revision: Child |
|
1020 | label_child_revision: Child | |
1018 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1021 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
@@ -1014,3 +1014,6 gl: | |||||
1014 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1014 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1015 | button_edit_section: Edit this section |
|
1015 | button_edit_section: Edit this section | |
1016 | setting_repositories_encodings: Attachments and repositories encodings |
|
1016 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1017 | description_all_columns: All Columns | |||
|
1018 | button_export: Export | |||
|
1019 | label_export_options: "%{export_format} export options" |
@@ -1007,3 +1007,6 he: | |||||
1007 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1007 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1008 | button_edit_section: Edit this section |
|
1008 | button_edit_section: Edit this section | |
1009 | setting_repositories_encodings: Attachments and repositories encodings |
|
1009 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1010 | description_all_columns: All Columns | |||
|
1011 | button_export: Export | |||
|
1012 | label_export_options: "%{export_format} export options" |
@@ -1009,3 +1009,6 hr: | |||||
1009 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1009 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1010 | button_edit_section: Edit this section |
|
1010 | button_edit_section: Edit this section | |
1011 | setting_repositories_encodings: Attachments and repositories encodings |
|
1011 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1012 | description_all_columns: All Columns | |||
|
1013 | button_export: Export | |||
|
1014 | label_export_options: "%{export_format} export options" |
@@ -1021,3 +1021,6 | |||||
1021 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1021 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1022 | button_edit_section: Edit this section |
|
1022 | button_edit_section: Edit this section | |
1023 | setting_repositories_encodings: Attachments and repositories encodings |
|
1023 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1024 | description_all_columns: All Columns | |||
|
1025 | button_export: Export | |||
|
1026 | label_export_options: "%{export_format} export options" |
@@ -1010,3 +1010,6 id: | |||||
1010 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1010 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1011 | button_edit_section: Edit this section |
|
1011 | button_edit_section: Edit this section | |
1012 | setting_repositories_encodings: Attachments and repositories encodings |
|
1012 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1013 | description_all_columns: All Columns | |||
|
1014 | button_export: Export | |||
|
1015 | label_export_options: "%{export_format} export options" |
@@ -1003,3 +1003,6 it: | |||||
1003 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1003 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1004 | button_edit_section: Edit this section |
|
1004 | button_edit_section: Edit this section | |
1005 | setting_repositories_encodings: Attachments and repositories encodings |
|
1005 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1006 | description_all_columns: All Columns | |||
|
1007 | button_export: Export | |||
|
1008 | label_export_options: "%{export_format} export options" |
@@ -1032,3 +1032,6 ja: | |||||
1032 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. |
|
1032 | error_scm_annotate_big_text_file: The entry cannot be annotated, as it exceeds the maximum text file size. | |
1033 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1033 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1034 | button_edit_section: Edit this section |
|
1034 | button_edit_section: Edit this section | |
|
1035 | description_all_columns: All Columns | |||
|
1036 | button_export: Export | |||
|
1037 | label_export_options: "%{export_format} export options" |
@@ -1054,3 +1054,6 ko: | |||||
1054 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1054 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1055 | button_edit_section: Edit this section |
|
1055 | button_edit_section: Edit this section | |
1056 | setting_repositories_encodings: Attachments and repositories encodings |
|
1056 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1057 | description_all_columns: All Columns | |||
|
1058 | button_export: Export | |||
|
1059 | label_export_options: "%{export_format} export options" |
@@ -1062,3 +1062,6 lt: | |||||
1062 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1062 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1063 | button_edit_section: Edit this section |
|
1063 | button_edit_section: Edit this section | |
1064 | setting_repositories_encodings: Attachments and repositories encodings |
|
1064 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1065 | description_all_columns: All Columns | |||
|
1066 | button_export: Export | |||
|
1067 | label_export_options: "%{export_format} export options" |
@@ -997,3 +997,6 lv: | |||||
997 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
997 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
998 | button_edit_section: Edit this section |
|
998 | button_edit_section: Edit this section | |
999 | setting_repositories_encodings: Attachments and repositories encodings |
|
999 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1000 | description_all_columns: All Columns | |||
|
1001 | button_export: Export | |||
|
1002 | label_export_options: "%{export_format} export options" |
@@ -1002,3 +1002,6 mk: | |||||
1002 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1002 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1003 | button_edit_section: Edit this section |
|
1003 | button_edit_section: Edit this section | |
1004 | setting_repositories_encodings: Attachments and repositories encodings |
|
1004 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1005 | description_all_columns: All Columns | |||
|
1006 | button_export: Export | |||
|
1007 | label_export_options: "%{export_format} export options" |
@@ -1003,3 +1003,6 mn: | |||||
1003 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1003 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1004 | button_edit_section: Edit this section |
|
1004 | button_edit_section: Edit this section | |
1005 | setting_repositories_encodings: Attachments and repositories encodings |
|
1005 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1006 | description_all_columns: All Columns | |||
|
1007 | button_export: Export | |||
|
1008 | label_export_options: "%{export_format} export options" |
@@ -984,3 +984,6 nl: | |||||
984 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
984 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
985 | button_edit_section: Edit this section |
|
985 | button_edit_section: Edit this section | |
986 | setting_repositories_encodings: Attachments and repositories encodings |
|
986 | setting_repositories_encodings: Attachments and repositories encodings | |
|
987 | description_all_columns: All Columns | |||
|
988 | button_export: Export | |||
|
989 | label_export_options: "%{export_format} export options" |
@@ -992,3 +992,6 | |||||
992 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
992 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
993 | button_edit_section: Edit this section |
|
993 | button_edit_section: Edit this section | |
994 | setting_repositories_encodings: Attachments and repositories encodings |
|
994 | setting_repositories_encodings: Attachments and repositories encodings | |
|
995 | description_all_columns: All Columns | |||
|
996 | button_export: Export | |||
|
997 | label_export_options: "%{export_format} export options" |
@@ -1019,3 +1019,6 pl: | |||||
1019 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1019 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1020 | button_edit_section: Edit this section |
|
1020 | button_edit_section: Edit this section | |
1021 | setting_repositories_encodings: Attachments and repositories encodings |
|
1021 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1022 | description_all_columns: All Columns | |||
|
1023 | button_export: Export | |||
|
1024 | label_export_options: "%{export_format} export options" |
@@ -1023,3 +1023,6 pt-BR: | |||||
1023 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1023 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1024 | button_edit_section: Edit this section |
|
1024 | button_edit_section: Edit this section | |
1025 | setting_repositories_encodings: Attachments and repositories encodings |
|
1025 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1026 | description_all_columns: All Columns | |||
|
1027 | button_export: Export | |||
|
1028 | label_export_options: "%{export_format} export options" |
@@ -1007,3 +1007,6 pt: | |||||
1007 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1007 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1008 | button_edit_section: Edit this section |
|
1008 | button_edit_section: Edit this section | |
1009 | setting_repositories_encodings: Attachments and repositories encodings |
|
1009 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1010 | description_all_columns: All Columns | |||
|
1011 | button_export: Export | |||
|
1012 | label_export_options: "%{export_format} export options" |
@@ -995,3 +995,6 ro: | |||||
995 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
995 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
996 | button_edit_section: Edit this section |
|
996 | button_edit_section: Edit this section | |
997 | setting_repositories_encodings: Attachments and repositories encodings |
|
997 | setting_repositories_encodings: Attachments and repositories encodings | |
|
998 | description_all_columns: All Columns | |||
|
999 | button_export: Export | |||
|
1000 | label_export_options: "%{export_format} export options" |
@@ -1115,3 +1115,6 ru: | |||||
1115 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1115 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1116 | button_edit_section: Edit this section |
|
1116 | button_edit_section: Edit this section | |
1117 | setting_repositories_encodings: Attachments and repositories encodings |
|
1117 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1118 | description_all_columns: All Columns | |||
|
1119 | button_export: Export | |||
|
1120 | label_export_options: "%{export_format} export options" |
@@ -997,3 +997,6 sk: | |||||
997 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
997 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
998 | button_edit_section: Edit this section |
|
998 | button_edit_section: Edit this section | |
999 | setting_repositories_encodings: Attachments and repositories encodings |
|
999 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1000 | description_all_columns: All Columns | |||
|
1001 | button_export: Export | |||
|
1002 | label_export_options: "%{export_format} export options" |
@@ -1002,3 +1002,6 sl: | |||||
1002 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1002 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1003 | button_edit_section: Edit this section |
|
1003 | button_edit_section: Edit this section | |
1004 | setting_repositories_encodings: Attachments and repositories encodings |
|
1004 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1005 | description_all_columns: All Columns | |||
|
1006 | button_export: Export | |||
|
1007 | label_export_options: "%{export_format} export options" |
@@ -1002,3 +1002,6 sr-YU: | |||||
1002 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1002 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1003 | button_edit_section: Edit this section |
|
1003 | button_edit_section: Edit this section | |
1004 | setting_repositories_encodings: Attachments and repositories encodings |
|
1004 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1005 | description_all_columns: All Columns | |||
|
1006 | button_export: Export | |||
|
1007 | label_export_options: "%{export_format} export options" |
@@ -1003,3 +1003,6 sr: | |||||
1003 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1003 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1004 | button_edit_section: Edit this section |
|
1004 | button_edit_section: Edit this section | |
1005 | setting_repositories_encodings: Attachments and repositories encodings |
|
1005 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1006 | description_all_columns: All Columns | |||
|
1007 | button_export: Export | |||
|
1008 | label_export_options: "%{export_format} export options" |
@@ -1043,3 +1043,6 sv: | |||||
1043 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1043 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1044 | button_edit_section: Edit this section |
|
1044 | button_edit_section: Edit this section | |
1045 | setting_repositories_encodings: Attachments and repositories encodings |
|
1045 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1046 | description_all_columns: All Columns | |||
|
1047 | button_export: Export | |||
|
1048 | label_export_options: "%{export_format} export options" |
@@ -999,3 +999,6 th: | |||||
999 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
999 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1000 | button_edit_section: Edit this section |
|
1000 | button_edit_section: Edit this section | |
1001 | setting_repositories_encodings: Attachments and repositories encodings |
|
1001 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1002 | description_all_columns: All Columns | |||
|
1003 | button_export: Export | |||
|
1004 | label_export_options: "%{export_format} export options" |
@@ -1021,3 +1021,6 tr: | |||||
1021 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1021 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1022 | button_edit_section: Edit this section |
|
1022 | button_edit_section: Edit this section | |
1023 | setting_repositories_encodings: Attachments and repositories encodings |
|
1023 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1024 | description_all_columns: All Columns | |||
|
1025 | button_export: Export | |||
|
1026 | label_export_options: "%{export_format} export options" |
@@ -998,3 +998,6 uk: | |||||
998 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
998 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
999 | button_edit_section: Edit this section |
|
999 | button_edit_section: Edit this section | |
1000 | setting_repositories_encodings: Attachments and repositories encodings |
|
1000 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1001 | description_all_columns: All Columns | |||
|
1002 | button_export: Export | |||
|
1003 | label_export_options: "%{export_format} export options" |
@@ -1053,3 +1053,6 vi: | |||||
1053 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues |
|
1053 | setting_default_issue_start_date_to_creation_date: Use current date as start date for new issues | |
1054 | button_edit_section: Edit this section |
|
1054 | button_edit_section: Edit this section | |
1055 | setting_repositories_encodings: Attachments and repositories encodings |
|
1055 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1056 | description_all_columns: All Columns | |||
|
1057 | button_export: Export | |||
|
1058 | label_export_options: "%{export_format} export options" |
@@ -1082,3 +1082,6 | |||||
1082 | description_date_to: 輸入結束日期 |
|
1082 | description_date_to: 輸入結束日期 | |
1083 | button_edit_section: Edit this section |
|
1083 | button_edit_section: Edit this section | |
1084 | setting_repositories_encodings: Attachments and repositories encodings |
|
1084 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1085 | description_all_columns: All Columns | |||
|
1086 | button_export: Export | |||
|
1087 | label_export_options: "%{export_format} export options" |
@@ -1004,3 +1004,6 zh: | |||||
1004 | setting_default_issue_start_date_to_creation_date: 使用当前日期作为新问题的开始日期 |
|
1004 | setting_default_issue_start_date_to_creation_date: 使用当前日期作为新问题的开始日期 | |
1005 | button_edit_section: Edit this section |
|
1005 | button_edit_section: Edit this section | |
1006 | setting_repositories_encodings: Attachments and repositories encodings |
|
1006 | setting_repositories_encodings: Attachments and repositories encodings | |
|
1007 | description_all_columns: All Columns | |||
|
1008 | button_export: Export | |||
|
1009 | label_export_options: "%{export_format} export options" |
@@ -186,6 +186,39 function promptToRemote(text, param, url) { | |||||
186 | } |
|
186 | } | |
187 | } |
|
187 | } | |
188 |
|
188 | |||
|
189 | function showModal(id, width) { | |||
|
190 | el = $(id); | |||
|
191 | if (el == undefined || el.visible()) {return;} | |||
|
192 | var h = $$('body')[0].getHeight(); | |||
|
193 | var d = document.createElement("div"); | |||
|
194 | d.id = 'modalbg'; | |||
|
195 | $('main').appendChild(d); | |||
|
196 | $('modalbg').setStyle({ width: '100%', height: h + 'px' }); | |||
|
197 | $('modalbg').show(); | |||
|
198 | ||||
|
199 | var pageWidth = document.viewport.getWidth(); | |||
|
200 | el.setStyle({'width': width}); | |||
|
201 | el.setStyle({'left': (((pageWidth - el.getWidth())/2 *100) / pageWidth) + '%'}); | |||
|
202 | el.addClassName('modal'); | |||
|
203 | el.show(); | |||
|
204 | ||||
|
205 | var submit = el.down("input[type=submit]"); | |||
|
206 | if (submit) { | |||
|
207 | submit.focus(); | |||
|
208 | } | |||
|
209 | } | |||
|
210 | ||||
|
211 | function hideModal(el) { | |||
|
212 | var modal = Element.up(el, 'div.modal'); | |||
|
213 | if (modal) { | |||
|
214 | modal.hide(); | |||
|
215 | } | |||
|
216 | var bg = $('modalbg'); | |||
|
217 | if (bg) { | |||
|
218 | bg.remove(); | |||
|
219 | } | |||
|
220 | } | |||
|
221 | ||||
189 | function collapseScmEntry(id) { |
|
222 | function collapseScmEntry(id) { | |
190 | var els = document.getElementsByClassName(id, 'browser'); |
|
223 | var els = document.getElementsByClassName(id, 'browser'); | |
191 | for (var i = 0; i < els.length; i++) { |
|
224 | for (var i = 0; i < els.length; i++) { |
@@ -91,6 +91,12 html>body #content { min-height: 600px; } | |||||
91 | #login-form label {font-weight: bold;} |
|
91 | #login-form label {font-weight: bold;} | |
92 | #login-form input#username, #login-form input#password { width: 300px; } |
|
92 | #login-form input#username, #login-form input#password { width: 300px; } | |
93 |
|
93 | |||
|
94 | #modalbg {position:absolute; top:0; left:0; width:100%; height:100%; background:#ccc; z-index:49; opacity:0.5;} | |||
|
95 | html>body #modalbg {position:fixed;} | |||
|
96 | div.modal { border-radius:5px; position:absolute; top:25%; background:#fff; border:2px solid #759FCF; z-index:50; padding:0px; padding:8px;} | |||
|
97 | div.modal h3.title {background:#759FCF; color:#fff; border:0; padding-left:8px; margin:-8px; margin-bottom: 1em; border-top-left-radius:2px;border-top-right-radius:2px;} | |||
|
98 | html>body div.modal {position:fixed;} | |||
|
99 | ||||
94 | input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; } |
|
100 | input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; } | |
95 |
|
101 | |||
96 | .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; } |
|
102 | .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; } |
@@ -281,21 +281,43 class IssuesControllerTest < ActionController::TestCase | |||||
281 | get :index, :sort => 'tracker' |
|
281 | get :index, :sort => 'tracker' | |
282 | end |
|
282 | end | |
283 |
|
283 | |||
284 |
def test_index_csv |
|
284 | def test_index_csv | |
285 | Setting.default_language = 'en' |
|
|||
286 |
|
||||
287 | get :index, :format => 'csv' |
|
285 | get :index, :format => 'csv' | |
288 | assert_response :success |
|
286 | assert_response :success | |
289 | assert_not_nil assigns(:issues) |
|
287 | assert_not_nil assigns(:issues) | |
290 | assert_equal 'text/csv', @response.content_type |
|
288 | assert_equal 'text/csv', @response.content_type | |
291 | assert @response.body.starts_with?("#,") |
|
289 | assert @response.body.starts_with?("#,") | |
|
290 | lines = @response.body.chomp.split("\n") | |||
|
291 | assert_equal assigns(:query).columns.size + 1, lines[0].split(',').size | |||
|
292 | end | |||
292 |
|
293 | |||
|
294 | def test_index_csv_with_project | |||
293 | get :index, :project_id => 1, :format => 'csv' |
|
295 | get :index, :project_id => 1, :format => 'csv' | |
294 | assert_response :success |
|
296 | assert_response :success | |
295 | assert_not_nil assigns(:issues) |
|
297 | assert_not_nil assigns(:issues) | |
296 | assert_equal 'text/csv', @response.content_type |
|
298 | assert_equal 'text/csv', @response.content_type | |
297 | end |
|
299 | end | |
298 |
|
300 | |||
|
301 | def test_index_csv_with_description | |||
|
302 | get :index, :format => 'csv', :description => '1' | |||
|
303 | assert_response :success | |||
|
304 | assert_not_nil assigns(:issues) | |||
|
305 | assert_equal 'text/csv', @response.content_type | |||
|
306 | assert @response.body.starts_with?("#,") | |||
|
307 | lines = @response.body.chomp.split("\n") | |||
|
308 | assert_equal assigns(:query).columns.size + 2, lines[0].split(',').size | |||
|
309 | end | |||
|
310 | ||||
|
311 | def test_index_csv_with_all_columns | |||
|
312 | get :index, :format => 'csv', :columns => 'all' | |||
|
313 | assert_response :success | |||
|
314 | assert_not_nil assigns(:issues) | |||
|
315 | assert_equal 'text/csv', @response.content_type | |||
|
316 | assert @response.body.starts_with?("#,") | |||
|
317 | lines = @response.body.chomp.split("\n") | |||
|
318 | assert_equal assigns(:query).available_columns.size + 1, lines[0].split(',').size | |||
|
319 | end | |||
|
320 | ||||
299 | def test_index_csv_big_5 |
|
321 | def test_index_csv_big_5 | |
300 | with_settings :default_language => "zh-TW" do |
|
322 | with_settings :default_language => "zh-TW" do | |
301 | str_utf8 = "\xe4\xb8\x80\xe6\x9c\x88" |
|
323 | str_utf8 = "\xe4\xb8\x80\xe6\x9c\x88" | |
@@ -314,7 +336,7 class IssuesControllerTest < ActionController::TestCase | |||||
314 | :op => '=', :values => [str_utf8], |
|
336 | :op => '=', :values => [str_utf8], | |
315 | :format => 'csv' |
|
337 | :format => 'csv' | |
316 | assert_equal 'text/csv', @response.content_type |
|
338 | assert_equal 'text/csv', @response.content_type | |
317 |
lines = @response.body.chomp.split("\n") |
|
339 | lines = @response.body.chomp.split("\n") | |
318 | s1 = "\xaa\xac\xbaA" |
|
340 | s1 = "\xaa\xac\xbaA" | |
319 | if str_utf8.respond_to?(:force_encoding) |
|
341 | if str_utf8.respond_to?(:force_encoding) | |
320 | s1.force_encoding('Big5') |
|
342 | s1.force_encoding('Big5') | |
@@ -338,17 +360,19 class IssuesControllerTest < ActionController::TestCase | |||||
338 | get :index, :project_id => 1, |
|
360 | get :index, :project_id => 1, | |
339 | :f => ['subject'], |
|
361 | :f => ['subject'], | |
340 | :op => '=', :values => [str_utf8], |
|
362 | :op => '=', :values => [str_utf8], | |
341 |
: |
|
363 | :c => ['status', 'subject'], | |
|
364 | :format => 'csv', | |||
|
365 | :set_filter => 1 | |||
342 | assert_equal 'text/csv', @response.content_type |
|
366 | assert_equal 'text/csv', @response.content_type | |
343 |
lines = @response.body.chomp.split("\n") |
|
367 | lines = @response.body.chomp.split("\n") | |
344 | s1 = "\xaa\xac\xbaA" |
|
368 | s1 = "\xaa\xac\xbaA" # status | |
345 | if str_utf8.respond_to?(:force_encoding) |
|
369 | if str_utf8.respond_to?(:force_encoding) | |
346 | s1.force_encoding('Big5') |
|
370 | s1.force_encoding('Big5') | |
347 | end |
|
371 | end | |
348 | assert lines[0].include?(s1) |
|
372 | assert lines[0].include?(s1) | |
349 |
s2 = lines[1].split(",")[ |
|
373 | s2 = lines[1].split(",")[2] | |
350 | if s1.respond_to?(:force_encoding) |
|
374 | if s1.respond_to?(:force_encoding) | |
351 | s3 = "\xa5H?" |
|
375 | s3 = "\xa5H?" # subject | |
352 | s3.force_encoding('Big5') |
|
376 | s3.force_encoding('Big5') | |
353 | assert_equal s3, s2 |
|
377 | assert_equal s3, s2 | |
354 | elsif RUBY_PLATFORM == 'java' |
|
378 | elsif RUBY_PLATFORM == 'java' |
General Comments 0
You need to be logged in to leave comments.
Login now