th_simple_admin_panel 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/helpers/simple_admin_panel/breadcrumb_helper.rb +9 -0
- data/app/views/layouts/simple_admin_panel/_breadcrumb.html.erb +4 -4
- data/lib/simple_admin_panel/controller_extensions.rb +1 -0
- data/lib/simple_admin_panel/engine.rb +2 -2
- data/lib/simple_admin_panel/version.rb +1 -1
- metadata +3 -3
- data/app/helpers/simple_admin_panel/application_helper.rb +0 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmM5ZmQzNTU5MTM2MzhiMDkzOWY5NzI4MmYyYTVmODZmZGNiMWRmYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWI1YmE5NTE1NDFkMzc0YzliZTBmYWNhZjgwMTFmZGZkZTg0YWQxYw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjRjNmVjYjlmOTJjMWM3M2JiMjBkOTE1MzMyNzIyYzRlMzljNzBlNjRjZTFj
|
10
|
+
MzgzNjYzNjVkMWUxNjExMTVlOWQwZGYwZTg4NWFkZTUyYWIzM2Y1YmM4OWYw
|
11
|
+
MDZkYmRhMDEyMGM4NWM4MGNhMGZjOWI4MzNiMzMzOWY0NDZlMzE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDA3OTdiMjQyOThmZWYxZGM2Y2RkYzkwZGQ5NjYzNDI5YTQxNDZiZGZlNjhi
|
14
|
+
ZDNlMTViMTcyOWMxZDY2MmJjYWZlM2UxZDFiNmQ1YTI5MmNlMTIzZDM5M2Qz
|
15
|
+
NzgzZTYxNGExOGM1N2JiZWU4ODFlNjJiZjBmNmFkZDI5NWE0Y2I=
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<% association_chain.each do |association_item| %>
|
6
6
|
<li><%= link_to association_item.class.model_name.human(count: 2), url_for(controller: association_item.class.model_name.underscore.pluralize, action: :index) %> <span class="divider">/</span></li>
|
7
|
-
<li><%= link_to association_item
|
7
|
+
<li><%= link_to label_for_resource(association_item), url_for(controller: association_item.class.model_name.underscore.pluralize, action: :show, id: association_item.id) %> <span class="divider">/</span></li>
|
8
8
|
<% end %>
|
9
9
|
|
10
10
|
<% if %w(new create).include?(params[:action]) %>
|
@@ -17,9 +17,9 @@
|
|
17
17
|
<% end %>
|
18
18
|
<% elsif params[:action] == "show" %>
|
19
19
|
<li><%= link_to resource_class.model_name.human(count: 2), collection_path %> <span class="divider">/</span></li>
|
20
|
-
<li class="active"><%= resource
|
20
|
+
<li class="active"><%= label_for_resource resource %></li>
|
21
21
|
<% if controller.respond_to?(:destroy) && can?(:destroy, resource) %>
|
22
|
-
<li class="pull-right"><%= link_to icon("trash icon-white") + " Verwijderen", resource_path, class: "btn btn-mini btn-danger", method: :delete, confirm: "Are you sure to delete #{resource_class.model_name.human(count: 1)} '#{resource
|
22
|
+
<li class="pull-right"><%= link_to icon("trash icon-white") + " Verwijderen", resource_path, class: "btn btn-mini btn-danger", method: :delete, confirm: "Are you sure to delete #{resource_class.model_name.human(count: 1)} '#{label_for_resource resource}'?" %></li>
|
23
23
|
<% end %>
|
24
24
|
<% if controller.respond_to?(:edit) && can?(:edit, resource) %>
|
25
25
|
<li class="pull-right"><%= link_to icon("edit icon-white") + " Wijzigen", edit_resource_path, class: "btn btn-mini btn-info" %></li>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
<% else %>
|
28
28
|
<li><%= link_to resource_class.model_name.human(count: 2), collection_path %> <span class="divider">/</span></li>
|
29
29
|
<% if params[:id].present? %>
|
30
|
-
<li><%= link_to_if controller.respond_to?(:show) && can?(:show, resource), resource
|
30
|
+
<li><%= link_to_if controller.respond_to?(:show) && can?(:show, resource), label_for_resource(resource), resource_path %> <span class="divider">/</span></li>
|
31
31
|
<% end %>
|
32
32
|
<li class="active"><%= t(".actions.#{resource_class.model_name.underscore}.#{params[:action]}", default: t(".actions.#{params[:action]}")) %></li>
|
33
33
|
<% end %>
|
@@ -3,6 +3,7 @@ module SimpleAdminPanel::ControllerExtensions
|
|
3
3
|
|
4
4
|
included do
|
5
5
|
layout "simple_admin_panel/application"
|
6
|
+
helper SimpleAdminPanel::BreadcrumbHelper
|
6
7
|
with_role :admin if self.is_a? InheritedResources::Base
|
7
8
|
before_filter :authenticate_user!
|
8
9
|
before_filter :require_admin
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: th_simple_admin_panel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Hinloopen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -64,7 +64,7 @@ files:
|
|
64
64
|
- app/assets/stylesheets/shared/layout.css.scss
|
65
65
|
- app/assets/stylesheets/shared.css.scss
|
66
66
|
- app/controllers/simple_admin_panel/application_controller.rb
|
67
|
-
- app/helpers/simple_admin_panel/
|
67
|
+
- app/helpers/simple_admin_panel/breadcrumb_helper.rb
|
68
68
|
- app/views/layouts/simple_admin_panel/_alert.html.erb
|
69
69
|
- app/views/layouts/simple_admin_panel/_breadcrumb.html.erb
|
70
70
|
- app/views/layouts/simple_admin_panel/_navbar.html.erb
|