Added authorization to AdBanner
This commit is contained in:
parent
5c65cdc9bb
commit
e4cf9d3ba9
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue