redmine_extensions 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/redmine_extensions/redmine_extensions.js.orig +648 -0
  3. data/app/views/easy_entity_assignments/_query_index.html.erb.orig +16 -0
  4. data/config/locales/cs.yml +4 -1
  5. data/config/locales/en.yml +1 -0
  6. data/lib/generators/redmine_extensions/entity/templates/context_menu.html.erb.erb +14 -1
  7. data/lib/generators/redmine_extensions/entity/templates/controller.rb.erb +40 -6
  8. data/lib/generators/redmine_extensions/entity/templates/edit.js.erb.erb +5 -5
  9. data/lib/generators/redmine_extensions/entity/templates/index.js.erb.erb +3 -3
  10. data/lib/generators/redmine_extensions/entity/templates/new.js.erb.erb +5 -5
  11. data/lib/generators/redmine_extensions/entity/templates/show.js.erb.erb +3 -3
  12. data/lib/redmine_extensions/easy_query_helpers/outputs.rb +18 -2
  13. data/lib/redmine_extensions/query_output.rb +30 -11
  14. data/lib/redmine_extensions/redmine_patches/controllers/issues_controller_patch.rb +9 -0
  15. data/lib/redmine_extensions/version.rb +1 -1
  16. data/lib/redmine_extensions/version.rb.orig +7 -0
  17. data/spec/redmine/app/controllers/custom_field_enumerations_controller.rb +75 -0
  18. data/spec/redmine/app/controllers/imports_controller.rb +121 -0
  19. data/spec/redmine/app/helpers/imports_helper.rb +47 -0
  20. data/spec/redmine/app/models/custom_field_enumeration.rb +90 -0
  21. data/spec/redmine/app/models/import.rb +249 -0
  22. data/spec/redmine/app/models/import_item.rb +22 -0
  23. data/spec/redmine/app/models/issue_import.rb +186 -0
  24. data/spec/redmine/app/views/attachments/image.html.erb +3 -0
  25. data/spec/redmine/app/views/attachments/other.html.erb +3 -0
  26. data/spec/redmine/app/views/common/_image.html.erb +1 -0
  27. data/spec/redmine/app/views/common/_other.html.erb +1 -0
  28. data/spec/redmine/app/views/custom_field_enumerations/create.js.erb +2 -0
  29. data/spec/redmine/app/views/custom_field_enumerations/destroy.html.erb +14 -0
  30. data/spec/redmine/app/views/custom_field_enumerations/index.html.erb +47 -0
  31. data/spec/redmine/app/views/custom_fields/formats/_enumeration.erb +12 -0
  32. data/spec/redmine/app/views/imports/_fields_mapping.html.erb +90 -0
  33. data/spec/redmine/app/views/imports/mapping.html.erb +52 -0
  34. data/spec/redmine/app/views/imports/mapping.js.erb +1 -0
  35. data/spec/redmine/app/views/imports/new.html.erb +15 -0
  36. data/spec/redmine/app/views/imports/run.html.erb +20 -0
  37. data/spec/redmine/app/views/imports/run.js.erb +11 -0
  38. data/spec/redmine/app/views/imports/settings.html.erb +30 -0
  39. data/spec/redmine/app/views/imports/show.html.erb +38 -0
  40. data/spec/redmine/app/views/layouts/_file.html.erb +15 -0
  41. data/spec/redmine/app/views/mailer/security_notification.html.erb +13 -0
  42. data/spec/redmine/app/views/mailer/security_notification.text.erb +8 -0
  43. data/spec/redmine/app/views/mailer/settings_updated.html.erb +14 -0
  44. data/spec/redmine/app/views/mailer/settings_updated.text.erb +12 -0
  45. data/spec/redmine/app/views/queries/_query_form.html.erb +62 -0
  46. data/spec/redmine/app/views/repositories/_changeset.html.erb +40 -0
  47. data/spec/redmine/app/views/search/index.api.rsb +12 -0
  48. data/spec/redmine/app/views/settings/_api.html.erb +10 -0
  49. data/spec/redmine/app/views/settings/_attachments.html.erb +21 -0
  50. data/spec/redmine/app/views/wiki/_new_modal.html.erb +21 -0
  51. data/spec/redmine/app/views/wiki/new.html.erb +17 -0
  52. data/spec/redmine/app/views/wiki/new.js.erb +2 -0
  53. data/spec/redmine/appveyor.yml +36 -0
  54. data/spec/redmine/db/migrate/20150725112753_insert_allowed_statuses_for_new_issues.rb +23 -0
  55. data/spec/redmine/db/migrate/20150730122707_create_imports.rb +13 -0
  56. data/spec/redmine/db/migrate/20150730122735_create_import_items.rb +10 -0
  57. data/spec/redmine/db/migrate/20150921204850_change_time_entries_comments_limit_to_1024.rb +9 -0
  58. data/spec/redmine/db/migrate/20150921210243_change_wiki_contents_comments_limit_to_1024.rb +11 -0
  59. data/spec/redmine/db/migrate/20151020182334_change_attachments_filesize_limit_to_8.rb +9 -0
  60. data/spec/redmine/db/migrate/20151020182731_fix_comma_in_user_format_setting_value.rb +13 -0
  61. data/spec/redmine/db/migrate/20151021184614_change_issue_categories_name_limit_to_60.rb +9 -0
  62. data/spec/redmine/db/migrate/20151021185456_change_auth_sources_filter_to_text.rb +9 -0
  63. data/spec/redmine/db/migrate/20151021190616_change_user_preferences_hide_mail_default_to_true.rb +9 -0
  64. data/spec/redmine/db/migrate/20151024082034_add_tokens_updated_on.rb +10 -0
  65. data/spec/redmine/db/migrate/20151025072118_create_custom_field_enumerations.rb +10 -0
  66. data/spec/redmine/db/migrate/20151031095005_add_projects_default_version_id.rb +12 -0
  67. data/spec/redmine/db/migrate/20160404080304_force_password_reset_during_setup.rb +9 -0
  68. data/spec/redmine/db/migrate/20160416072926_remove_position_defaults.rb +13 -0
  69. data/spec/redmine/db/migrate/20160529063352_add_roles_settings.rb +5 -0
  70. data/spec/redmine/lib/redmine/acts/positioned.rb +118 -0
  71. data/spec/redmine/lib/redmine/helpers/url.rb +35 -0
  72. data/spec/redmine/lib/redmine/hook/listener.rb +32 -0
  73. data/spec/redmine/lib/redmine/hook/view_listener.rb +78 -0
  74. data/spec/redmine/log/test.log +2 -0
  75. data/spec/redmine/plugins/dummy_plugin/Gemfile +1 -0
  76. data/spec/redmine/plugins/dummy_plugin/app/controllers/dummy_autocompletes_controller.rb +4 -0
  77. data/spec/redmine/plugins/dummy_plugin/app/views/dummy_autocompletes/index.html.erb +3 -0
  78. data/spec/redmine/plugins/dummy_plugin/config/locales/en.yml +2 -0
  79. data/spec/redmine/plugins/dummy_plugin/config/routes.rb +1 -0
  80. data/spec/redmine/plugins/dummy_plugin/init.rb +34 -0
  81. data/spec/redmine/plugins/dummy_plugin/lib/dummy_plugin/easy_patch/redmine/controllers/issues_controller_patch.example +30 -0
  82. data/spec/redmine/plugins/dummy_plugin/lib/dummy_plugin/easy_patch/redmine/helpers/issues_helper_patch.example +30 -0
  83. data/spec/redmine/plugins/dummy_plugin/lib/dummy_plugin/easy_patch/redmine/models/issue_patch.example +30 -0
  84. data/spec/redmine/plugins/dummy_plugin/lib/dummy_plugin/hooks.rb +5 -0
  85. data/spec/redmine/plugins/dummy_plugin/lib/dummy_plugin/internals.rb +4 -0
  86. data/spec/redmine/public/images/jstoolbar/bt_precode.png +0 -0
  87. data/spec/redmine/public/images/reorder.png +0 -0
  88. data/spec/redmine/public/javascripts/jquery-1.11.1-ui-1.11.0-ujs-3.1.4.js +21 -0
  89. data/spec/redmine/public/javascripts/redmine_extensions/application.js +13 -0
  90. data/spec/redmine/public/javascripts/redmine_extensions/easy_togglers.js +58 -0
  91. data/spec/redmine/public/javascripts/redmine_extensions/jquery.entityarray.js +130 -0
  92. data/spec/redmine/public/javascripts/redmine_extensions/redmine_extensions.js +642 -0
  93. data/spec/redmine/public/javascripts/responsive.js +83 -0
  94. data/spec/redmine/public/stylesheets/responsive.css +799 -0
  95. data/spec/redmine/test/fixtures/files/import_dates.csv +4 -0
  96. data/spec/redmine/test/fixtures/files/import_iso8859-1.csv +3 -0
  97. data/spec/redmine/test/fixtures/files/import_issues.csv +4 -0
  98. data/spec/redmine/test/fixtures/ldap/slapd.centos6.conf +24 -0
  99. data/spec/redmine/test/fixtures/ldap/slapd.ubuntu.12.04.conf +23 -0
  100. data/spec/redmine/test/fixtures/mail_handler/issue_update_with_cc.eml +19 -0
  101. data/spec/redmine/test/fixtures/mail_handler/ticket_on_project_given_by_to_header.eml +60 -0
  102. data/spec/redmine/test/fixtures/mail_handler/ticket_with_text_attachment_iso-8859-2.eml +31 -0
  103. data/spec/redmine/test/functional/custom_field_enumerations_controller_test.rb +115 -0
  104. data/spec/redmine/test/functional/imports_controller_test.rb +205 -0
  105. data/spec/redmine/test/functional/sessions_controller_test.rb +138 -0
  106. data/spec/redmine/test/integration/api_test/search_test.rb +92 -0
  107. data/spec/redmine/test/integration/routing/imports_test.rb +36 -0
  108. data/spec/redmine/test/integration/sessions_test.rb +97 -0
  109. data/spec/redmine/test/ui/custom_fields_test_ui.rb +38 -0
  110. data/spec/redmine/test/unit/attachment_transaction_test.rb +76 -0
  111. data/spec/redmine/test/unit/helpers/journals_helper_test.rb +48 -0
  112. data/spec/redmine/test/unit/helpers/wiki_helper_test.rb +45 -0
  113. data/spec/redmine/test/unit/issue_import_test.rb +178 -0
  114. data/spec/redmine/test/unit/lib/redmine/acts/positioned_with_scope_test.rb +53 -0
  115. data/spec/redmine/test/unit/lib/redmine/acts/positioned_without_scope_test.rb +55 -0
  116. data/spec/redmine/test/unit/lib/redmine/field_format/enumeration_format_test.rb +91 -0
  117. data/spec/support/easy_queries_helpers.rb +0 -0
  118. metadata +216 -10
