sorting and dates fixed
This commit is contained in:
parent
b3028d0761
commit
3ac59aa15e
|
@ -40,6 +40,8 @@ class WritingConference
|
||||||
|
|
||||||
before_validation :add_http
|
before_validation :add_http
|
||||||
|
|
||||||
|
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc", :publication_date => "desc") }
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
title = []
|
title = []
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t("personal_conference.period_start_date") %></label>
|
<label class="control-label muted"><%= t("personal_conference.period_start_date") %></label>
|
||||||
<div class="controls">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t("personal_conference.period_end_date") %></label>
|
<label class="control-label muted"><%= t("personal_conference.period_end_date") %></label>
|
||||||
<div class="controls">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t("personal_conference.publication_date") %></label>
|
<label class="control-label muted"><%= t("personal_conference.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 => @writing_conference.publication_date, :new_record => @writing_conference.new_record? %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue