redmine_crm 0.0.20 → 0.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/CHANGELOG +4 -0
- data/lib/redmine_crm/currency/formatting.rb +2 -1
- data/lib/redmine_crm/money_helper.rb +6 -6
- data/lib/redmine_crm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81f91096391decad0088cb36a6242442bd3ac138
|
4
|
+
data.tar.gz: 4095681d0e312ef4d79ab1d0b0c8f182b5c54126
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 971e7b697e2a3f57b9933ccdb37ba19b08cc88a3996bab34a2679fc4016d2f16b3cba2fd3f09869b65e7d71f55f6212fc1c93579b4d117d0f12c4608863b1b36
|
7
|
+
data.tar.gz: 0f5ea97bc5eae151e18f726ab48562641d7db6d93ecd1e6acbae52f1a3ff941fc23265d19aa47f3ecd2ae868d1d2090a1be227a0f93e8cb552f7e015aa70389f
|
data/doc/CHANGELOG
CHANGED
@@ -3,6 +3,10 @@
|
|
3
3
|
Redmine crm gem - general functions for plugins (tags, vote, viewing, currency)
|
4
4
|
Copyright (C) 2011-2015 RedmineCRM
|
5
5
|
http://www.redminecrm.com/
|
6
|
+
== 2015-10-29 v0.0.21
|
7
|
+
|
8
|
+
* Added space for CHF in currency format
|
9
|
+
* Changed collection_for_currencies_select helper for major currencies
|
6
10
|
|
7
11
|
== 2015-10-29 v0.0.20
|
8
12
|
|
@@ -92,7 +92,6 @@ module RedmineCrm
|
|
92
92
|
|
93
93
|
if symbol_value && !symbol_value.empty?
|
94
94
|
symbol_value = "<span class=\"currency_symbol\">#{symbol_value}</span>" if rules[:html_wrap_symbol]
|
95
|
-
|
96
95
|
formatted = if symbol_position == :before
|
97
96
|
symbol_space = rules[:symbol_before_without_space] === false ? " " : ""
|
98
97
|
"#{sign_before}#{symbol_value}#{symbol_space}#{sign}#{formatted}"
|
@@ -151,6 +150,8 @@ module RedmineCrm
|
|
151
150
|
rules[:symbol] = "円" unless rules[:symbol] == false
|
152
151
|
rules[:symbol_position] = :after
|
153
152
|
rules[:symbol_after_without_space] = true
|
153
|
+
elsif currency.iso_code == "CHF"
|
154
|
+
rules[:symbol_before_without_space] = false
|
154
155
|
end
|
155
156
|
rules
|
156
157
|
end
|
@@ -30,10 +30,10 @@ module RedmineCrm
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
def collection_for_currencies_select(default_currency='USD')
|
34
|
-
currencies = []
|
33
|
+
def collection_for_currencies_select(default_currency = 'USD', major_currencies = %w(USD EUR GBP RUB CHF))
|
34
|
+
currencies = []
|
35
35
|
currencies << default_currency.to_s unless default_currency.blank?
|
36
|
-
currencies |=
|
36
|
+
currencies |= major_currencies
|
37
37
|
currencies.map do |c|
|
38
38
|
currency = RedmineCrm::Currency.find(c)
|
39
39
|
["#{currency.iso_code} (#{currency.symbol})", currency.iso_code] if currency
|
@@ -50,10 +50,10 @@ module RedmineCrm
|
|
50
50
|
|
51
51
|
def price_to_currency(price, currency="USD", options={})
|
52
52
|
return '' if price.blank?
|
53
|
-
|
53
|
+
|
54
54
|
currency = "USD" unless currency.is_a?(String)
|
55
55
|
currency = RedmineCrm::Currency.find(currency)
|
56
|
-
|
56
|
+
|
57
57
|
return RedmineCrm::Currency.format(price.to_f, currency, options)# if currency
|
58
58
|
price.to_s
|
59
59
|
end
|
@@ -64,4 +64,4 @@ end
|
|
64
64
|
|
65
65
|
unless ActionView::Base.included_modules.include?(RedmineCrm::MoneyHelper)
|
66
66
|
ActionView::Base.send(:include, RedmineCrm::MoneyHelper)
|
67
|
-
end
|
67
|
+
end
|
data/lib/redmine_crm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RedmineCRM
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Common libraries for RedmineCRM plugins for Redmine. Requered Redmine
|
14
14
|
from http://redmine.org
|