diff --git a/app/controllers/admin/ad_banners_controller.rb b/app/controllers/admin/ad_banners_controller.rb index 17a626a..eca6896 100644 --- a/app/controllers/admin/ad_banners_controller.rb +++ b/app/controllers/admin/ad_banners_controller.rb @@ -1,4 +1,10 @@ -class Admin::AdBannersController < ApplicationController +class Admin::AdBannersController < OrbitAdminController + + def initialize + super + @app_title = "ad_banner" + end + def index @ad_banners = Banner.all end diff --git a/app/controllers/admin/ad_images_controller.rb b/app/controllers/admin/ad_images_controller.rb index 2a1107a..cf0b9c1 100644 --- a/app/controllers/admin/ad_images_controller.rb +++ b/app/controllers/admin/ad_images_controller.rb @@ -1,4 +1,4 @@ -class Admin::AdImagesController < ApplicationController +class Admin::AdImagesController < Admin::AdBannersController def index @ad_images = AdImage.all end diff --git a/lib/ad_banner/engine.rb b/lib/ad_banner/engine.rb index c558363..abb4116 100644 --- a/lib/ad_banner/engine.rb +++ b/lib/ad_banner/engine.rb @@ -8,9 +8,11 @@ module AdBanner taggable "Banner" categorizable + authorizable side_bar do head_label_i18n 'ad_banner.ad_banner', icon_class: "icons-landscape" + available_for [:admin,:manager,:sub_manager] active_for_controllers ({:private=>['ad_banner']}) head_link_path "admin_ad_banners_path"