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 :set_book, only: [:show, :edit , :update, :destroy]
|
||||||
before_action :get_plugins, only: [:index, :book_setting, :new, :create, :edit, :update]
|
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_types, only: [:index,:book_setting, :new, :edit, :create, :update]
|
||||||
|
before_action :set_plugin
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@writing_books = Book.all
|
@writing_books = Book.all
|
||||||
|
@ -159,6 +160,10 @@ class Admin::BooksController < OrbitMemberController
|
||||||
@plugins = OrbitApp::Plugin::Registration.all rescue nil
|
@plugins = OrbitApp::Plugin::Registration.all rescue nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def set_plugin
|
||||||
|
@plugin = OrbitApp::Plugin::Registration.all.select{|plugin| plugin.app_name.eql? 'Book'}.first
|
||||||
|
end
|
||||||
|
|
||||||
def set_types
|
def set_types
|
||||||
@author_types = BookAuthorType.all
|
@author_types = BookAuthorType.all
|
||||||
@book_types = BookType.all
|
@book_types = BookType.all
|
||||||
|
|
|
@ -38,7 +38,6 @@ class Book
|
||||||
|
|
||||||
after_save :save_book_files, :save_book_authors
|
after_save :save_book_files, :save_book_authors
|
||||||
|
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
title = []
|
title = []
|
||||||
title << self.member_profile.name if self.member_profile.present?
|
title << self.member_profile.name if self.member_profile.present?
|
||||||
|
|
Loading…
Reference in New Issue