Add category controller

This commit is contained in:
Bernie Chiu 2013-08-22 15:38:06 +08:00 committed by chris
parent f1ec3406f8
commit 14b19d814f
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,22 @@
class Panel::Dictionary::BackEnd::DictionaryVocabCategorysController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
before_filter :for_app_manager,:except => [:index,:get_categorys_json,:get_dictionary_vocabs_json]
before_filter :force_order_for_visitor,:only=>[:index,:get_categorys_json,:get_dictionary_vocabs_json]
before_filter :force_order_for_user,:except => [:index,:get_categorys_json,:get_dictionary_vocabs_json]
before_filter :for_app_sub_manager,:except => [:index,:get_categorys_json,:get_dictionary_vocabs_json]
def index
@dictionary_vocab_categorys = get_categories_for_index("DictionaryVocabCategory")
# @archive_file_categorys = ArchiveFileCategory.all
@dictionary_vocab_category = DictionaryVocabCategory.new(:display => 'List')
@url = panel_dictionary_back_end_dictionary_vocab_categorys_path
respond_to do |format|
format.html # index.html.erb
format.js
end
end
end

View File

@ -10,6 +10,7 @@ Rails.application.routes.draw do
resources :dictionary_vocab_categorys
resources :tags
end
namespace :front_end do
match "dictionary_vocabs" => "dictionary_vocabs#index"
resources :dictionary_vocabs