removed book type and author type key and also some changes in the model
This commit is contained in:
parent
298ed923ed
commit
42c6abe49e
|
@ -20,6 +20,8 @@ class Book
|
||||||
field :publication_date, type: DateTime
|
field :publication_date, type: DateTime
|
||||||
field :url, type: String
|
field :url, type: String
|
||||||
field :note, type: String
|
field :note, type: String
|
||||||
|
field :rss2_id, type: String
|
||||||
|
field :co_authors, type: String
|
||||||
|
|
||||||
paginates_per 10
|
paginates_per 10
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ class BookAuthorType
|
||||||
include Mongoid::Attributes::Dynamic
|
include Mongoid::Attributes::Dynamic
|
||||||
include OrbitCoreLib::ObjectDisable
|
include OrbitCoreLib::ObjectDisable
|
||||||
|
|
||||||
field :key, type: String
|
|
||||||
field :title, type: String, localize: true
|
field :title, type: String, localize: true
|
||||||
|
|
||||||
has_and_belongs_to_many :books
|
has_and_belongs_to_many :books
|
||||||
|
|
|
@ -4,7 +4,6 @@ class BookType
|
||||||
include Mongoid::Attributes::Dynamic
|
include Mongoid::Attributes::Dynamic
|
||||||
include OrbitCoreLib::ObjectDisable
|
include OrbitCoreLib::ObjectDisable
|
||||||
|
|
||||||
field :key, type: String
|
|
||||||
field :title, type: String, localize: true
|
field :title, type: String, localize: true
|
||||||
|
|
||||||
has_many :books
|
has_many :books
|
||||||
|
|
|
@ -6,12 +6,6 @@
|
||||||
<h3 id="myModalLabe2"><%= (@set_author_type.new_record? ? 'Add 作者型態' : 'Edit 作者型態') %></h3>
|
<h3 id="myModalLabe2"><%= (@set_author_type.new_record? ? 'Add 作者型態' : 'Edit 作者型態') %></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="http" class="control-label">Key</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_field :key %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= f.fields_for :title_translations do |f| %>
|
<%= f.fields_for :title_translations do |f| %>
|
||||||
<% @site_in_use_locales.each do |locale| %>
|
<% @site_in_use_locales.each do |locale| %>
|
||||||
|
|
|
@ -7,12 +7,6 @@
|
||||||
<h3 id="myModalLabe1"><%= (@set_book_type.new_record? ? 'Add 類別' : 'Edit 類別') %></h3>
|
<h3 id="myModalLabe1"><%= (@set_book_type.new_record? ? 'Add 類別' : 'Edit 類別') %></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="http" class="control-label">Key</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_field :key %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= f.fields_for :title_translations do |f| %>
|
<%= f.fields_for :title_translations do |f| %>
|
||||||
<% @site_in_use_locales.each do |locale| %>
|
<% @site_in_use_locales.each do |locale| %>
|
||||||
|
|
|
@ -126,8 +126,8 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t("personal_book.language") %></label>
|
<label class="control-label muted"><%= t("personal_book.language") %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.radio_button :language, "Chinese" %> <%= t("personal_book.Chinese") %>
|
<%= f.radio_button :language, "zh_tw" %> <%= t("personal_book.Chinese") %>
|
||||||
<%= f.radio_button :language, "English" %> <%= t("personal_book.English") %>
|
<%= f.radio_button :language, "en" %> <%= t("personal_book.English") %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue