I created a controller under Spree::Admin module and also I have mentioned in
routes.rb
match '/admin/new_tab => 'spree/admin/new_controller#index'
but this is working in front end.
How can I move this page to admin panel with new tab?
To make this controller work only if admin is signed in (like the other controllers in Admin namespace), it should inherit from Admin::BaseController.
To make the new tab, you should probably create Deface, something like this:
Deface::Override.new(:virtual_path => "spree/layouts/admin",
:name => "admin_content_admin_tab_parser",
:insert_bottom => "[data-hook='admin_tabs']",
:text => "<%= tab :new_tab, :url => 'admin/new_tab', :icon => 'icon-th-large' %>",
:disabled => false)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With