agilibox 1.0.2 → 1.0.3

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: a14a11da198f153509c6e6af15d96ad168a07eba
4
- data.tar.gz: 5c1f8a8e56ad1bfd3b41b5a39e39acebd521d82e
3
+ metadata.gz: f7f739bd49f416e9f7d8a573c539df4789924c07
4
+ data.tar.gz: 1b2117cc0abb18f89630d9e6cd3227867f4e0fe7
5
5
  SHA512:
6
- metadata.gz: 60900886cfe07983d2e3c03c57d6f49143e05b1d62570d278d1d603b5254920a3181bf6ee44d8893880439b3074efb97f88dafd140997c74466cdf2831925bc4
7
- data.tar.gz: c57c664537f7583547eb4fe543aae666d8d25f66551896be12c40151d226a5845684ba65c864afac656eacfdcf6f5b47b5c950924311a430bfee0e17a7a1f8cc
6
+ metadata.gz: 823620225894206e08757a10b9f1473ed3a6bdf13bcf1381430c3a5edd9b61e9a41ad927b6a8bc2c14146b98d652ee5f04a5dae030724095779e99e96eafe215
7
+ data.tar.gz: 53b80b2fc9f2a9e6a0ac819de2b2f1bf04a06d749f865078d039fc0b08f71ddc8788f3efc6b6767fd00557cba51a54d4881c119022fe2184cf6db279ffc906a1
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.3
4
+
5
+ - Add `ta` (translate action) helper
6
+ - Add `blank` css class to `info` helper
7
+ - Add autocomplete.coffee
8
+
3
9
  ## 1.0.2
4
10
 
5
11
  - Button helper changes
@@ -0,0 +1,2 @@
1
+ $(document).on "turbolinks:load", ->
2
+ $("select.select2").select2()
@@ -8,6 +8,7 @@ module Agilibox::AllHelpers
8
8
  include Agilibox::RoutesHelper
9
9
  include Agilibox::SortingHelper
10
10
  include Agilibox::TextHelper
11
+ include Agilibox::I18nHelper
11
12
 
12
13
  extend self
13
14
  end
@@ -0,0 +1,5 @@
1
+ module Agilibox::I18nHelper
2
+ def ta(action)
3
+ t("actions.#{action}")
4
+ end
5
+ end
@@ -99,12 +99,19 @@ module Agilibox::TextHelper
99
99
  value = l(value) if value.is_a?(Date)
100
100
  value = value.to_s
101
101
 
102
+
102
103
  html_label = content_tag(:strong, class: "info-label") { label }
103
104
  span_css_class = "info-value #{object_type}-#{attribute}"
104
105
  html_value = content_tag(:span, class: span_css_class) { value }
105
106
  separator_html = content_tag(:span, class: "info-separator") { separator }
106
107
 
107
- content_tag(tag, class: "info") do
108
+ if value.blank?
109
+ container_css_class = "info blank"
110
+ else
111
+ container_css_class = "info"
112
+ end
113
+
114
+ content_tag(tag, class: container_css_class) do
108
115
  [html_label, separator_html, html_value].join.html_safe
109
116
  end
110
117
  end # def info
@@ -77,6 +77,7 @@ en:
77
77
  submit : "Submit"
78
78
  accept : "Accept"
79
79
  refuse : "Refuse"
80
+ show_more : "Show more"
80
81
 
81
82
  attributes: &attributes
82
83
  id : "Id"
@@ -85,6 +85,7 @@ fr:
85
85
  submit : "Soumettre"
86
86
  accept : "Accepter"
87
87
  refuse : "Refuser"
88
+ show_more : "Afficher plus"
88
89
 
89
90
  attributes: &attributes
90
91
  id : "Id"
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilibox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-03 00:00:00.000000000 Z
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n
@@ -36,6 +36,7 @@ files:
36
36
  - Rakefile
37
37
  - app/assets/config/agilibox_manifest.js
38
38
  - app/assets/javascripts/agilibox/all.coffee
39
+ - app/assets/javascripts/agilibox/autocomplete.coffee
39
40
  - app/assets/javascripts/agilibox/filters_date.coffee
40
41
  - app/assets/javascripts/agilibox/form_anchor_referer.coffee
41
42
  - app/assets/javascripts/agilibox/form_reset.coffee
@@ -62,6 +63,7 @@ files:
62
63
  - app/helpers/agilibox/button_helper.rb
63
64
  - app/helpers/agilibox/filters_helper.rb
64
65
  - app/helpers/agilibox/form_helper.rb
66
+ - app/helpers/agilibox/i18n_helper.rb
65
67
  - app/helpers/agilibox/link_helper.rb
66
68
  - app/helpers/agilibox/pagination_helper.rb
67
69
  - app/helpers/agilibox/routes_helper.rb