@@ -0,0 +1,3 @@
1
+ <%= render :layout => 'layouts/file' do %>
2
+ <%= render :partial => 'common/image', :locals => {:path => download_named_attachment_url(@attachment, @attachment.filename), :alt => @attachment.filename} %>
3
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <%= render :layout => 'layouts/file' do %>
2
+ <%= render :partial => 'common/other' %>
3
+ <% end %>
@@ -0,0 +1 @@
1
+ <%= image_tag path, :alt => alt, :class => 'filecontent image' %>
@@ -0,0 +1 @@
1
+ <p class="nodata"><%= l(:label_no_preview) %></p>
@@ -0,0 +1,2 @@
1
+ $('#content').html('<%= escape_javascript(render(:template => 'custom_field_enumerations/index')) %>');
2
+ $('#custom_field_enumeration_name').focus();
@@ -0,0 +1,14 @@
1
+ <%= title [l(:label_custom_field_plural), custom_fields_path],
2
+ [l(@custom_field.type_name), custom_fields_path(:tab => @custom_field.class.name)],
3
+ @custom_field.name %>
4
+
5
+ <%= form_tag(custom_field_enumeration_path(@custom_field, @value), :method => :delete) do %>
6
+ <div class="box">
7
+ <p><strong><%= l(:text_enumeration_destroy_question, :name => @value.name, :count => @value.objects_count) %></strong></p>
8
+ <p><label for='reassign_to_id'><%= l(:text_enumeration_category_reassign_to) %></label>
9
+ <%= select_tag('reassign_to_id', content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '') + options_from_collection_for_select(@enumerations, 'id', 'name')) %></p>
10
+ </div>
11
+
12
+ <%= submit_tag l(:button_apply) %>
13
+ <%= link_to l(:button_cancel), custom_field_enumerations_path(@custom_field) %>
14
+ <% end %>
@@ -0,0 +1,47 @@
1
+ <%= custom_field_title @custom_field %>
2
+
3
+ <% if @custom_field.enumerations.any? %>
4
+ <%= form_tag custom_field_enumerations_path(@custom_field), :method => 'put' do %>
5
+ <div class="box">
6
+ <ul id="custom_field_enumerations" class="flat">
7
+ <% @custom_field.enumerations.each_with_index do |value, position| %>
8
+ <li>
9
+ <span class="sort-handle"></span>
10
+ <%= hidden_field_tag "custom_field_enumerations[#{value.id}][position]", position, :class => 'position' %>
11
+ <%= text_field_tag "custom_field_enumerations[#{value.id}][name]", value.name, :size => 40 %>
12
+ <%= hidden_field_tag "custom_field_enumerations[#{value.id}][active]", 0 %>
13
+ <label>
14
+ <%= check_box_tag "custom_field_enumerations[#{value.id}][active]", 1, value.active? %>
15
+ <%= l(:field_active) %>
16
+ </label>
17
+ <%= delete_link custom_field_enumeration_path(@custom_field, value) %>
18
+ </li>
19
+ <% end %>
20
+ </ul>
21
+ </div>
22
+ <p>
23
+ <%= submit_tag(l(:button_save)) %> |
24
+ <%= link_to l(:button_back), edit_custom_field_path(@custom_field) %>
25
+ </p>
26
+ <% end %>
27
+ <% end %>
28
+
29
+ <p><%= l(:label_enumeration_new) %></p>
30
+
31
+ <%= form_tag custom_field_enumerations_path(@custom_field), :method => 'post', :remote => true do %>
32
+ <p><%= text_field_tag 'custom_field_enumeration[name]', '', :size => 40 %>
33
+ <%= submit_tag(l(:button_add)) %></p>
34
+ <% end %>
35
+
36
+ <%= javascript_tag do %>
37
+ $(function() {
38
+ $("#custom_field_enumerations").sortable({
39
+ handle: ".sort-handle",
40
+ update: function(event, ui) {
41
+ $("#custom_field_enumerations li").each(function(){
42
+ $(this).find("input.position").val($(this).index()+1);
43
+ });
44
+ }
45
+ });
46
+ });
47
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <% unless @custom_field.new_record? %>
2
+ <p>
3
+ <label><%= l(:field_possible_values) %></label>
4
+ <%= link_to l(:button_edit), custom_field_enumerations_path(@custom_field), :class => 'icon icon-edit' %>
5
+ </p>
6
+ <% if @custom_field.enumerations.active.any? %>
7
+ <p><%= f.select :default_value, @custom_field.enumerations.active.map{|v| [v.name, v.id.to_s]}, :include_blank => true %></p>
8
+ <% end %>
9
+ <% end %>
10
+
11
+ <p><%= f.text_field :url_pattern, :size => 50, :label => :label_link_values_to %></p>
12
+ <p><%= edit_tag_style_tag f %></p>
@@ -0,0 +1,90 @@
1
+ <p>
2
+ <label><%= l(:label_project) %></label>
3
+ <%= select_tag 'import_settings[mapping][project_id]',
4
+ options_for_select(project_tree_options_for_select(@import.allowed_target_projects, :selected => @import.project)),
5
+ :id => 'import_mapping_project_id' %>
6
+ </p>
7
+ <p>
8
+ <label><%= l(:label_tracker) %></label>
9
+ <%= mapping_select_tag @import, 'tracker', :required => true,
10
+ :values => @import.allowed_target_trackers.sorted.map {|t| [t.name, t.id]} %>
11
+ </p>
12
+ <p>
13
+ <label><%= l(:field_status) %></label>
14
+ <%= mapping_select_tag @import, 'status' %>
15
+ </p>
16
+
17
+ <div class="splitcontent">
18
+ <div class="splitcontentleft">
19
+ <p>
20
+ <label><%= l(:field_subject) %></label>
21
+ <%= mapping_select_tag @import, 'subject', :required => true %>
22
+ </p>
23
+ <p>
24
+ <label><%= l(:field_description) %></label>
25
+ <%= mapping_select_tag @import, 'description' %>
26
+ </p>
27
+ <p>
28
+ <label><%= l(:field_priority) %></label>
29
+ <%= mapping_select_tag @import, 'priority' %>
30
+ </p>
31
+ <p>
32
+ <label><%= l(:field_category) %></label>
33
+ <%= mapping_select_tag @import, 'category' %>
34
+ <% if User.current.allowed_to?(:manage_categories, @import.project) %>
35
+ <label class="block">
36
+ <%= check_box_tag 'import_settings[mapping][create_categories]', '1', @import.create_categories? %>
37
+ <%= l(:label_create_missing_values) %>
38
+ </label>
39
+ <% end %>
40
+ </p>
41
+ <p>
42
+ <label><%= l(:field_assigned_to) %></label>
43
+ <%= mapping_select_tag @import, 'assigned_to' %>
44
+ </p>
45
+ <p>
46
+ <label><%= l(:field_fixed_version) %></label>
47
+ <%= mapping_select_tag @import, 'fixed_version' %>
48
+ <% if User.current.allowed_to?(:manage_versions, @import.project) %>
49
+ <label class="block">
50
+ <%= check_box_tag 'import_settings[mapping][create_versions]', '1', @import.create_versions? %>
51
+ <%= l(:label_create_missing_values) %>
52
+ </label>
53
+ <% end %>
54
+ </p>
55
+ <% @custom_fields.each do |field| %>
56
+ <p>
57
+ <label><%= field.name %></label>
58
+ <%= mapping_select_tag @import, "cf_#{field.id}" %>
59
+ </p>
60
+ <% end %>
61
+ </div>
62
+
63
+ <div class="splitcontentright">
64
+ <p>
65
+ <label><%= l(:field_is_private) %></label>
66
+ <%= mapping_select_tag @import, 'is_private' %>
67
+ </p>
68
+ <p>
69
+ <label><%= l(:field_parent_issue) %></label>
70
+ <%= mapping_select_tag @import, 'parent_issue_id' %>
71
+ </p>
72
+ <p>
73
+ <label><%= l(:field_start_date) %></label>
74
+ <%= mapping_select_tag @import, 'start_date' %>
75
+ </p>
76
+ <p>
77
+ <label><%= l(:field_due_date) %></label>
78
+ <%= mapping_select_tag @import, 'due_date' %>
79
+ </p>
80
+ <p>
81
+ <label><%= l(:field_estimated_hours) %></label>
82
+ <%= mapping_select_tag @import, 'estimated_hours' %>
83
+ </p>
84
+ <p>
85
+ <label><%= l(:field_done_ratio) %></label>
86
+ <%= mapping_select_tag @import, 'done_ratio' %>
87
+ </p>
88
+ </div>
89
+ </div>
90
+
@@ -0,0 +1,52 @@
1
+ <h2><%= l(:label_import_issues) %></h2>
2
+
3
+ <%= form_tag(import_mapping_path(@import), :id => "import-form") do %>
4
+ <fieldset class="box tabular">
5
+ <legend><%= l(:label_fields_mapping) %></legend>
6
+ <div id="fields-mapping">
7
+ <%= render :partial => 'fields_mapping' %>
8
+ </div>
9
+ </fieldset>
10
+
11
+ <div class="autoscroll">
12
+ <fieldset class="box">
13
+ <legend><%= l(:label_file_content_preview) %></legend>
14
+
15
+ <table class="sample-data">
16
+ <% @import.first_rows.each do |row| %>
17
+ <tr>
18
+ <%= row.map {|c| content_tag 'td', truncate(c.to_s, :length => 50) }.join("").html_safe %>
19
+ </tr>
20
+ <% end %>
21
+ </table>
22
+ </fieldset>
23
+ </div>
24
+
25
+ <p>
26
+ <%= button_tag("\xc2\xab " + l(:label_previous), :name => 'previous') %>
27
+ <%= submit_tag l(:button_import) %>
28
+ </p>
29
+ <% end %>
30
+
31
+ <% content_for :sidebar do %>
32
+ <%= render :partial => 'issues/sidebar' %>
33
+ <% end %>
34
+
35
+
36
+ <%= javascript_tag do %>
37
+ $(document).ready(function() {
38
+ $('#fields-mapping').on('change', '#import_mapping_project_id, #import_mapping_tracker', function(){
39
+ $.ajax({
40
+ url: '<%= import_mapping_path(@import, :format => 'js') %>',
41
+ type: 'post',
42
+ data: $('#import-form').serialize()
43
+ });
44
+ });
45
+
46
+ $('#import-form').submit(function(){
47
+ $('#import-details').show().addClass('ajax-loading');
48
+ $('#import-progress').progressbar({value: 0, max: <%= @import.total_items || 0 %>});
49
+ });
50
+
51
+ });
52
+ <% end %>
@@ -0,0 +1 @@
1
+ $('#fields-mapping').html('<%= escape_javascript(render :partial => 'fields_mapping') %>');
@@ -0,0 +1,15 @@
1
+ <h2><%= l(:label_import_issues) %></h2>
2
+
3
+ <%= form_tag(imports_path, :multipart => true) do %>
4
+ <fieldset class="box">
5
+ <legend><%= l(:label_select_file_to_import) %> (CSV)</legend>
6
+ <p>
7
+ <%= file_field_tag 'file' %>
8
+ </p>
9
+ </fieldset>
10
+ <p><%= submit_tag l(:label_next).html_safe + " &#187;".html_safe, :name => nil %></p>
11
+ <% end %>
12
+
13
+ <% content_for :sidebar do %>
14
+ <%= render :partial => 'issues/sidebar' %>
15
+ <% end %>
@@ -0,0 +1,20 @@
1
+ <h2><%= l(:label_import_issues) %></h2>
2
+
3
+ <div id="import-details">
4
+ <div id="import-progress"><div id="progress-label">0 / <%= @import.total_items.to_i %></div></div>
5
+ </div>
6
+
7
+ <% content_for :sidebar do %>
8
+ <%= render :partial => 'issues/sidebar' %>
9
+ <% end %>
10
+
11
+ <%= javascript_tag do %>
12
+ $(document).ready(function() {
13
+ $('#import-details').addClass('ajax-loading');
14
+ $('#import-progress').progressbar({value: 0, max: <%= @import.total_items.to_i %>});
15
+ $.ajax({
16
+ url: '<%= import_run_path(@import, :format => 'js') %>',
17
+ type: 'post'
18
+ });
19
+ });
20
+ <% end %>
@@ -0,0 +1,11 @@
1
+ $('#import-progress').progressbar({value: <%= @current.to_i %>});
2
+ $('#progress-label').text("<%= @current.to_i %> / <%= @import.total_items.to_i %>");
3
+
4
+ <% if @import.finished? %>
5
+ window.location.href='<%= import_path(@import) %>';
6
+ <% else %>
7
+ $.ajax({
8
+ url: '<%= import_run_path(@import, :format => 'js') %>',
9
+ type: 'post'
10
+ });
11
+ <% end %>
@@ -0,0 +1,30 @@
1
+ <h2><%= l(:label_import_issues) %></h2>
2
+
3
+ <%= form_tag(import_settings_path(@import), :id => "import-form") do %>
4
+ <fieldset class="box tabular">
5
+ <legend><%= l(:label_options) %></legend>
6
+ <p>
7
+ <label><%= l(:label_fields_separator) %></label>
8
+ <%= select_tag 'import_settings[separator]',
9
+ options_for_select([[l(:label_comma_char), ','], [l(:label_semi_colon_char), ';']], @import.settings['separator']) %>
10
+ </p>
11
+ <p>
12
+ <label><%= l(:label_fields_wrapper) %></label>
13
+ <%= select_tag 'import_settings[wrapper]',
14
+ options_for_select([[l(:label_quote_char), "'"], [l(:label_double_quote_char), '"']], @import.settings['wrapper']) %>
15
+ </p>
16
+ <p>
17
+ <label><%= l(:label_encoding) %></label>
18
+ <%= select_tag 'import_settings[encoding]', options_for_select(Setting::ENCODINGS, @import.settings['encoding']) %>
19
+ </p>
20
+ <p>
21
+ <label><%= l(:setting_date_format) %></label>
22
+ <%= select_tag 'import_settings[date_format]', options_for_select(date_format_options, @import.settings['date_format']) %>
23
+ </p>
24
+ </fieldset>
25
+ <p><%= submit_tag l(:label_next).html_safe + " &#187;".html_safe, :name => nil %></p>
26
+ <% end %>
27
+
28
+ <% content_for :sidebar do %>
29
+ <%= render :partial => 'issues/sidebar' %>
30
+ <% end %>
@@ -0,0 +1,38 @@
1
+ <h2><%= l(:label_import_issues) %></h2>
2
+
3
+ <% if @import.saved_items.count > 0 %>
4
+ <p><%= l(:notice_import_finished, :count => @import.saved_items.count) %>:</p>
5
+
6
+ <ul id="saved-items">
7
+ <% @import.saved_objects.each do |issue| %>
8
+ <li><%= link_to_issue issue %></li>
9
+ <% end %>
10
+ </ul>
11
+
12
+ <p><%= link_to l(:label_issue_view_all), issues_path(:set_filter => 1, :status_id => '*', :issue_id => @import.saved_objects.map(&:id).join(',')) %></p>
13
+ <% end %>
14
+
15
+ <% if @import.unsaved_items.count > 0 %>
16
+ <p><%= l(:notice_import_finished_with_errors, :count => @import.unsaved_items.count, :total => @import.total_items) %>:</p>
17
+
18
+ <table id="unsaved-items" class="list">
19
+ <thead>
20
+ <tr>
21
+ <th>Position</th>
22
+ <th>Message</th>
23
+ </tr>
24
+ </thead>
25
+ <tbody>
26
+ <% @import.unsaved_items.each do |item| %>
27
+ <tr>
28
+ <td><%= item.position %></td>
29
+ <td><%= simple_format_without_paragraph item.message %></td>
30
+ </tr>
31
+ <% end %>
32
+ </tbody>
33
+ </table>
34
+ <% end %>
35
+
36
+ <% content_for :sidebar do %>
37
+ <%= render :partial => 'issues/sidebar' %>
38
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <h2><%=h @attachment.filename %></h2>
2
+
3
+ <div class="attachments">
4
+ <p><%= "#{@attachment.description} - " unless @attachment.description.blank? %>
5
+ <span class="author"><%= link_to_user(@attachment.author) %>, <%= format_time(@attachment.created_on) %></span></p>
6
+ <p><%= link_to_attachment @attachment, :text => l(:button_download), :download => true -%>
7
+ <span class="size">(<%= number_to_human_size @attachment.filesize %>)</span></p>
8
+ </div>
9
+ <%= yield %>
10
+
11
+ <% html_title @attachment.filename %>
12
+
13
+ <% content_for :header_tags do -%>
14
+ <%= stylesheet_link_tag "scm" -%>
15
+ <% end -%>
@@ -0,0 +1,13 @@
1
+ <p><%= @message %><br />
2
+ <% if @url && @title -%>
3
+ <%= link_to @title, @url -%>
4
+ <% elsif @url -%>
5
+ <%= link_to @url -%>
6
+ <% elsif @title -%>
7
+ <%= content_tag :h1, @title -%>
8
+ <% end %></p>
9
+
10
+ <p><%= l(:field_user) %>: <strong><%= User.current.login %></strong><br/>
11
+ <%= l(:field_remote_ip) %>: <strong><%= User.current.remote_ip %></strong><br/>
12
+ <%= l(:label_date) %>: <strong><%= format_time Time.now, true, @user %></strong></p>
13
+
@@ -0,0 +1,8 @@
1
+ <%= @message %>
2
+
3
+ <%= @url || @title %>
4
+
5
+ <%= l(:field_user) %>: <%= User.current.login %>
6
+ <%= l(:field_remote_ip) %>: <%= User.current.remote_ip %>
7
+ <%= l(:label_date) %>: <%= format_time Time.now, true, @user %>
8
+
@@ -0,0 +1,14 @@
1
+ <p><%= l(:mail_body_settings_updated) %></p>
2
+
3
+ <ul>
4
+ <% @changes.each do |name| %>
5
+ <li><%= l("setting_#{name}") %></li>
6
+ <% end %>
7
+ </ul>
8
+
9
+ <%= link_to @url, @url %>
10
+
11
+ <p><%= l(:field_user) %>: <strong><%= User.current.login %></strong><br/>
12
+ <%= l(:field_remote_ip) %>: <strong><%= User.current.remote_ip %></strong><br/>
13
+ <%= l(:label_date) %>: <strong><%= format_time Time.now, true %></strong></p>
14
+
@@ -0,0 +1,12 @@
1
+ <%= l(:mail_body_settings_updated) %>
2
+
3
+ <% @changes.each do |name| %>
4
+ * <%= l("setting_#{name}") %>
5
+ <% end %>
6
+
7
+ <%= @url %>
8
+
9
+ <%= l(:field_user) %>: <%= User.current.login %>
10
+ <%= l(:field_remote_ip) %>: <%= User.current.remote_ip %>
11
+ <%= l(:label_date) %>: <%= format_time Time.now, true %>
12
+
@@ -0,0 +1,62 @@
1
+ <%= hidden_field_tag 'set_filter', '1' %>
2
+ <%= hidden_field_tag 'type', @query.type, :disabled => true, :id => 'query_type' %>
3
+
4
+ <div id="query_form_with_buttons" class="hide-when-print">
5
+ <div id="query_form_content">
6
+ <fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
7
+ <legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
8
+ <div style="<%= @query.new_record? ? "" : "display: none;" %>">
9
+ <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
10
+ </div>
11
+ </fieldset>
12
+
13
+ <fieldset id="options" class="collapsible collapsed">
14
+ <legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
15
+ <div style="display: none;">
16
+ <table>
17
+ <tr>
18
+ <td class="field"><%= l(:field_column_names) %></td>
19
+ <td><%= render_query_columns_selection(@query) %></td>
20
+ </tr>
21
+ <% if @query.groupable_columns.any? %>
22
+ <tr>
23
+ <td class="field"><label for='group_by'><%= l(:field_group_by) %></label></td>
24
+ <td><%= group_by_column_select_tag(@query) %></td>
25
+ </tr>
26
+ <% end %>
27
+ <% if @query.available_block_columns.any? %>
28
+ <tr>
29
+ <td class="field"><%= l(:button_show) %></td>
30
+ <td><%= available_block_columns_tags(@query) %></td>
31
+ </tr>
32
+ <% end %>
33
+ <% if @query.available_totalable_columns.any? %>
34
+ <tr>
35
+ <td><%= l(:label_total_plural) %></td>
36
+ <td><%= available_totalable_columns_tags(@query) %></td>
37
+ </tr>
38
+ <% end %>
39
+ </table>
40
+ </div>
41
+ </fieldset>
42
+ </div>
43
+
44
+ <p class="buttons">
45
+ <%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
46
+ <%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %>
47
+ <% if @query.new_record? %>
48
+ <% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
49
+ <%= link_to_function l(:button_save),
50
+ "$('#query_type').prop('disabled',false);$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit()",
51
+ :class => 'icon icon-save' %>
52
+ <% end %>
53
+ <% else %>
54
+ <% if @query.editable_by?(User.current) %>
55
+ <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
56
+ <%= delete_link query_path(@query) %>
57
+ <% end %>
58
+ <% end %>
59
+ </p>
60
+ </div>
61
+
62
+ <%= error_messages_for @query %>