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.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 << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil)
# if !self.publication_date.nil?
# pd = self.publication_date.strftime("%Y-%m-%d").split('-')
# title << pd[0]
# end
# title << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil)
if !self.publication_date.nil?
title << (self.publication_date.strftime("%b. %Y") rescue nil)
end
# title << self.year
title.delete(nil)
title.join(', ').gsub(', ,',',')
title.join(', ').sub(/^\\s*,/,'').gsub(/,(\s*,)+/,',').strip
end
def self.get_plugin_datas_to_member(datas)

View File

@ -155,33 +155,33 @@
<div class="control-group">
<label class="control-label muted"><%= t("personal_journal.vol_no") %></label>
<div class="controls">
<%= f.text_field :vol_no %>
<%= f.text_field :vol_no %>
</div>
</div>
</div>
<!-- issue_no -->
<div class="control-group">
<label class="control-label muted"><%= t("personal_journal.issue_no") %></label>
<div class="controls">
<%= f.text_field :issue_no %>
<%= f.text_field :issue_no %>
</div>
</div>
</div>
<!-- form_to -->
<div class="control-group">
<label class="control-label muted"><%= t("personal_journal.form_to") %></label>
<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>
<!-- total_pages -->
<div class="control-group">
<label class="control-label muted"><%= t("personal_journal.total_pages") %></label>
<div class="controls">
<%= f.text_field :total_pages %>
<%= f.text_field :total_pages %>
</div>
</div>
</div>
<!-- level_type -->
<div class="control-group">