add collection select to dic categories
This commit is contained in:
parent
3f87914e46
commit
6e2725d279
|
@ -25,7 +25,7 @@ class Panel::Dictionary::BackEnd::DictionaryVocabsController < OrbitBackendContr
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@vocab = DictionaryVocab.new
|
@vocab = DictionaryVocab.new
|
||||||
# @categories = get_categories_for_index("MarketItemCategory")
|
@categories = get_categories_for_index("DictionaryVocabCategory")
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
|
@ -37,7 +37,7 @@ class Panel::Dictionary::BackEnd::DictionaryVocabsController < OrbitBackendContr
|
||||||
@vocab = DictionaryVocab.new(params[:dictionary_vocab])
|
@vocab = DictionaryVocab.new(params[:dictionary_vocab])
|
||||||
@vocab.create_user_id = current_user.id
|
@vocab.create_user_id = current_user.id
|
||||||
@vocab.update_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
|
if @vocab.save
|
||||||
flash[:success] = "Success!"
|
flash[:success] = "Success!"
|
||||||
|
|
|
@ -5,8 +5,8 @@ class DictionaryVocab
|
||||||
include Mongoid::MultiParameterAttributes
|
include Mongoid::MultiParameterAttributes
|
||||||
include Mongoid::Sortable
|
include Mongoid::Sortable
|
||||||
|
|
||||||
# BelongsToCategory = :archive_file_category
|
BelongsToCategory = :dictionary_vocab_category
|
||||||
# include OrbitCoreLib::BelongsToCategoryMayDisable
|
include OrbitCoreLib::BelongsToCategoryMayDisable
|
||||||
|
|
||||||
# PAYMENT_TYPES = @site_valid_locales
|
# PAYMENT_TYPES = @site_valid_locales
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="offset1">
|
<div class="offset1">
|
||||||
<h4><%= t :word, :scope => :dictionary %></h4>
|
<h4><%= t :word, :scope => :dictionary %></h4>
|
||||||
<%= f.text_field :title %>
|
<%= f.text_field :word %>
|
||||||
</div>
|
</div>
|
||||||
<div class="offset1">
|
<div class="offset1">
|
||||||
<h4><%= t :definition, :scope => :dictionary %></h4>
|
<h4><%= t :definition, :scope => :dictionary %></h4>
|
||||||
<%= f.text_area :price %>
|
<%= f.text_area :definition %>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="offset1">
|
<div class="offset1">
|
||||||
|
|
Loading…
Reference in New Issue