active_list 6.7.1 → 6.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f04ac402de60ff7c10f8a6c3c2b49e84a45a352
|
4
|
+
data.tar.gz: 57d4ec035fb962b0d16170099734c47c64ba16de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0285fb75e60c5ef968bd7a729f5f3be10e8abe9f581a1fe78461d1ef24180d1ffdd6f16ef323d8091c3cf0ce49556a0e4587462bfd9a10b171283f5221d4107
|
7
|
+
data.tar.gz: 7193c02848da391970945d53a3164c1100154594da1fb4810ffc2a5cf2e30a0a94b3f597b02223d137746ecef83d58b25cd0ca1fa9cf988a7805d65a4287f7c6
|
@@ -293,7 +293,11 @@ module ActiveList
|
|
293
293
|
# Produces the code to create the header line using top-end menu for columns
|
294
294
|
# and pagination management
|
295
295
|
def header_code
|
296
|
-
code =
|
296
|
+
code = ''
|
297
|
+
if table.columns.any? { |column| column.is_a?(ActiveList::Definition::DataColumn) && column.options[:currency] }
|
298
|
+
code << "currency = Nomen::Currencies[#{generator.records_variable_name}.first.currency] if #{generator.records_variable_name}.any?\n"
|
299
|
+
end
|
300
|
+
code << "'<thead><tr>"
|
297
301
|
code << "<th class=\"list-selector\"></th>" if table.selectable?
|
298
302
|
for column in table.columns
|
299
303
|
next if column.is_a?(ActiveList::Definition::ActionColumn) && !column.use_single?
|
@@ -302,8 +306,8 @@ module ActiveList
|
|
302
306
|
code << " data-list-column-sort=\"'+(#{var_name(:params)}[:sort] != '#{column.sort_id}' ? 'asc' : #{var_name(:params)}[:dir] == 'asc' ? 'desc' : 'asc')+'\"" if column.sortable?
|
303
307
|
code << " data-list-column-computation=\"#{column.computation_method}\"" if column.computable?
|
304
308
|
if column.is_a?(ActiveList::Definition::DataColumn) && column.options[:currency]
|
305
|
-
code << " data-list-column-currency-symbol=\"' +
|
306
|
-
code << " data-list-column-currency-precision=\"' +
|
309
|
+
code << " data-list-column-currency-symbol=\"' + (currency ? currency.symbol : '') + '\""
|
310
|
+
code << " data-list-column-currency-precision=\"' + (currency ? currency.precision.to_s : '') + '\""
|
307
311
|
end
|
308
312
|
code << " class=\"#{column_classes(column, true, true)}\""
|
309
313
|
code << '>'
|
data/lib/active_list/version.rb
CHANGED