From 6e2725d279d5c2882d6c27343459e742f6e54aa5 Mon Sep 17 00:00:00 2001
From: thomaschen <99703040@nccu.edu.tw>
Date: Thu, 22 Aug 2013 16:33:46 +0800
Subject: [PATCH] add collection select to dic categories
---
.../back_end/dictionary_vocabs_controller.rb | 6 +++---
.../dictionary/app/models/dictionary_vocab.rb | 4 ++--
.../back_end/dictionary_vocabs/_form.html.erb | 10 +++++-----
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/vendor/built_in_modules/dictionary/app/controllers/panel/dictionary/back_end/dictionary_vocabs_controller.rb b/vendor/built_in_modules/dictionary/app/controllers/panel/dictionary/back_end/dictionary_vocabs_controller.rb
index f5d7da844..eca860d78 100644
--- a/vendor/built_in_modules/dictionary/app/controllers/panel/dictionary/back_end/dictionary_vocabs_controller.rb
+++ b/vendor/built_in_modules/dictionary/app/controllers/panel/dictionary/back_end/dictionary_vocabs_controller.rb
@@ -22,10 +22,10 @@ class Panel::Dictionary::BackEnd::DictionaryVocabsController < OrbitBackendContr
format.xml { render :xml => @vocab }
end
end
-
+
def new
@vocab = DictionaryVocab.new
- # @categories = get_categories_for_index("MarketItemCategory")
+ @categories = get_categories_for_index("DictionaryVocabCategory")
respond_to do |format|
format.html # new.html.erb
@@ -37,7 +37,7 @@ class Panel::Dictionary::BackEnd::DictionaryVocabsController < OrbitBackendContr
@vocab = DictionaryVocab.new(params[:dictionary_vocab])
@vocab.create_user_id = current_user.id
@vocab.update_user_id = current_user.id
- # @categories = get_categories_for_index("MarketItemCategory")
+ @categories = get_categories_for_index("DictionaryVocabCategory")
if @vocab.save
flash[:success] = "Success!"
diff --git a/vendor/built_in_modules/dictionary/app/models/dictionary_vocab.rb b/vendor/built_in_modules/dictionary/app/models/dictionary_vocab.rb
index 03e46293e..909cf341f 100644
--- a/vendor/built_in_modules/dictionary/app/models/dictionary_vocab.rb
+++ b/vendor/built_in_modules/dictionary/app/models/dictionary_vocab.rb
@@ -5,8 +5,8 @@ class DictionaryVocab
include Mongoid::MultiParameterAttributes
include Mongoid::Sortable
- # BelongsToCategory = :archive_file_category
- # include OrbitCoreLib::BelongsToCategoryMayDisable
+ BelongsToCategory = :dictionary_vocab_category
+ include OrbitCoreLib::BelongsToCategoryMayDisable
# PAYMENT_TYPES = @site_valid_locales
diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/_form.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/_form.html.erb
index 9e905b478..2e18960e9 100644
--- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/_form.html.erb
+++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/_form.html.erb
@@ -1,15 +1,15 @@
-