redmine_extensions 0.0.34 → 0.0.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/redmine_extensions/redmine_extensions.js +46 -20
  3. data/{spec/redmine/public/javascripts/redmine_extensions/redmine_extensions.js → app/assets/javascripts/redmine_extensions/redmine_extensions.js.orig} +48 -15
  4. data/app/helpers/redmine_extensions/application_helper.rb +2 -2
  5. data/app/helpers/redmine_extensions/application_helper.rb.orig +66 -109
  6. data/lib/redmine_extensions/version.rb +1 -1
  7. data/spec/redmine/{db/test.sqlite3 → tmp/pdf/empty} +0 -0
  8. data/spec/redmine/tmp/test/empty +0 -0
  9. data/spec/redmine/tmp/thumbnails/empty +0 -0
  10. metadata +9 -52
  11. data/app/views/easy_entity_assignments/_assignments_container.html.erb.orig +0 -45
  12. data/app/views/easy_queries/_entities.html.erb.orig +0 -67
  13. data/lib/redmine_extensions/easy_query_adapter.rb.orig +0 -185
  14. data/lib/redmine_extensions/version.rb.orig +0 -7
  15. data/spec/redmine/Gemfile.lock +0 -191
  16. data/spec/redmine/config/secrets.yml +0 -3
  17. data/spec/redmine/db/development.sqlite3 +0 -0
  18. data/spec/redmine/db/schema.rb +0 -678
  19. data/spec/redmine/log/development.log +0 -22900
  20. data/spec/redmine/log/test.scm.stderr.log +0 -11
  21. data/spec/redmine/plugins/easy_test_plugin/Gemfile +0 -1
  22. data/spec/redmine/plugins/easy_test_plugin/app/controllers/easy_issue_tests_controller.rb +0 -9
  23. data/spec/redmine/plugins/easy_test_plugin/app/models/easy_testing_query.rb +0 -90
  24. data/spec/redmine/plugins/easy_test_plugin/app/views/easy_issue_tests/index.html.erb +0 -2
  25. data/spec/redmine/plugins/easy_test_plugin/config/locales/en.yml +0 -2
  26. data/spec/redmine/plugins/easy_test_plugin/config/routes.rb +0 -2
  27. data/spec/redmine/plugins/easy_test_plugin/init.rb +0 -34
  28. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/hooks.rb +0 -5
  29. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/internals.rb +0 -4
  30. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/controllers/issues_controller_patch.example +0 -30
  31. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/helpers/issues_helper_patch.example +0 -30
  32. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/models/issue_patch.example +0 -30
  33. data/spec/redmine/public/javascripts/redmine_extensions/application.js +0 -13
  34. data/spec/redmine/public/javascripts/redmine_extensions/jquery.easy_query.js +0 -235
  35. data/spec/redmine/public/javascripts/redmine_extensions/jquery.entityarray.js +0 -130
@@ -1,3 +1,3 @@
1
1
  module RedmineExtensions
2
- VERSION = '0.0.34'
2
+ VERSION = '0.0.36'
3
3
  end
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34
4
+ version: 0.0.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Easy Software Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-05 00:00:00.000000000 Z
11
+ date: 2016-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -107,6 +107,7 @@ files:
107
107
  - app/assets/javascripts/redmine_extensions/application.js
108
108
  - app/assets/javascripts/redmine_extensions/jquery.entityarray.js
109
109
  - app/assets/javascripts/redmine_extensions/redmine_extensions.js
110
+ - app/assets/javascripts/redmine_extensions/redmine_extensions.js.orig
110
111
  - app/assets/stylesheets/redmine_extensions/application.css
111
112
  - app/controllers/easy_settings_controller.rb
112
113
  - app/helpers/redmine_extensions/application_helper.rb
@@ -117,10 +118,8 @@ files:
117
118
  - app/presenters/redmine_extensions/base_presenter.rb
118
119
  - app/presenters/redmine_extensions/easy_setting_presenter.rb
119
120
  - app/views/easy_entity_assignments/_assignments_container.html.erb
120
- - app/views/easy_entity_assignments/_assignments_container.html.erb.orig
121
121
  - app/views/easy_entity_assignments/_query_index.html.erb
