This commit is contained in:
BoHung Chiu 2022-08-23 16:23:25 +08:00
parent d1379bf8cd
commit 5cba3dcf8b
2 changed files with 13 additions and 14 deletions

View File

@ -60,14 +60,13 @@ class JournalPaper
title << self.vol_no if (self.vol_no.present? && self.vol_no != "0") title << self.vol_no if (self.vol_no.present? && self.vol_no != "0")
title << self.issue_no if (self.issue_no.present? && self.issue_no != "0") title << self.issue_no if (self.issue_no.present? && self.issue_no != "0")
title << "pp"+self.form_to_start.to_s+"-"+self.form_to_end.to_s if (self.form_to_start.present? && self.form_to_start != "0") title << "pp"+self.form_to_start.to_s+"-"+self.form_to_end.to_s if (self.form_to_start.present? && self.form_to_start != "0")
title << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil) # title << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil)
# if !self.publication_date.nil? if !self.publication_date.nil?
# pd = self.publication_date.strftime("%Y-%m-%d").split('-') title << (self.publication_date.strftime("%b. %Y") rescue nil)
# title << pd[0] end
# end
# title << self.year # title << self.year
title.delete(nil) title.delete(nil)
title.join(', ').gsub(', ,',',') title.join(', ').sub(/^\\s*,/,'').gsub(/,(\s*,)+/,',').strip
end end
def self.get_plugin_datas_to_member(datas) def self.get_plugin_datas_to_member(datas)

View File

@ -155,33 +155,33 @@
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t("personal_journal.vol_no") %></label> <label class="control-label muted"><%= t("personal_journal.vol_no") %></label>
<div class="controls"> <div class="controls">
<%= f.text_field :vol_no %> <%= f.text_field :vol_no %>
</div> </div>
</div> </div>
<!-- issue_no --> <!-- issue_no -->
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t("personal_journal.issue_no") %></label> <label class="control-label muted"><%= t("personal_journal.issue_no") %></label>
<div class="controls"> <div class="controls">
<%= f.text_field :issue_no %> <%= f.text_field :issue_no %>
</div> </div>
</div> </div>
<!-- form_to --> <!-- form_to -->
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t("personal_journal.form_to") %></label> <label class="control-label muted"><%= t("personal_journal.form_to") %></label>
<div class="controls"> <div class="controls">
<%= f.text_field :form_to_start, :class=>'span1' %> ~ <%= f.text_field :form_to_end, :class=>'span1' %> <%= f.text_field :form_to_start, :class=>'span1' %> ~ <%= f.text_field :form_to_end, :class=>'span1' %>
</div> </div>
</div> </div>
<!-- total_pages --> <!-- total_pages -->
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= t("personal_journal.total_pages") %></label> <label class="control-label muted"><%= t("personal_journal.total_pages") %></label>
<div class="controls"> <div class="controls">
<%= f.text_field :total_pages %> <%= f.text_field :total_pages %>
</div> </div>
</div> </div>
<!-- level_type --> <!-- level_type -->
<div class="control-group"> <div class="control-group">