templus_models 3.0.9 → 3.0.10

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: b531514ac31823cc29637db8216e63b519bb8cd0
4
- data.tar.gz: 48076b17649e28cdf40022c4e9c62da7825998ce
3
+ metadata.gz: 3e33084424f911dea9ac45f2cb2bb30f11fadd74
4
+ data.tar.gz: 10c67dd7009704c1c30d597760522a1eb3d51446
5
5
  SHA512:
6
- metadata.gz: a49da204233098191f6e4dcd499baa0f2583c17ac3fb0f9ff5256e9e721bf8873516e3e5236fb15f69546421facd17064f81f900398fe3c9bffb11c8e6d8c987
7
- data.tar.gz: 09c0e33ea8e3131230b5fcda03d1d7ad716367160efe509821507d5f4f7cf1dfcfd8c2be3f83ea27d505e871e2ae97a84ec51af1ebdfbbb1bbc8be36d9d813f3
6
+ metadata.gz: ea516b56ab9293307131f201cdd3ed655840790a887de435294d9a924b70034f430552d81bdbc5601ec152ec72ae163b0901cb83ca61ab7f99551f261196e9e8
7
+ data.tar.gz: bbf80c081f7d45735a93238abe1d4e50735958d3dc50f3372040a93a4a4db0f0a795a37ea472edbf71a4389c9b1d89f9708b1c64a522dcc12414ec199489927f
@@ -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.entitys"), 'fa fa-book', true) do %>
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 %>
@@ -1,3 +1,3 @@
1
1
  module TemplusModels
2
- VERSION = "3.0.9"
2
+ VERSION = "3.0.10"
3
3
  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.9
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-04-12 00:00:00.000000000 Z
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.5.1
983
+ rubygems_version: 2.6.8
984
984
  signing_key:
985
985
  specification_version: 4
986
986
  summary: Easy CRUD generator for Rails Projects