Fix topic_img_url.
This commit is contained in:
parent
a44c4667d4
commit
2e25d70d92
|
@ -230,9 +230,18 @@
|
|||
<% topics = (papers_data_hash["topic_ids"].nil? ? papers_data_hash["topics"] : EPaperTopic.where(:id.in=>papers_data_hash["topic_ids"]).to_a) %>
|
||||
<% topics.each do |topic| %>
|
||||
<div class="ep-content-item">
|
||||
<%
|
||||
if topic.image.present?
|
||||
topic_img_url = siteurl + topic.image.thumb.url
|
||||
else
|
||||
topic_img_url = nil
|
||||
end
|
||||
%>
|
||||
<a class="ep-content-title" href="<%= page + "/" + topic.to_param %>" target="_blank"><%= topic.title %></a>
|
||||
<div class="ep-img" style="width: 40%; float:left;">
|
||||
<img src="<%= (siteurl + topic.image.thumb.url rescue nil) %>" style="width: 100%;">
|
||||
<% if topic_img_url %>
|
||||
<img src="<%= topic_img_url %>" style="width: 100%;">
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="ep-con" style="width: 58%; float: right;">
|
||||
<%= fix_local_url(siteurl, topic.description) %>
|
||||
|
|
Loading…
Reference in New Issue