query_report 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
|
|
2
2
|
<table class="<%= QueryReport.config.record_table_class %>" cellpadding="0" cellspacing="0">
|
3
3
|
<thead>
|
4
4
|
<% report.columns.each do |column| %>
|
5
|
-
<th><%= column.sortable? ? sort_link(report.search, column.name, {}, remote: @remote) : column.
|
5
|
+
<th><%= column.sortable? ? sort_link(report.search, column.name, {}, remote: @remote) : column.humanize %></th>
|
6
6
|
<% end %>
|
7
7
|
</thead>
|
8
8
|
|
@@ -9,5 +9,5 @@
|
|
9
9
|
<%= hidden_field_tag :subject %>
|
10
10
|
<%= hidden_field_tag :message %>
|
11
11
|
<%= hidden_field_tag :target_dom_id, @target_dom_id %>
|
12
|
-
<%= f.submit '
|
12
|
+
<%= f.submit t('query_report.labels.search'), :class => QueryReport.config.search_button_class, :onclick => "$('#{@target_dom_id} #send_as_email').val(0);" %>
|
13
13
|
<% end %>
|
@@ -6,8 +6,12 @@
|
|
6
6
|
module QueryReport
|
7
7
|
module PaginateModule
|
8
8
|
def apply_pagination(query, params)
|
9
|
-
|
10
|
-
|
9
|
+
if paginate?
|
10
|
+
page_method_name = Kaminari.config.page_method_name
|
11
|
+
query.send(page_method_name, params[:page])
|
12
|
+
else
|
13
|
+
query
|
14
|
+
end
|
11
15
|
end
|
12
16
|
end
|
13
17
|
end
|
data/lib/query_report/report.rb
CHANGED
@@ -42,6 +42,11 @@ module QueryReport
|
|
42
42
|
@columns.any?(&:has_total?)
|
43
43
|
end
|
44
44
|
|
45
|
+
def paginate?
|
46
|
+
return true if @options[:paginate].nil?
|
47
|
+
@options[:paginate]
|
48
|
+
end
|
49
|
+
|
45
50
|
# to support the helper methods
|
46
51
|
def method_missing(meth, *args, &block)
|
47
52
|
if @template.respond_to?(meth)
|
data/lib/query_report/version.rb
CHANGED