Skip to content

Instantly share code, notes, and snippets.

@leemcalilly
Forked from anonymous/news_posts#index
Created January 3, 2013 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leemcalilly/4447158 to your computer and use it in GitHub Desktop.
Save leemcalilly/4447158 to your computer and use it in GitHub Desktop.
/vendor/extensions/news_posts/app/views/refinery/news_posts/news_posts/index.html.erb
<section id="page">
<div class="container">
<div class="row">
<div class="span12">
<h1>News</h1>
<hr>
<div class="row">
<div class="span8">
<% @news_posts.each do |news_post| %>
<article class="row">
<% if news_post.featured_image %>
<div class="span2">
<%= link_to image_fu(news_post.featured_image, '400x', :class => "img-polaroid"), refinery.news_posts_news_post_path(news_post) %>
</div>
<div class="span6">
<h2><%= link_to news_post.title, refinery.news_posts_news_post_path(news_post) %></h2>
<h3><%=raw news_post.date.strftime("%b %e, %Y") %></h3>
<%=raw news_post.post %>
</div>
<% else %>
<div class="span8">
<h2><%= link_to news_post.title, refinery.news_posts_news_post_path(news_post) %></h2>
<h3><%=raw news_post.date.strftime("%b %e, %Y") %></h3>
<%=raw news_post.post %>
</div>
<% end %>
</article>
<% end %>
</div>
<div class="span4">
<h4>Recent Articles</h4>
<ul>
<% @news_posts.each do |news_post| %>
<li><%= link_to news_post.title, refinery.news_posts_news_post_path(news_post) %></li>
<% end %>
</ul>
</div>
</div>
</div>
</div>
</div><!-- /#page -->
</section><!-- /.container -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment