sorting and dates fixed

This commit is contained in:
Harry Bomrah 2015-12-02 18:30:10 +08:00
parent b3028d0761
commit 3ac59aa15e
2 changed files with 5 additions and 3 deletions

View File

@ -40,6 +40,8 @@ class WritingConference
before_validation :add_http
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc", :publication_date => "desc") }
def create_link
title = []

View File

@ -183,7 +183,7 @@
<div class="control-group">
<label class="control-label muted"><%= t("personal_conference.period_start_date") %></label>
<div class="controls">
<%= f.datetime_picker :period_start_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD" %>
<%= f.datetime_picker :period_start_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD", :value => @writing_conference.period_start_date, :new_record => @writing_conference.new_record? %>
</div>
</div>
@ -191,7 +191,7 @@
<div class="control-group">
<label class="control-label muted"><%= t("personal_conference.period_end_date") %></label>
<div class="controls">
<%= f.datetime_picker :period_end_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD" %>
<%= f.datetime_picker :period_end_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD", :value => @writing_conference.period_end_date, :new_record => @writing_conference.new_record? %>
</div>
</div>
@ -257,7 +257,7 @@
<div class="control-group">
<label class="control-label muted"><%= t("personal_conference.publication_date") %></label>
<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 => @writing_conference.publication_date, :new_record => @writing_conference.new_record? %>
</div>
</div>