122
122
  - app/views/easy_queries/_entities.html.erb
123
- - app/views/easy_queries/_entities.html.erb.orig
124
123
  - app/views/easy_queries/_index.html.erb
125
124
  - app/views/easy_queries/_settings.html.erb
126
125
  - app/views/easy_settings/edit.html.erb
@@ -178,7 +177,6 @@ files:
178
177
  - lib/redmine_extensions/easy_entity_formatters/easy_entity_formatter.rb
179
178
  - lib/redmine_extensions/easy_form_builder.rb
180
179
  - lib/redmine_extensions/easy_query_adapter.rb
181
- - lib/redmine_extensions/easy_query_adapter.rb.orig
182
180
  - lib/redmine_extensions/engine.rb
183
181
  - lib/redmine_extensions/export/easy_other_formats_builder.rb
184
182
  - lib/redmine_extensions/hooks.rb
@@ -195,7 +193,6 @@ files:
195
193
  - lib/redmine_extensions/redmine_patches/controllers/issues_controller_patch.rb
196
194
  - lib/redmine_extensions/redmine_patches/patches.rb
197
195
  - lib/redmine_extensions/version.rb
198
- - lib/redmine_extensions/version.rb.orig
199
196
  - lib/tasks/redmine_extensions_tasks.rake
200
197
  - spec/factories/easy_queries.rb
201
198
  - spec/factories/easy_settings.rb
@@ -209,7 +206,6 @@ files:
209
206
  - spec/rails_helper.rb
210
207
  - spec/redmine/CONTRIBUTING.md
211
208
  - spec/redmine/Gemfile
212
- - spec/redmine/Gemfile.lock
213
209
  - spec/redmine/README.rdoc
214
210
  - spec/redmine/Rakefile
215
211
  - spec/redmine/app/controllers/account_controller.rb
@@ -837,9 +833,7 @@ files:
837
833
  - spec/redmine/config/locales/zh-TW.yml
838
834
  - spec/redmine/config/locales/zh.yml
839
835
  - spec/redmine/config/routes.rb
840
- - spec/redmine/config/secrets.yml
841
836
  - spec/redmine/config/settings.yml
842
- - spec/redmine/db/development.sqlite3
843
837
  - spec/redmine/db/migrate/001_setup.rb
844
838
  - spec/redmine/db/migrate/002_issue_move.rb
845
839
  - spec/redmine/db/migrate/003_issue_add_note.rb
@@ -1092,8 +1086,6 @@ files:
1092
1086
  - spec/redmine/db/migrate/20150528084820_add_roles_all_roles_managed.rb
1093
1087
  - spec/redmine/db/migrate/20150528092912_create_roles_managed_roles.rb
1094
1088
  - spec/redmine/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb
1095
- - spec/redmine/db/schema.rb
1096
- - spec/redmine/db/test.sqlite3
1097
1089
  - spec/redmine/doc/CHANGELOG
1098
1090
  - spec/redmine/doc/COPYING
1099
1091
  - spec/redmine/doc/INSTALL
@@ -1323,21 +1315,7 @@ files:
1323
1315
  - spec/redmine/lib/tasks/testing.rake
1324
1316
  - spec/redmine/lib/tasks/yardoc.rake
1325
1317
  - spec/redmine/log/delete.me
1326
- - spec/redmine/log/development.log
1327
- - spec/redmine/log/test.scm.stderr.log
1328
1318
  - spec/redmine/plugins/README
1329
- - spec/redmine/plugins/easy_test_plugin/Gemfile
1330
- - spec/redmine/plugins/easy_test_plugin/app/controllers/easy_issue_tests_controller.rb
1331
- - spec/redmine/plugins/easy_test_plugin/app/models/easy_testing_query.rb
1332
- - spec/redmine/plugins/easy_test_plugin/app/views/easy_issue_tests/index.html.erb
1333
- - spec/redmine/plugins/easy_test_plugin/config/locales/en.yml
1334
- - spec/redmine/plugins/easy_test_plugin/config/routes.rb
1335
- - spec/redmine/plugins/easy_test_plugin/init.rb
1336
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/hooks.rb
1337
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/internals.rb
1338
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/controllers/issues_controller_patch.example
1339
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/helpers/issues_helper_patch.example
1340
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/models/issue_patch.example
1341
1319
  - spec/redmine/public/404.html
