Added authorization to AdBanner

This commit is contained in:
Saurabh Bhatia 2014-05-05 12:50:33 +08:00
parent 5c65cdc9bb
commit e4cf9d3ba9
3 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,10 @@
class Admin::AdBannersController < ApplicationController class Admin::AdBannersController < OrbitAdminController
def initialize
super
@app_title = "ad_banner"
end
def index def index
@ad_banners = Banner.all @ad_banners = Banner.all
end end

View File

@ -1,4 +1,4 @@
class Admin::AdImagesController < ApplicationController class Admin::AdImagesController < Admin::AdBannersController
def index def index
@ad_images = AdImage.all @ad_images = AdImage.all
end end

View File

@ -8,9 +8,11 @@ module AdBanner
taggable "Banner" taggable "Banner"
categorizable categorizable
authorizable
side_bar do side_bar do
head_label_i18n 'ad_banner.ad_banner', icon_class: "icons-landscape" head_label_i18n 'ad_banner.ad_banner', icon_class: "icons-landscape"
available_for [:admin,:manager,:sub_manager]
active_for_controllers ({:private=>['ad_banner']}) active_for_controllers ({:private=>['ad_banner']})
head_link_path "admin_ad_banners_path" head_link_path "admin_ad_banners_path"