small fix for dates
This commit is contained in:
parent
b4ddea2aca
commit
ac11037166
|
@ -34,8 +34,8 @@ class PersonalBooksController < ApplicationController
|
||||||
end
|
end
|
||||||
when "publish_date", "publication_date"
|
when "publish_date", "publication_date"
|
||||||
pd = ""
|
pd = ""
|
||||||
if !book.publish_date.nil?
|
if !book.publication_date.nil?
|
||||||
pd = book.publish_date.strftime("%Y-%m-%d").split('-')
|
pd = book.publication_date.strftime("%Y-%m-%d").split('-')
|
||||||
pd = pd[0]+"/"+pd[1]
|
pd = pd[0]+"/"+pd[1]
|
||||||
end
|
end
|
||||||
t << {"value" => pd}
|
t << {"value" => pd}
|
||||||
|
|
|
@ -110,8 +110,8 @@ class Book
|
||||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' target='_blank'>#{p.send(t)}</a>" }
|
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_book')}' target='_blank'>#{p.send(t)}</a>" }
|
||||||
when "publish_date", "publication_date"
|
when "publish_date", "publication_date"
|
||||||
pd = ""
|
pd = ""
|
||||||
if !p.publish_date.nil?
|
if !p.publication_date.nil?
|
||||||
pd = p.publish_date.strftime("%Y-%m-%d").split('-')
|
pd = p.publication_date.strftime("%Y-%m-%d").split('-')
|
||||||
pd = pd[0]+"/"+pd[1]
|
pd = pd[0]+"/"+pd[1]
|
||||||
end
|
end
|
||||||
pd_data << {"data_title" => pd}
|
pd_data << {"data_title" => pd}
|
||||||
|
|
Loading…
Reference in New Issue