intra_app/app/controllers/admin/cibles_controller.rb
Nicolas Bally 761e075bb6 initial
2018-11-08 21:47:30 +01:00

25 lines
500 B
Ruby

# -*- encoding : utf-8 -*-
class Admin::CiblesController < ApplicationController
before_filter :auth_admin
layout false
def index
@cible_type = params[:cible_type] || "MenuItem"
@cible_id = params[:cible_id] || nil
end
def new
@resource = params[:resource_type].to_s.constantize.new()
@resource.cible = params[:cible_type].to_s.constantize.new()
if params[:resource_type] == "LinkContent"
@namespace = :portlet
else
@namespace = :admin
end
end
end