templus_models 3.0.9 → 3.0.10
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 +4 -4
- data/app/helpers/crud_helper.rb +2 -2
- data/app/helpers/search_helper.rb +2 -2
- data/app/views/crud/_records.html.erb +4 -4
- data/app/views/crud/_show.html.erb +1 -1
- data/app/views/crud/printing.pdf.erb +1 -1
- data/app/views/layouts/_menu_crud.html.erb +2 -2
- data/lib/templus_models/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e33084424f911dea9ac45f2cb2bb30f11fadd74
|
4
|
+
data.tar.gz: 10c67dd7009704c1c30d597760522a1eb3d51446
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea516b56ab9293307131f201cdd3ed655840790a887de435294d9a924b70034f430552d81bdbc5601ec152ec72ae163b0901cb83ca61ab7f99551f261196e9e8
|
7
|
+
data.tar.gz: bbf80c081f7d45735a93238abe1d4e50735958d3dc50f3372040a93a4a4db0f0a795a37ea472edbf71a4389c9b1d89f9708b1c64a522dcc12414ec199489927f
|
data/app/helpers/crud_helper.rb
CHANGED
@@ -129,7 +129,7 @@ module CrudHelper
|
|
129
129
|
if !field[:sf][:edit].nil? && !field[:sf][:edit] && !record.new_record?
|
130
130
|
elsif !field[:sf][:create].nil? && !field[:sf][:create] && record.new_record?
|
131
131
|
else
|
132
|
-
opts = field[:sf].merge(label: I18n.t(field[:sf][:label]))
|
132
|
+
opts = field[:sf].merge(label: I18n.t(field[:sf][:label], default: I18n.t("shared.#{field[:attribute]}")))
|
133
133
|
unless modelo.reflect_on_association(field[:attribute])
|
134
134
|
if modelo.new.send(field[:attribute]).class.to_s =~ /Uploader/ and f.object.send(field[:attribute]).present?
|
135
135
|
f.input field[:attribute], opts.merge(hint: "Arquivo Atual: #{f.object.send(field[:attribute]).file.filename}")
|
@@ -148,7 +148,7 @@ module CrudHelper
|
|
148
148
|
if field[:sf][:collection_if] and field[:sf][:collection_if].class == Proc
|
149
149
|
field[:sf][:collection] = f.instance_eval(&field[:sf][:collection_if])
|
150
150
|
end
|
151
|
-
opts = field[:sf].merge(label: I18n.t(field[:sf][:label]))
|
151
|
+
opts = field[:sf].merge(label: I18n.t(field[:sf][:label], default: I18n.t("shared.#{field[:attribute]}")))
|
152
152
|
unless modelo.reflect_on_association(field[:attribute])
|
153
153
|
if modelo.new.send(field[:attribute]).class.to_s =~ /Uploader/ and f.object.send(field[:attribute]).present?
|
154
154
|
f.input field[:attribute], opts.merge(hint: "Arquivo Atual: #{f.object.send(field[:attribute]).file.filename}")
|
@@ -26,8 +26,8 @@ module SearchHelper
|
|
26
26
|
modelo = Module.const_get(opts[:model])
|
27
27
|
name = opts[:full_name]
|
28
28
|
end
|
29
|
-
label = I18n.t("simple_form.labels.#{modelo.name.underscore}.#{name}")
|
30
|
-
label = I18n.t(opts[:label]) if opts[:label]
|
29
|
+
label = I18n.t("simple_form.labels.#{modelo.name.underscore}.#{name}", default: I18n.t("shared.#{name}"))
|
30
|
+
label = I18n.t(opts[:label], default: I18n.t("shared.#{name}")) if opts[:label]
|
31
31
|
|
32
32
|
@buffer << "<div class=\"form-group\">"
|
33
33
|
@buffer << raro_label(label,opts)
|
@@ -15,17 +15,17 @@
|
|
15
15
|
<th>
|
16
16
|
<% if att[:sort_field].present? %>
|
17
17
|
<% if att[:sort_field] == :false %>
|
18
|
-
<%= I18n.t(att[:label]) %>
|
18
|
+
<%= I18n.t(att[:label], default: I18n.t("shared.#{att[:attribute]}")) %>
|
19
19
|
<% else %>
|
20
|
-
<%= sort_link @q, att[:sort_field], I18n.t(att[:label]), {},data: {push: 'partial', target: "#form"}%>
|
20
|
+
<%= sort_link @q, att[:sort_field], I18n.t(att[:label], default: I18n.t("shared.#{att[:attribute]}")), {},data: {push: 'partial', target: "#form"}%>
|
21
21
|
<% end %>
|
22
22
|
<% else %>
|
23
|
-
<%= sort_link @q, att[:attribute], I18n.t(att[:label]), {},data: {push: 'partial', target: "#form"}%>
|
23
|
+
<%= sort_link @q, att[:attribute], I18n.t(att[:label], default: I18n.t("shared.#{att[:attribute]}")), {},data: {push: 'partial', target: "#form"}%>
|
24
24
|
<% end %>
|
25
25
|
</th>
|
26
26
|
<% end %>
|
27
27
|
<% if @crud_helper.view_action || @crud_helper.edit_action || @crud_helper.destroy_action || @crud_helper.actions.present? %>
|
28
|
-
<td><%= I18n.t("simple_form.index.options") %></td>
|
28
|
+
<td><%= I18n.t("simple_form.index.options", default: I18n.t("options")) %></td>
|
29
29
|
<% end %>
|
30
30
|
</tr>
|
31
31
|
</thead>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% next %>
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
14
|
-
<th><%= I18n.t(field[:sf][:label]) %></th>
|
14
|
+
<th><%= I18n.t(field[:sf][:label], default: I18n.t("shared.#{field[:attribute]}")) %></th>
|
15
15
|
|
16
16
|
<% if @model.columns_hash[field[:attribute].to_s].present? && [:date, :datetime].include?(@model.columns_hash[field[:attribute].to_s].type)%>
|
17
17
|
<% if field[:date_format].present?%>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
<% if field[:sf].present? && field[:sf][:label].present? %>
|
57
57
|
<th><%= field[:sf][:label].to_s.mb_chars.upcase.to_s %></th>
|
58
58
|
<% else %>
|
59
|
-
<th><%= I18n.t("simple_form.labels.#{@model.name.underscore}.#{field[:attribute]}") %></th>
|
59
|
+
<th><%= I18n.t("simple_form.labels.#{@model.name.underscore}.#{field[:attribute]}", default: I18n.t("shared.#{field[:attribute]}")) %></th>
|
60
60
|
<% end %>
|
61
61
|
|
62
62
|
<% if @model.columns_hash[field[:attribute].to_s].present? && [:date, :datetime].include?(@model.columns_hash[field[:attribute].to_s].type) %>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<%= menu_parent(raro_models, lista_menus_crud(raro_models), I18n.t("views.menu.
|
1
|
+
<%= menu_parent(raro_models, lista_menus_crud(raro_models), I18n.t("views.menu.cadastros"), 'fa fa-book', true) do %>
|
2
2
|
<% raro_models.each do |modelo| %>
|
3
3
|
<%= menu_crud_helper("#{modelo.name.underscore}_crud".camelize.constantize.title, modelo) %>
|
4
4
|
<% end %>
|
5
|
-
<% end %>
|
5
|
+
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: templus_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Sol
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -980,7 +980,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
980
980
|
version: '0'
|
981
981
|
requirements: []
|
982
982
|
rubyforge_project:
|
983
|
-
rubygems_version: 2.
|
983
|
+
rubygems_version: 2.6.8
|
984
984
|
signing_key:
|
985
985
|
specification_version: 4
|
986
986
|
summary: Easy CRUD generator for Rails Projects
|