new archive

This commit is contained in:
unknown authored and chris committed 2012-08-30 14:32:32 +08:00
1 parent 10d9253399
commit 8a5519073b
3 files changed
+20 -7

No files matched your search

+4 -4
View File
@@ -19,7 +19,7 @@ class ArchiveFile
field :is_hidden, :type => Boolean, :default => false
belongs_to :archive_file_category
has_many :archive_file_multiples, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :archive_file_multiples, :allow_destroy => true
@@ -31,7 +31,7 @@ class ArchiveFile
def self.search( category_id = nil )
if category_id.to_s.size > 0
find(:all, :conditions => {archive_file_category_id: category_id}).desc( :is_top, :title )
else
@@ -44,7 +44,7 @@ class ArchiveFile
def self.widget_datas
where( :is_hidden => false ).desc(:is_top, :title)
end
@@ -52,7 +52,7 @@ class ArchiveFile
def is_top?
self.is_top
end
def save_archive_file_multiples
self.archive_file_multiples.each do |t|
if t.should_destroy
@@ -46,8 +46,7 @@
<%= f.select :archive_file_category_id, @archive_file_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]} %>
<ul class="nav nav-tabs">
<%# @site_valid_locales.each_with_index do |locale, i| %>
<% site_valid_locales_default_head.each_with_index do |locale, i| %>
<% @site_valid_locales.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? " class='active'" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %>
</ul>
@@ -70,7 +69,7 @@
<% end %>
</div>
<div>