egov_utils 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locales/cs.yml +2 -0
- data/lib/bootstrap_form/check_box_patch.rb +2 -2
- data/lib/bootstrap_form/custom_file_field.rb +8 -3
- data/lib/egov_utils/engine.rb +4 -0
- data/lib/egov_utils/version.rb +1 -1
- data/vendor/assets/stylesheets/egov_utils/_bootstrap_variables.scss.erb +3 -10
- metadata +34 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33db3e5ccbe46317e0a1e9803ab4c5eb8ef883639afbba9ace99a51f50c503b4
|
4
|
+
data.tar.gz: a076d1f3de491372de23ed2bcbfc7625a968ec814ece0a6bdecbd863bff70959
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ebe29ad9fa58d6f45c3334e0abfaf6dffabe4f16da20e13f33b3d26130b783db92c9700923b83b55ad2a772fd640a2b544514b9184b7e4df6ba80d0fa6f0697
|
7
|
+
data.tar.gz: cfd919066d507e6506021b072bc91fa8a32040ea3402c7985c4acd1e4a3c38c20bc86e7ad7849b1eeceb1836dbcc5b017929bb1497a534b02234f6e672ac5acb
|
data/config/locales/cs.yml
CHANGED
@@ -41,6 +41,7 @@ cs:
|
|
41
41
|
label_ldap: LDAP
|
42
42
|
label_search: Vyhledat
|
43
43
|
label_delete: Smazat
|
44
|
+
label_ok: OK
|
44
45
|
label_actions: Akce
|
45
46
|
label_add_group_member: Přidat uživatele
|
46
47
|
|
@@ -49,6 +50,7 @@ cs:
|
|
49
50
|
common_labels:
|
50
51
|
new_record: "Nový %{model}"
|
51
52
|
notice_saved: "%{model} uložen"
|
53
|
+
notice_destroyed: "%{model} smazán"
|
52
54
|
|
53
55
|
|
54
56
|
models: &my_models
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module BootstrapForm
|
2
2
|
module CheckBoxPatch
|
3
3
|
|
4
|
-
# TODO:
|
4
|
+
# TODO: check upstream - it is on master on 29-1-2018 - only required is not there
|
5
5
|
def check_box(name, options = {}, checked_value = "1", unchecked_value = "0", &block)
|
6
6
|
options = options.symbolize_keys!
|
7
7
|
check_box_options = options.except(:label, :label_class, :wrapper_class, :help, :inline)
|
@@ -36,7 +36,7 @@ module BootstrapForm
|
|
36
36
|
label_class = " #{label_class}" if label_class
|
37
37
|
label(label_name, html, class: "checkbox-inline#{disabled_class}#{label_class}")
|
38
38
|
else
|
39
|
-
wrapper_class = ['form-
|
39
|
+
wrapper_class = ['form-check', options[:wrapper_class]]
|
40
40
|
wrapper_class << error_class if has_error?(name)
|
41
41
|
wrapper_class = wrapper_class.compact.join(' ')
|
42
42
|
content_tag(:div, class: "#{wrapper_class}#{disabled_class}") do
|
@@ -1,12 +1,17 @@
|
|
1
1
|
module BootstrapForm
|
2
2
|
module CustomFileField
|
3
3
|
|
4
|
+
# Give :choose_label as a option for changing the langfile default.
|
4
5
|
def custom_file_field(name, *args)
|
5
6
|
options = args.extract_options!.symbolize_keys!
|
6
7
|
args << options
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
|
9
|
+
form_group_builder(name, options) do
|
10
|
+
content_tag('div', class: 'custom-file') do
|
11
|
+
control = file_field_without_bootstrap(name, options.merge(class: 'custom-file-input'))
|
12
|
+
label = label(name, @template.t('bootstrap.file_input.placeholder', default: [options[:choose_label], 'Choose file'].compact), class: "custom-file-label")
|
13
|
+
concat(control).concat(label)
|
14
|
+
end
|
10
15
|
end
|
11
16
|
end
|
12
17
|
|
data/lib/egov_utils/engine.rb
CHANGED
data/lib/egov_utils/version.rb
CHANGED
@@ -1,12 +1,5 @@
|
|
1
1
|
$custom-file-text: (
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<% end %>
|
6
|
-
),
|
7
|
-
button-label: (
|
8
|
-
<% I18n.available_locales.each do |locale| %>
|
9
|
-
'<%= locale %>': "<%= I18n.t('bootstrap.file_input.button_label', locale: locale, default: 'Browse') %>",
|
10
|
-
<% end %>
|
11
|
-
)
|
2
|
+
<% I18n.available_locales.each do |locale| %>
|
3
|
+
'<%= locale %>': "<%= I18n.t('bootstrap.file_input.button_label', locale: locale, default: 'Browse') %>",
|
4
|
+
<% end %>
|
12
5
|
);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egov_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.1
|
33
|
+
version: '3.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.1
|
40
|
+
version: '3.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: activeresource
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0
|
47
|
+
version: '5.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0
|
54
|
+
version: '5.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: haml
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,49 +95,63 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '3.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: net-ldap
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '0.16'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '0.16'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: settingslogic
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '2.0'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '2.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: audited
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '4.4'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '4.4'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: paranoia
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '2.4'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '2.4'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: cancancan
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - "~>"
|
@@ -151,19 +165,19 @@ dependencies:
|
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '2.0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
168
|
+
name: request_store_rails
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: '
|
173
|
+
version: '1.0'
|
160
174
|
type: :runtime
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: '
|
180
|
+
version: '1.0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: jquery-rails
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|