fixed navigation and breadcrumb for books
This commit is contained in:
parent
77fe706f51
commit
298ed923ed
|
@ -5,6 +5,7 @@ class Admin::BooksController < OrbitMemberController
|
|||
before_action :set_book, only: [:show, :edit , :update, :destroy]
|
||||
before_action :get_plugins, only: [:index, :book_setting, :new, :create, :edit, :update]
|
||||
before_action :set_types, only: [:index,:book_setting, :new, :edit, :create, :update]
|
||||
before_action :set_plugin
|
||||
|
||||
def index
|
||||
@writing_books = Book.all
|
||||
|
@ -159,6 +160,10 @@ class Admin::BooksController < OrbitMemberController
|
|||
@plugins = OrbitApp::Plugin::Registration.all rescue nil
|
||||
end
|
||||
|
||||
def set_plugin
|
||||
@plugin = OrbitApp::Plugin::Registration.all.select{|plugin| plugin.app_name.eql? 'Book'}.first
|
||||
end
|
||||
|
||||
def set_types
|
||||
@author_types = BookAuthorType.all
|
||||
@book_types = BookType.all
|
||||
|
|
|
@ -38,7 +38,6 @@ class Book
|
|||
|
||||
after_save :save_book_files, :save_book_authors
|
||||
|
||||
|
||||
def create_link
|
||||
title = []
|
||||
title << self.member_profile.name if self.member_profile.present?
|
||||
|
|
Loading…
Reference in New Issue