diff --git a/app/controllers/admin/authorizations_controller.rb b/app/controllers/admin/authorizations_controller.rb
index 07b0de7f8..046812424 100644
--- a/app/controllers/admin/authorizations_controller.rb
+++ b/app/controllers/admin/authorizations_controller.rb
@@ -136,7 +136,7 @@ class Admin::AuthorizationsController < OrbitBackendController
@module_app = ModuleApp.first(conditions: {:key => params[:module]} ) if params[:module]
@type = params[:type].underscore if params[:type]
if @type
- @klass = @type.classify.constantize
+ @klass = @type.classify.constantize rescue nil
@object = @klass.find(params[:id]) rescue nil
end
end
diff --git a/app/helpers/orbit_backend_helper.rb b/app/helpers/orbit_backend_helper.rb
index b5c8eca22..aa8075c40 100644
--- a/app/helpers/orbit_backend_helper.rb
+++ b/app/helpers/orbit_backend_helper.rb
@@ -345,4 +345,42 @@ module OrbitBackendHelper
end
end
+ # ===============================================================
+ # Breadcrumbs
+ # ===============================================================
+
+ def back_end_breadcrumb
+ res = ''
+ divider = "/"
+ res << "
<%= link_to t(:module_authorization), admin_authorizations_path(@module_app.key) %>
<% @module_app.authorizable_models.each do |authorizable_model| %>
- <%= link_to (authorizable_model.eql?('Category') ? t(:category_auth) : "#{authorizable_model.underscore.humanize} #{t(:authorization_)}"), admin_authorizations_path(@module_app.key, type: authorizable_model) %>
+ <%= link_to (authorizable_model.eql?('Category') ? t(:category_auth) : "#{authorizable_model.underscore.humanize.capitalize} #{t(:authorization_)}"), admin_authorizations_path(@module_app.key, type: authorizable_model.downcase) %>
<% end %>
<%= link_to t(:approval_), admin_authorizations_path(@module_app.key, type: 'approval') if @module_app.is_approvable %>
<% if @error %>
diff --git a/app/views/layouts/_breadcrumb_back_end.html.erb b/app/views/layouts/_breadcrumb_back_end.html.erb
new file mode 100644
index 000000000..1bafb6d98
--- /dev/null
+++ b/app/views/layouts/_breadcrumb_back_end.html.erb
@@ -0,0 +1,12 @@
+
<%= t(:dashboard_) %> /
+<% case controller.controller_name %>
+ <% when 'authorizations' %>
+
+ <% when 'categories' %>
+
+ <% when 'tags' %>
+
+ <% else %>
+
<%= @module_app.title %>
+<% end %>
+
All
\ No newline at end of file
diff --git a/app/views/layouts/back_end.html.erb b/app/views/layouts/back_end.html.erb
index f03e9aec1..b102562af 100644
--- a/app/views/layouts/back_end.html.erb
+++ b/app/views/layouts/back_end.html.erb
@@ -24,8 +24,7 @@
- - Dashboard /
- - All
+ <%= back_end_breadcrumb %>
<%= yield :right_nav %>
diff --git a/config/locales/new_ui.en.yml b/config/locales/new_ui.en.yml
index e0e0a0bda..b6f072b3c 100644
--- a/config/locales/new_ui.en.yml
+++ b/config/locales/new_ui.en.yml
@@ -40,6 +40,14 @@ en:
previous: Previous
remove: Remove
remove_default: Remove default
+ restful_actions:
+ create: Create
+ delete: Delete
+ edit: Edit
+ index: Index
+ new: New
+ show: Show
+ update: Update
search:
tags: Search tags
select_all: Select all