Skip to content

Commit

Permalink
Simplified logic
Browse files Browse the repository at this point in the history
  • Loading branch information
awagener committed Jun 9, 2010
1 parent 41198a1 commit e112f8d
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions app/views/admin/blogs/index.html.erb
Expand Up @@ -7,21 +7,19 @@
<% else %>
<p>Sorry, no results found.</p>
<% end %>
<% elsif @grouped_blogs.any? %>
<% @grouped_blogs.each do |date, posts| %>
<h3><%= date.strftime("%A, #{date.day} %B %Y") %></h3>
<ul>
<%= render :partial => 'blog', :collection => posts %>
</ul>
<% end %>
<% else %>
<% if @grouped_blogs.any? %>
<% @grouped_blogs.each do |date, posts| %>
<h3><%= date.strftime("%A, #{date.day} %B %Y") %></h3>
<ul>
<%= render :partial => 'blog', :collection => posts %>
</ul>
<% end %>
<% else %>
<p>
<strong>
There are no posts yet.
Click "Create New Post" to add your first post to your blog.
</strong>
</p>
<% end %>
<p>
<strong>
There are no posts yet.
Click "Create New Post" to add your first post to your blog.
</strong>
</p>
<% end %>
</div>

0 comments on commit e112f8d

Please sign in to comment.