update default image

This commit is contained in:
nccu 2014-11-11 16:31:16 +08:00
parent b4a9e406eb
commit 08de6612cb
2 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ class NewsController < ApplicationController
"category" => a.category.title, "category" => a.category.title,
"postdate" => a.postdate.strftime('%Y-%m-%d'), "postdate" => a.postdate.strftime('%Y-%m-%d'),
"link_to_show" => OrbitHelper.url_to_show(a.to_param), "link_to_show" => OrbitHelper.url_to_show(a.to_param),
"img_src" => a.image.thumb.url || "http://placehold.it/100x100", "img_src" => a.image.thumb.url || "/assets/news_default_image.jpg",
"more" => t(:more_plus) "more" => t(:more_plus)
} }
end end
@ -124,7 +124,7 @@ class NewsController < ApplicationController
"category" => a.category.title, "category" => a.category.title,
"postdate" => a.postdate, "postdate" => a.postdate,
"link_to_show" => OrbitHelper.widget_item_url(a.to_param), "link_to_show" => OrbitHelper.widget_item_url(a.to_param),
"img_src" => a.image.thumb.url || "http://placehold.it/100x100", "img_src" => a.image.thumb.url || "/assets/news_default_image.jpg",
} }
end end
{ {

View File

@ -127,7 +127,7 @@
<% if @news_bulletin.image.file %> <% if @news_bulletin.image.file %>
<%= image_tag @news_bulletin.image %> <%= image_tag @news_bulletin.image %>
<% else %> <% else %>
<img src="http://www.placehold.it/290x150/EFEFEF/AAAAAA" /> <img src="http://www.placehold.it/200x100/EFEFEF/AAAAAA" />
<% end %> <% end %>
</div> </div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div> <div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
@ -147,7 +147,7 @@
<div class="fileupload-alert alert alert-danger text-center" role="alert"></div> <div class="fileupload-alert alert alert-danger text-center" role="alert"></div>
<div class="image_note" style="color:red; font-size:14px;"> <div class="image_note" style="color:red; font-size:14px;">
<br /> <br />
※<%= t("ad.widget_info_for_ad_image_size", :best_size=> "290px x 150px") %> ※<%= t("ad.widget_info_for_ad_image_size", :best_size=> "( 200px x 100px )") %>
<br /> <br />
※<%= t("news.image_size_limit")%> ※<%= t("news.image_size_limit")%>
<br /> <br />