class Panel::WebResource::BackEnd::WebLinkCategorysController < OrbitBackendController
    before_filter :for_app_manager,:except => [:index] 

  def index
    @web_link_categorys = WebLinkCategory.all
    @web_link_category = WebLinkCategory.new(:display => 'List')
	
	@url = panel_web_resource_back_end_web_link_categorys_path
	
    respond_to do |format|
      format.html # index.html.erb
      format.js
    end
  end

  # GET /web_links/1
  # GET /web_links/1.xml
  def show
    @web_link_category = WebLinkCategory.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.js
    end
  end

  # GET /web_links/new
  # GET /web_links/new.xml
  def new
    @web_link_category = WebLinkCategory.new(:display => 'List')

    respond_to do |format|
      format.html # new.html.erb
      format.js
    end
  end
  
  # GET /web_links/1/edit
  def edit
    @web_link_category = WebLinkCategory.find(params[:id])
	
	@url = panel_web_resource_back_end_web_link_category_path(@web_link_category)

    respond_to do |format|
      format.html
      format.js
    end
  end

  # POST /web_links
  # POST /web_links.xml
  def create
    @web_link_category = WebLinkCategory.new(params[:web_link_category])

    respond_to do |format|
      if @web_link_category.save
        format.html { redirect_to(panel_web_resource_back_end_web_link_categorys_url, :notice => t('web_link_category.create_web_link_category_success')) }
        format.js
      else
        format.html { render :action => "new" }
        format.js { render action: "new" }
      end
    end
  end

  # PUT /web_links/1
  # PUT /web_links/1.xml
  def update
    @web_link_category = WebLinkCategory.find(params[:id])
	
	@url = panel_web_resource_back_end_web_link_category_path(@web_link_category)

    respond_to do |format|
      if @web_link_category.update_attributes(params[:web_link_category])
        format.html { redirect_to(panel_web_resource_back_end_web_link_categorys_url, :notice => t('web_link_category.update_web_link_category_success')) }
        # format.xml  { head :ok }
        format.js
      else
        format.html { render :action => "edit" }
        format.js { render :action => "edit" }
      end
    end
  end

  # DELETE /web_links/1
  # DELETE /web_links/1.xml
  def destroy
    @web_link_category = WebLinkCategory.find(params[:id])
    @web_link_category.destroy

    respond_to do |format|
      format.html { redirect_to(panel_web_resource_back_end_web_link_categorys_url) }
      # format.xml  { head :ok }
      format.js
    end
  end
end
