docbrown/app/views/podcast_episodes/_episodes_feed.html.erb
Duc Nguyen 2ebe70039a Feat: #3498 Display episode's published_at (#4272)
* feat: #3498 Display episode's published_at

* feat: #3498 Move methods to decorator

* feat: #3498 Add check if published_at present

* feat: #3498 Add testcase for showing published_at

* Fix build failure #3498

https://travis-ci.com/thepracticaldev/dev.to/builds/130734935

* feat: #3498 Fix testcase failed on Travis 130738295

* feat: #3498 Address comments on PR #4272

* feat: #3498 Delete unused

* feat: #3498 Refactor the use of decorate
2019-10-08 17:06:46 -04:00

32 lines
1.3 KiB
Text

<% @podcast_episodes.each_with_index do |episode, i| %>
<a href="<%= episode.path %>" class="small-pic-link-wrapper" id="article-link-<%= episode.id %>">
<div class="single-article single-article-small-pic single-article-single-podcast">
<div class="small-pic">
<%= cl_image_tag(episode.image_url || episode.podcast.image_url,
type: "fetch",
crop: "imagga_scale",
width: 240,
height: 240,
quality: "auto",
flags: "progressive",
fetch_format: "auto",
sign_url: true,
alt: episode.title) %>
</div>
<div class="content">
<h3><span class="tag-identifier">podcast</span><%= episode.title %></h3>
</div>
<h4>
<a href="/<%= episode.podcast.slug %>">
<%= episode.podcast.title %>
<% if episode.published_at? %>
・<time class="published-at" datetime="<%= episode.published_timestamp %>">
<%= episode.readable_publish_date %>
</time>
<span class="time-ago-indicator-initial-placeholder" data-seconds="<%= episode.published_at_int %>"></span>
<% end %>
</a>
</h4>
</div>
</a>
<% end %>