Skip to content
Snippets Groups Projects
Commit b017e739 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix #798

parent 77db09bb
No related branches found
No related tags found
No related merge requests found
......@@ -15,13 +15,9 @@ class Admin::ApplicationController < ApplicationController
end
def short_breadcrumb
if current_admin_theme == 'appstack'
@menu_collapsed = true
add_breadcrumb t('admin.dashboard'), admin_root_path(website_id: nil)
add_breadcrumb '...'
else
breadcrumb
end
@menu_collapsed = true
add_breadcrumb t('admin.dashboard'), admin_root_path(website_id: nil)
add_breadcrumb '...'
end
def breadcrumb_for(object, **options)
......
class Admin::Education::ApplicationController < Admin::ApplicationController
def breadcrumb
if @program
short_breadcrumb
else
super
add_breadcrumb Education.model_name.human
end
protected
def breadcrumb
super
add_breadcrumb Education.model_name.human
@menu_collapsed = true if @program
end
end
......@@ -3,15 +3,8 @@ class Admin::Research::ApplicationController < Admin::ApplicationController
protected
def breadcrumb
if @journal
short_breadcrumb
breadcrumb_for @journal
elsif @laboratory
short_breadcrumb
breadcrumb_for @laboratory
else
super
add_breadcrumb Research.model_name.human
end
super
add_breadcrumb Research.model_name.human
@menu_collapsed = true if @journal || @laboratory
end
end
......@@ -53,6 +53,12 @@ class Admin::Research::JournalsController < Admin::Research::ApplicationControll
protected
def breadcrumb
super
add_breadcrumb Research::Journal.model_name.human(count: 2), admin_research_journals_path
breadcrumb_for @journal
end
def journal_params
params.require(:research_journal)
.permit(:title, :meta_description, :summary, :issn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment