Remove paper_title field
This commit is contained in:
parent
43cc51f7d3
commit
c969fbb851
|
@ -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?
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 %>
|
||||
|
|
Loading…
Reference in New Issue