1342
1320
  - spec/redmine/public/500.html
1343
1321
  - spec/redmine/public/dispatch.fcgi.example
@@ -1773,10 +1751,6 @@ files:
1773
1751
  - spec/redmine/public/javascripts/jstoolbar/textile.js
1774
1752
  - spec/redmine/public/javascripts/project_identifier.js
1775
1753
  - spec/redmine/public/javascripts/raphael.js
1776
- - spec/redmine/public/javascripts/redmine_extensions/application.js
1777
- - spec/redmine/public/javascripts/redmine_extensions/jquery.easy_query.js
1778
- - spec/redmine/public/javascripts/redmine_extensions/jquery.entityarray.js
1779
- - spec/redmine/public/javascripts/redmine_extensions/redmine_extensions.js
1780
1754
  - spec/redmine/public/javascripts/repository_navigation.js
1781
1755
  - spec/redmine/public/javascripts/revision_graph.js
1782
1756
  - spec/redmine/public/plugin_assets/empty
@@ -2217,6 +2191,9 @@ files:
2217
2191
  - spec/redmine/test/unit/wiki_test.rb
2218
2192
  - spec/redmine/test/unit/workflow_test.rb
2219
2193
  - spec/redmine/test/unit/workflow_transition_test.rb
2194
+ - spec/redmine/tmp/pdf/empty
2195
+ - spec/redmine/tmp/test/empty
2196
+ - spec/redmine/tmp/thumbnails/empty
2220
2197
  - spec/spec_helper.rb
2221
2198
  - spec/support/easy_queries_helpers.rb
2222
2199
  homepage: https://www.easyredmine.com
@@ -2665,9 +2642,6 @@ test_files:
2665
2642
  - spec/redmine/doc/COPYING
2666
2643
  - spec/redmine/doc/README_FOR_APP
2667
2644
  - spec/redmine/doc/RUNNING_TESTS
2668
- - spec/redmine/db/test.sqlite3
2669
- - spec/redmine/db/development.sqlite3
2670
- - spec/redmine/db/schema.rb
2671
2645
  - spec/redmine/db/migrate/20091017214611_add_missing_indexes_to_journals.rb
2672
2646
  - spec/redmine/db/migrate/047_add_boards_permissions.rb
2673
2647
  - spec/redmine/db/migrate/005_issue_start_date.rb
@@ -2923,7 +2897,6 @@ test_files:
2923
2897
  - spec/redmine/Gemfile
2924
2898
  - spec/redmine/config/environment.rb
2925
2899
  - spec/redmine/config/configuration.yml.example
2926
- - spec/redmine/config/secrets.yml
2927
2900
  - spec/redmine/config/environments/test_pgsql.rb
2928
2901
  - spec/redmine/config/environments/development.rb
2929
2902
  - spec/redmine/config/environments/test_sqlite3.rb
@@ -2991,7 +2964,6 @@ test_files:
2991
2964
  - spec/redmine/config/locales/th.yml
2992
2965
  - spec/redmine/config/locales/cs.yml
2993
2966
  - spec/redmine/config/locales/he.yml
2994
- - spec/redmine/Gemfile.lock
2995
2967
  - spec/redmine/public/500.html
2996
2968
  - spec/redmine/public/javascripts/context_menu.js
2997
2969
  - spec/redmine/public/javascripts/project_identifier.js
@@ -3098,10 +3070,6 @@ test_files:
3098
3070
  - spec/redmine/public/javascripts/jstoolbar/textile.js
3099
3071
  - spec/redmine/public/javascripts/jquery-1.11.1-ui-1.11.0-ujs-3.1.3.js
3100
3072
  - spec/redmine/public/javascripts/gantt.js
