adminpanel 2.3.0 → 2.3.1

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: 123fbcbcae72b11036670a7b18cfb0c3d440f087
4
- data.tar.gz: c359b05e6b9ede282d438bbec3b62f66f7ac33a6
3
+ metadata.gz: 1417bec9885c7f685524fceea628b7c79865ae67
4
+ data.tar.gz: 9c53619401e07fea797f1967059d8373dc8842af
5
5
  SHA512:
6
- metadata.gz: 68a5c8063b763d66909ff3c7b2afc375eae0a5af9c7d5434a43a01b5a024b2fa2d49cc79696a2096cfc162babe59381464bb999acafa893731e39615f3eaadd4
7
- data.tar.gz: 870f5a836d674083e4ca78b6fcdf09263f861ab22a7af6ad58fe743ca3bd34f803257d2e42bfb2c6872d8ed6cc9fff9506a8afcd40b9d0c13da9cb5ff8a98d28
6
+ metadata.gz: b4f9aa5c9059bbd9752fdf286c48d513551e1491faf8e608e72a8465d4e76b7653b5f5905cb3c76ea030848440626ab5836d24755588af0d13581896c1c8c660
7
+ data.tar.gz: 0c78dfe91781b13aa9e70677d24b3f87ef80347546659e9b72c573af48654c19dbfb88d610230a9302d37b2690aacaa1ea7cee6ae3fae612e7819894695a6595
data/.travis.yml CHANGED
@@ -8,4 +8,4 @@ sudo: false
8
8
  cache: bundler
9
9
 
10
10
  env:
11
- - RAILS=4.2.0.rc3
11
+ - RAILS=4.2.0
data/CONTRIBUTING.md CHANGED
@@ -7,16 +7,19 @@ Consider starting the commit message with an applicable emoji:
7
7
  * :fire:`:fire:` when removing code or files
8
8
  * :green_heart:`:green_heart:` when fixing the CI build
9
9
  * :white_check_mark:`:white_check_mark:` when adding tests
10
+ * :arrow_up: `:arrow_up:` when upgrading dependencies
11
+ * :arrow_down: `:arrow_down:` when downgrading dependencies
10
12
 
11
- Favor single quotes when not concatenating, double quotes are prefered when concatenating, escaping characters or using a single quote in the string:
13
+ Favor single quotes when not concatenating, double quotes are prefered when
14
+ concatenating, escaping characters or using a single quote in the string:
12
15
 
13
16
  Single Quotes:
14
- `puts 'hello world'`
17
+ `puts 'hello adminpanel'`
15
18
  Double Quotes:
16
- ```
19
+ ```ruby
17
20
  h = 'hello'
18
- w = 'world'
19
- puts "#{h}, #{w}"
21
+ a = 'adminpanel'
22
+ puts "#{h}, #{a}"
20
23
  puts "\n hi"
21
24
  puts "it's 6 am"
22
25
  ```
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Jose Ramon Camacho
1
+ Copyright (c) 2015 Jose Ramon Camacho
2
2
 
3
3
  MIT License
4
4
 
@@ -10,6 +10,7 @@ module Adminpanel
10
10
  accepts_nested_attributes_for relation, allow_destroy: true
11
11
  end
12
12
 
13
+ # implementing cache by default.
13
14
  def belongs_to(name, scope = nil, options = {})
14
15
  super(name, scope, options.reverse_merge!({touch: true}))
15
16
  end
@@ -18,10 +19,18 @@ module Adminpanel
18
19
  []
19
20
  end
20
21
 
22
+ # The name that is going to be shown in the new button and that is going
23
+ # to be pluralized (if not overwritten) to generate collection_name
21
24
  def display_name
22
25
  'please overwrite self.display_name'
23
26
  end
24
27
 
28
+ # The word that is going to be shown in the side menu, routes and
29
+ # breadcrumb.
30
+ def collection_name
31
+ display_name.pluralize(I18n.default_locale)
32
+ end
33
+
25
34
  def get_attribute_label(field)
26
35
  form_attributes.each do |attribute|
27
36
  attribute.each do |name, properties|
@@ -96,7 +105,7 @@ module Adminpanel
96
105
  end
97
106
 
98
107
  def routes_options
99
- { path: display_name.pluralize(I18n.default_locale).parameterize }
108
+ { path: collection_name.parameterize }
100
109
  end
101
110
 
102
111
  def has_route?(route)
@@ -3,7 +3,7 @@
3
3
  I18n.t('action.update', name: @resource_instance.name)
4
4
  ) -%>
5
5
  <% breadcrumb_add(
6
- @model.display_name.capitalize.pluralize(I18n.default_locale),
6
+ @model.collection_name,
7
7
  {
8
8
  controller: params[:controller],
9
9
  action: 'index'
@@ -1,4 +1,4 @@
1
- <% provide(:page_title, @model.display_name.pluralize(I18n.default_locale)) -%>
1
+ <% provide(:page_title, @model.collection_name) -%>
2
2
  <div class="row-fluid">
3
3
  <%= render 'adminpanel/shared/new_resource_button' %>
4
4
  </div>
@@ -7,7 +7,7 @@
7
7
  <div class="widget-header">
8
8
  <%= content_tag(:i, nil, class: "fa fa-#{@model.icon}") %>
9
9
  <h5>
10
- <%= @model.display_name.pluralize(I18n.default_locale) %>
10
+ <%= @model.collection_name %>
11
11
  </h5>
12
12
  </div>
13
13
  <div class="widget-body">
@@ -3,7 +3,7 @@
3
3
  I18n.t('action.create', resource: @model.display_name.capitalize)
4
4
  ) -%>
5
5
  <% breadcrumb_add(
6
- @model.display_name.capitalize.pluralize(I18n.default_locale),
6
+ @model.collection_name,
7
7
  {
8
8
  controller: params[:controller],
9
9
  action: 'index'
@@ -1,6 +1,6 @@
1
1
  <% provide(:page_title, I18n.t('action.view', resource: @model.display_name.capitalize)) -%>
2
2
  <% breadcrumb_add(
3
- @model.display_name.capitalize.pluralize(I18n.default_locale),
3
+ @model.collection_name,
4
4
  {
5
5
  controller: params[:controller],
6
6
  action: 'index'
@@ -18,11 +18,17 @@
18
18
  <div class="accordion-heading">
19
19
  <%= link_to(
20
20
  [route_symbol(resource.to_s)],
21
- data: { no_transition_cache: true },
21
+ data: {
22
+ no_transition_cache: true
23
+ },
22
24
  class: "accordion-toggle accordion-navigation #{is_current_section?(resource_class.display_name)} spinner-link"
23
25
  ) do %>
24
- <%= content_tag :i, nil, class: "fa fa-#{resource_class.icon}" %>
25
- <%= resource_class.display_name.pluralize(I18n.default_locale) %>
26
+ <%= content_tag(
27
+ :i,
28
+ nil,
29
+ class: "fa fa-#{resource_class.icon}"
30
+ ) %>
31
+ <%= resource_class.collection_name %>
26
32
  <% end %>
27
33
  </div>
28
34
  </div>
@@ -62,8 +62,8 @@ en:
62
62
  actions: 'Actions'
63
63
  position: 'Position'
64
64
  action:
65
- add: 'Add'
66
- create: 'Create'
65
+ add: 'Add %{resource}'
66
+ create: 'Create %{resource}'
67
67
  close: 'Close'
68
68
  show: 'Show'
69
69
  submitting: 'Submitting...'
@@ -1,3 +1,3 @@
1
1
  module Adminpanel
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adminpanel
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Ramon Camacho