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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf1f2c458c8bf5227d929dfeff97a5d824671a2e
4
- data.tar.gz: 9ec12c869d0b7ff00b2bda0d45d37a7b1f371ceb
3
+ metadata.gz: 81f91096391decad0088cb36a6242442bd3ac138
4
+ data.tar.gz: 4095681d0e312ef4d79ab1d0b0c8f182b5c54126
5
5
  SHA512:
6
- metadata.gz: 61394ed77de656deb18da9c45f85991baa65b03d67e4ea297ab87c240cc6f06e98511751c384dd2e6dddd9ff574bf35b1cbeb2c8d8a2a5b864ebe8429cb2d484
7
- data.tar.gz: 84d63bc16b071b8c57ca45d467f649a2a6f5ed8e23152f671d812232794f7ad9854e7a0f9eef86dee16e3eb1084de342243c2a5ab754b19b9cbece24fd946ec6
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 |= %w(USD EUR GBP RUB CHF)
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
@@ -1,3 +1,3 @@
1
1
  module RedmineCrm
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.21"
3
3
  end
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.20
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-13 00:00:00.000000000 Z
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