3101
- - spec/redmine/public/javascripts/redmine_extensions/jquery.entityarray.js
3102
- - spec/redmine/public/javascripts/redmine_extensions/redmine_extensions.js
3103
- - spec/redmine/public/javascripts/redmine_extensions/jquery.easy_query.js
3104
- - spec/redmine/public/javascripts/redmine_extensions/application.js
3105
3073
  - spec/redmine/public/javascripts/application.js
3106
3074
  - spec/redmine/public/plugin_assets/empty
3107
3075
  - spec/redmine/public/themes/classic/images/home.png
@@ -3478,23 +3446,12 @@ test_files:
3478
3446
  - spec/redmine/extra/sample_plugin/assets/images/it_works.png
3479
3447
  - spec/redmine/extra/sample_plugin/assets/stylesheets/example.css
3480
3448
  - spec/redmine/extra/mail_handler/rdm-mailhandler.rb
3449
+ - spec/redmine/tmp/pdf/empty
3450
+ - spec/redmine/tmp/test/empty
3451
+ - spec/redmine/tmp/thumbnails/empty
3481
3452
  - spec/redmine/files/delete.me
3482
3453
  - spec/redmine/plugins/README
3483
- - spec/redmine/plugins/easy_test_plugin/init.rb
3484
- - spec/redmine/plugins/easy_test_plugin/Gemfile
3485
- - spec/redmine/plugins/easy_test_plugin/config/routes.rb
3486
- - spec/redmine/plugins/easy_test_plugin/config/locales/en.yml
3487
- - spec/redmine/plugins/easy_test_plugin/app/models/easy_testing_query.rb
3488
- - spec/redmine/plugins/easy_test_plugin/app/controllers/easy_issue_tests_controller.rb
3489
- - spec/redmine/plugins/easy_test_plugin/app/views/easy_issue_tests/index.html.erb
3490
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/internals.rb
3491
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/models/issue_patch.example
3492
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/controllers/issues_controller_patch.example
3493
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/helpers/issues_helper_patch.example
3494
- - spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/hooks.rb
3495
3454
  - spec/redmine/README.rdoc
3496
- - spec/redmine/log/development.log
3497
- - spec/redmine/log/test.scm.stderr.log
3498
3455
  - spec/redmine/log/delete.me
3499
3456
  - spec/redmine/bin/rails
3500
3457
  - spec/redmine/bin/rake
