diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-31 12:12:58 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-31 12:12:58 +0000 |
commit | 458406e25f511fc0496c5f5c12dae8f5e3562910 (patch) | |
tree | 10af997632df2f2bc94d30df778bc864d3b93de6 | |
parent | 5a52822e9abf10b99dc1df17e9507c7f8f949bb8 (diff) |
Handle the case where there is no encoded element, but a description element instead.
-rw-r--r-- | app/views/general/blog.rhtml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/views/general/blog.rhtml b/app/views/general/blog.rhtml index a5319da9d..5258e9bbd 100644 --- a/app/views/general/blog.rhtml +++ b/app/views/general/blog.rhtml @@ -24,7 +24,13 @@ <div class="blog_post"> <h2 id="<%= Time.parse(item['pubDate'][0]).to_i %>"><a href="<%=item['link']%>"><%=h item['title'] %></a></h2> <p class="subtitle"><%= _("Posted on {{date}} by {{author}}", :date=>simple_date(Time.parse(item['pubDate'][0])), :author=>item['creator']) %></p> - <div><%= item['encoded'] %></div> + <div> + <% if item['encoded'] %> + <%= item['encoded'] %> + <% elsif item['description'] %> + <%= item['description'] %> + <% end %> + </div> <p><em> <% if item['comments'] %> <a href="<%=item['comments'][0]%>"><%= _("{{number_of_comments}} comments", :number_of_comments=>item['comments'][1]) %></a> |