Fix default img.

This commit is contained in:
邱博亞 2022-12-08 15:12:13 +08:00
parent d6b217ec6e
commit 9516696f18
2 changed files with 3 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 B

View File

@ -28,7 +28,7 @@ class ExperimentsController < ApplicationController
{ {
"link_to_show" => OrbitHelper.url_to_show(subject.to_param), "link_to_show" => OrbitHelper.url_to_show(subject.to_param),
"subject" => subject.title, "subject" => subject.title,
"img_src" => subject.image.thumb.url || "/assets/experiment-default.jpg", "img_src" => subject.image.thumb.url || "/assets/experiment/experiment-default.gif",
"category" => subject.category.title, "category" => subject.category.title,
"direction" => subject.direction, "direction" => subject.direction,
"statuses" => statuses, "statuses" => statuses,
@ -92,7 +92,7 @@ class ExperimentsController < ApplicationController
{ {
"data" => { "data" => {
"subject" => subject.title, "subject" => subject.title,
"img_src" => subject.image.thumb.url || "/assets/experiment-default.jpg", "img_src" => subject.image.thumb.url || "/assets/experiment/experiment-default.gif",
"display" => subject.image.thumb.url.nil? ? "display:none;" : "", "display" => subject.image.thumb.url.nil? ? "display:none;" : "",
"category" => subject.category.title, "category" => subject.category.title,
"facility" => subject.facility, "facility" => subject.facility,
@ -155,7 +155,7 @@ class ExperimentsController < ApplicationController
{ {
"link_to_show" => OrbitHelper.widget_item_url(subject.to_param), "link_to_show" => OrbitHelper.widget_item_url(subject.to_param),
"subject" => subject.title, "subject" => subject.title,
"img_src" => subject.image.thumb.url || "/assets/experiment-default.jpg", "img_src" => subject.image.thumb.url || "/assets/experiment/experiment-default.gif",
"category" => subject.category.title, "category" => subject.category.title,
"direction" => subject.direction, "direction" => subject.direction,
"statuses" => statuses, "statuses" => statuses,