adminpanel 1.2.10 → 1.2.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,11 @@ module Adminpanel
6
6
  string.split.each do |word|
7
7
  case(word.last)
8
8
  when 'a', 'e', 'i', 'o', 'u', 'c'
9
- pluralized_string = "#{pluralized_string}#{word}s "
9
+ if word[-2,1] == 'd' #if the second last letter is d...
10
+ pluralized_string = "#{pluralized_string}#{word} "
11
+ else
12
+ pluralized_string = "#{pluralized_string}#{word}s "
13
+ end
10
14
  when 'b', 'r'
11
15
  pluralized_string = "#{pluralized_string}#{word}es "
12
16
  when 'z'
@@ -23,7 +23,7 @@
23
23
  :i,
24
24
  nil,
25
25
  :class => resource_class.icon) +
26
- content_tag(:span," #{resource_class.display_name}"),
26
+ content_tag(:span," #{pluralize_es(resource_class.display_name)}"),
27
27
  [route_symbol(resource.to_s)],
28
28
  :class => "accordion-toggle b_99FFCC
29
29
  #{is_current_section?(resource_class.display_name)}"
@@ -46,6 +46,8 @@
46
46
  <td>
47
47
  <%= parent_object_name(member, properties["model"]) %>
48
48
  </td>
49
+ <% elsif properties["type"] == "boolean" %>
50
+ <td><%= member.send(attribute) ? I18n.t('action.is_true') : I18n.t('action.is_false') %></td>
49
51
  <% elsif properties["type"] != "adminpanel_file_field" && properties["type"] != "has_many" %>
50
52
  <td><%= member.send(attribute) -%></td>
51
53
  <% end %>
@@ -40,6 +40,8 @@
40
40
  <ul>
41
41
  <%= image_tag(resource.send("#{attribute}_url", :thumb)) %>
42
42
  </ul>
43
+ <% elsif properties["type"] == "boolean" %>
44
+ <td><%= resource.send(attribute) ? I18n.t('action.is_true') : I18n.t('action.is_false') %></td>
43
45
  <% else %>
44
46
  <%= resource.send(attribute) -%>
45
47
  <% end %>
@@ -53,6 +53,8 @@ es:
53
53
  delete: "Eliminar"
54
54
  view: "Ver"
55
55
  delete confirmation: "Estás seguro que desea eliminar?"
56
+ is_true: 'Sí'
57
+ is_false: 'No'
56
58
  authentication:
57
59
  welcome: "Bienvenido! Inicia Sesión"
58
60
  signin_error: "Correo y/o Contraseña incorrecta."
@@ -1,3 +1,3 @@
1
1
  module Adminpanel
2
- VERSION = "1.2.10"
2
+ VERSION = "1.2.11"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adminpanel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 10
10
- version: 1.2.10
9
+ - 11
10
+ version: 1.2.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jose Ramon Camacho