sort and date fixed
This commit is contained in:
parent
d5dac83390
commit
8b914c7eea
|
@ -48,6 +48,8 @@ class JournalPaper
|
||||||
before_validation :add_http
|
before_validation :add_http
|
||||||
# validates :paper_title, presence: true
|
# validates :paper_title, presence: true
|
||||||
|
|
||||||
|
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc", :publication_date => "desc") }
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
title = []
|
title = []
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t("personal_journal.publication_date") %></label>
|
<label class="control-label muted"><%= t("personal_journal.publication_date") %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.datetime_picker :publication_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD" %>
|
<%= f.datetime_picker :publication_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD", :value => @journal_paper.publication_date, :new_record => @journal_paper.new_record? %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue