Remove paper_title field

This commit is contained in:
spen 2014-06-17 17:13:37 +08:00
parent 43cc51f7d3
commit c969fbb851
3 changed files with 0 additions and 20 deletions

View File

@ -11,8 +11,6 @@ class WritingBook
LANGUAGE_TYPES = [ "English", "Chinese" ]
field :paper_title, localize: true
field :book_title, localize: true
field :authors, localize: true
field :extracted_chapters, localize: true
@ -45,8 +43,6 @@ class WritingBook
# before_save :clean_checkboxs
validates :paper_title, :at_least_one => true
before_validation :add_http
after_save :save_writing_book_files
@ -85,8 +81,6 @@ class WritingBook
def create_link
title = []
title << self.authors if self.authors.present?
# title << self.paper_title if self.paper_title.present?
title << self.book_title if self.book_title.present?
title << self.publisher if self.publisher.present?
title << self.isbn if self.isbn.present?

View File

@ -200,16 +200,6 @@
<div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
<!-- paper_title-->
<div class="control-group input-title">
<label class="control-label muted"><%= t("personal_book.paper_title") %></label>
<div class="controls">
<%= f.fields_for :paper_title_translations do |f| %>
<%= f.text_field locale, class: "input-block-level", placeholder: t("personal_book.paper_title"), value: (@writing_book.paper_title_translations[locale] rescue nil) %>
<% end %>
</div>
</div>
<!-- book_title-->
<div class="control-group input-title">
<label class="control-label muted"><%= t("personal_book.book_title") %></label>

View File

@ -12,10 +12,6 @@
<tr><th><%= t("personal_book.language")%></th><td><%= @writing_book.language %></td></tr>
<% end %>
<% if !@writing_book.paper_title.blank? %>
<tr><th><%= t("personal_book.paper_title")%></th><td><%= @writing_book.paper_title %></td></tr>
<% end %>
<% if !@writing_book.book_title.blank? %>
<tr><th><%= t("personal_book.book_title")%></th><td><%= @writing_book.book_title %></td></tr>
<% end %>