Edit category
This commit is contained in:
parent
6e2725d279
commit
0eb4bf5b37
|
@ -1,6 +1,6 @@
|
|||
<% # encoding: utf-8 %>
|
||||
|
||||
<%= form_for(@dictionary_vocab_category, :url => @url) do |f| %>
|
||||
<%= form_for(@dictionary_vocab_category, :remote => true, :url => @url) do |f| %>
|
||||
|
||||
<h2><%= (@dictionary_vocab_category.new_record? ? 'Add' : 'Edit') %></h2>
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
$('<%= j render :partial => 'dictionary_file_category', :collection => [@dictionary_file_category] %>').appendTo('#dictionary_file_categorys').hide().fadeIn();
|
||||
$('<%= j render :partial => 'dictionary_vocab_category', :collection => [@dictionary_vocab_category] %>').appendTo('#dictionary_vocab_categorys').hide().fadeIn();
|
||||
$("#new_dictionary_file_category")[0].reset();
|
|
@ -0,0 +1 @@
|
|||
$("#form > form").replaceWith("<%= j render "form" %>");
|
|
@ -1,9 +1,9 @@
|
|||
<%= flash_messages %>
|
||||
|
||||
<table id="dictionary_file_categorys" class="table main-list">
|
||||
<table id="dictionary_vocab_categorys" class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span1-2"><%= t('dictionary_file_category.key') %></th>
|
||||
<th class="span1-2"><%= t('dictionary_vocab_category.key') %></th>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<th class="span1-2"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
$("#<%= dom_id @dictionary_vocab_category %>").replaceWith("<%= j render :partial => 'dictionary_vocab_category', :collection => [@dictionary_vocab_category] %>");
|
||||
<% @dictionary_vocab_category = DictionaryVocabCategory.new(:display => 'List') # reset for new form %>
|
||||
$(".edit_dictionary_vocab_category").replaceWith("<%= j render "form" %>")
|
||||
$(".new_dictionary_vocab_category")[0].reset();
|
|
@ -1,6 +1,6 @@
|
|||
module Dictionary
|
||||
OrbitApp.registration "Dictionary",:type=> 'ModuleApp' do
|
||||
module_label 'archive.archive'
|
||||
module_label 'dictionary.dictionary'
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
|
||||
# personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'archive.archive'
|
||||
|
@ -17,7 +17,7 @@ module Dictionary
|
|||
end
|
||||
end
|
||||
|
||||
category ["ArchiveFileCategory"]
|
||||
category ["DictionaryVocabCategory"]
|
||||
|
||||
taggable
|
||||
|
||||
|
@ -29,17 +29,17 @@ module Dictionary
|
|||
# link_field :archive_file_category_with_title,{:method => 'panel_archive_front_end_archive_files_path',:args=>{:category_id => [:archive_file_category,:id]}}
|
||||
# end
|
||||
|
||||
categories_query 'ArchiveFileCategory.all'
|
||||
tags_query 'ArchiveTag.all'
|
||||
# categories_query 'ArchiveFileCategory.all'
|
||||
# tags_query 'ArchiveTag.all'
|
||||
|
||||
customize_widget "index" do
|
||||
widget_i18n "archive.widget.index"
|
||||
style ["1"]
|
||||
end
|
||||
# customize_widget "index" do
|
||||
# widget_i18n "archive.widget.index"
|
||||
# style ["1"]
|
||||
# end
|
||||
|
||||
customize_widget "archive_search_block" do
|
||||
widget_i18n "announcement.widget.search"
|
||||
end
|
||||
# customize_widget "archive_search_block" do
|
||||
# widget_i18n "announcement.widget.search"
|
||||
# end
|
||||
|
||||
# item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"]
|
||||
# item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links"
|
||||
|
|
Loading…
Reference in New Issue