@@ -1,45 +0,0 @@
1
- <%
2
- heading = "#{options[:heading]} (#{entities_count})"
3
- %>
4
- <% if entities_count > 0 %>
5
- <div id="<%= options[:module_name] %>_container" class="entity_references_container easy-dropper-target easy-drop-issue" data-drop-action="<%= entity.class.name.underscore %>" data-entity-id="<%= entity.id %>" data-issue-show="1">
6
- <<<<<<< HEAD
7
- <%= call_hook(:view_easy_entity_assignemnt_top, :entity => entity, :query => query, :entities => entities, :options => options, :target_class => target_class) %>
8
- =======
9
- <%= call_hook(:view_easy_entity_assignemnt_top, :entity => entity, :query => query, :entities => entities, :options => options) %>
10
- >>>>>>> master
11
- <div class="box">
12
- <%# entity_cards_params = {:module_name => options[:module_name], :project_id => project, :source_entity_type => entity.class.name, :source_entity_id => entity, :referenced_entity_type => referenced_entity_type, :referenced_collection_name => options[:referenced_collection_name]}.merge!(query.to_params) %>
13
- <% entity_cards_params = {} %>
14
- <%= render_toggler(options[:module_name], User.current, {:heading => heading + ':', :wrapping_heading_element_classes => entity_css_icon(query.entity),
15
- :container_html => {:class => 'module-inside'}, :default_button_state => false, :heading_links => [
16
- link_to('', {}, :class => 'icon-slab', :remote => true, :data => {:display => 'slab'}, :title => l(:title_easy_card_display_changer_tile)),
17
- link_to('', {}, :class => 'icon-bullet-list', :remote => true, :data => {:display => 'list'}, :title => l(:title_easy_card_display_changer_list))
18
- ]}) do %>
19
-
20
-
21
- <<<<<<< HEAD
22
- <%= render(:partial => 'easy_entity_assignments/query_index', :locals => {
23
- :entity => entity,
24
- :query => query, :target_class => target_class,
25
- :project => project, :options => options, :referenced_entities => entities}) %>
26
-
27
- =======
28
- <%#= render(:partial => 'easy_entity_assignments/query_index', :locals => {
29
- :entity => entity,
30
- :query => query, :target_class => target_class,
31
- :project => project, :options => options, :referenced_entities => entities}) %>
32
- <% entities.each do |entity| %>
33
- <div>
34
- <%= entity.to_s %>
35
- </div>
36
- <% end %>
37
- >>>>>>> master
38
-
39
- <% if options[:context_menus_path] && respond_to?(options[:context_menus_path]) %>
40
- <%# context_menu(send(options[:context_menus_path], {:project_id => project, :back_url => url_for(params)}), "##{options[:module_name]}_container") -%>
41
- <% end %>
42
- <% end %>
43
- </div>
44
- </div>
45
- <% end %>
@@ -1,67 +0,0 @@
1
- <%= form_tag({}) do %>
2
- <%= hidden_field_tag 'back_url', url_for(params), id: nil %>
3
-
4
- <div class="autoscroll">
5
- <table class="list <%= sort_css_classes %>">
6
- <thead>
7
- <tr>
8
- <th class="checkbox hide-when-print">
9
- <%= link_to_function image_tag('toggle_check.png'), 'toggleIssuesSelection(this)' %>
10
- </th>
11
-
12
- <% query.inline_columns.each do |column| %>
13
- <%= column_header(column) %>
14
- <% end %>
15
-
16
- <% if query.ending_buttons? %>
17
- <th></th>
18
- <% end %>
19
- </tr>
20
- </thead>
21
-
22
- <tbody>
23
- <% entities.each do |entity| %>
24
-
25
- <tr id="entity-<%= entity.id %>" class="hascontextmenu <%= cycle('odd', 'even') %>">
26
- <td class="checkbox hide-when-print">
27
- <%= check_box_tag('ids[]', entity.id, false, id: nil) %>
28
- </td>
29
-
30
- <% query.inline_columns.each do |column| %>
31
- <td>
32
- <<<<<<< HEAD
33
- <%= query.formatter.format(column, entity) %>
34
- =======
35
- <%= formatter.format_column(column, entity) %>
36
- >>>>>>> master
37
- </td>
38
- <% end %>
39
-
40
- <% if query.ending_buttons? %>
41
- <td>
42
- <%= query.ending_buttons(entity) %>
43
- </td>
44
- <% end %>
45
- </tr>
46
-
47
- <% query.block_columns.each do |column| %>
48
- <<<<<<< HEAD
49
- <% text = query.formatter.format(column, entity) %>
50
- <% if text.present? %>
51
- <tr class="<%= current_cycle %>">
52
- <td colspan="<%= @query.inline_columns.size + (query.ending_buttons? ? 2 : 1) %>"><%= text %></td>
53
- =======
54
- <% text = formatter.format_column(column, entity) %>
55
- <% if text.present? %>
56
- <tr class="<%= current_cycle %>">
57
- <td colspan="<%= query.inline_columns.size + (formatter.ending_buttons? ? 2 : 1) %>"><%= text %></td>
58
- >>>>>>> master
59
- </tr>
60
- <% end %>
61
- <% end %>
62
-
63
- <% end %>
64
- </tbody>
65
- </table>
66
- </div>
67
- <% end %>
@@ -1,185 +0,0 @@
1
- require 'query'
2
-
3
- module RedmineExtensions
4
- module QueryColumnAdapter
5
- def self.included(base)
6
- base.extend(ClassMethods)
7
- base.send(:include, InstanceMethods)
8
-
9
- base.class_eval do
10
- attr_accessor :includes
11
- attr_accessor :joins
12
- attr_accessor :preload
13
- end
14
- end
15
-
16
- module InstanceMethods
17
- end
18
-
19
- module ClassMethods
20
- end
21
- end
22
-
23
- module QueryAdapter
24
-
25
- # after_initialize :after_initialize
26
-
27
- <<<<<<< HEAD
28
- attr_writer :outputs
29
-
30
- def after_initialize
31
- self.filters ||= {}
32
- end
33
-
34
- def outputs
35
- @outputs ||= ['list']
36
- end
37
-
38
- def output=(output_t)
39
- self.outputs = Array.wrap(output_t)
40
- end
41
-
42
- def default_find_include
43
- [].freeze
44
- end
45
- =======
46
- # def after_initialize
47
- # self.filters ||= {}
48
- # end
49
-
50
- def filters
51
- super || {}
52
- end
53
- >>>>>>> master
54
-
55
- def default_find_include
56
- [].freeze
57
- end
58
-
59
- def default_find_preload
60
- [].freeze
61
- end
62
-
63
- def default_find_joins
64
- [].freeze
65
- end
66
-
67
- def default_list_columns
68
- [].freeze
69
- end
70
-
71
- def formatter
72
- @formatter
73
- end
74
-
75
- def init_formatter(object)
76
- return @formatter if @formatter
77
-
78
- if entity
79
- begin
80
- formatter_klass = "#{entity}Formatter".constantize
81
- rescue NameError
82
- end
83
- end
84
-
85
- formatter_klass ||= EasyEntityFormatter
86
- @formatter = formatter_klass.new(object)
87
- end
88
-
89
- def entity
90
- self.class.queried_class
91
- end
92
-
93
- def entity_scope
94
- if !@entity_scope.nil?
95
- @entity_scope
96
- elsif entity.respond_to?(:visible)
97
- entity.visible
98
- else
99
- entity
100
- end
101
- end
102
-
103
- def set_entity_scope(entity, reference_collection = nil)
104
- return nil if entity.nil? || reference_collection.nil?
105
-
106
- @entity_scope = entity.send(reference_collection.to_sym)
107
-
108
- self.filters = {}
109
-
110
- @entity_scope
111
- end
112
-
113
- def create_entity_scope(options={})
114
- scope = entity_scope.where(statement)
115
-
116
- includes = default_find_include.dup
117
- includes.concat(Array.wrap(options[:includes]))
118
-
119
- preload = default_find_preload.dup
120
- preload.concat(Array.wrap(options[:preload]))
121
-
122
- joins = default_find_joins.dup
123
- joins.concat(Array.wrap(options[:joins]))
124
-
125
- filters.keys.each do |filter|
126
- f = available_filters[filter]
127
- next if f.blank?
128
-
129
- includes.concat(Array.wrap(f[:includes])) if f[:includes]
130
- joins.concat(Array.wrap(f[:joins])) if f[:joins]
131
- end if filters
132
-
133
- columns.each do |c|
134
- includes.concat(Array.wrap(c.includes)) if c.includes
135
- joins.concat(Array.wrap(c.joins)) if c.joins
136
- preload.concat(Array.wrap(c.preload)) if c.preload
137
- end
138
-
139
- if project
140
- includes << :project
141
- end
142
-
143
- includes.uniq!
144
- joins.uniq!
145
- preload.uniq!
146
-
147
- scope.includes(includes).references(includes).joins(joins).preload(preload)
148
- end
149
-
150
- def entities(options={})
151
- create_entity_scope(options).order(options[:order]).to_a
152
- end
153
-
154
- def add_available_column(name, options={})
155
- @available_columns ||= []
156
-
157
- @available_columns << QueryColumn.new(name.to_sym, options)
158
- end
159
-
160
- def to_partial_path
161
- 'easy_queries/index'
162
- end
163
-
164
- def default_columns_names
165
- default_list_columns
166
- end
167
-
168
- def queried_table_name
169
- entity.table_name
170
- end
171
-
172
- end
173
-
174
- end
175
-
176
- class EasyQueryAdapter < Query
177
- end
178
-
179
- if Redmine::Plugin.installed?(:easy_extensions)
180
- # EasyQuery exist
181
- else
182
- QueryColumn.send(:include, RedmineExtensions::QueryColumnAdapter)
183
- RedmineExtensions::PatchManager.register_model_patch('Query', "RedmineExtensions::QueryAdapter")
184
- EasyQuery = EasyQueryAdapter
185
- end