Soc/app/views/blog_posts/index.html.erb

17 lines
388 B
Plaintext
Raw Normal View History

2024-03-06 20:31:14 +00:00
<section class="content">
<h2><%= t(".blog_posts") %></h2>
2023-10-05 18:46:09 +00:00
2024-03-06 20:31:14 +00:00
<%= link_to t(".new"), new_blog_post_path if logged_in? %>
2023-10-05 18:46:09 +00:00
2024-03-06 20:31:14 +00:00
<% if @blog_posts.empty? %>
<p><%= t(".empty") %></p>
<% else %>
<ul id="blog_posts">
<% @blog_posts.each do |blog_post| %>
<li><%= render blog_post %></li>
<% end %>
</ul>
<%= paginate @blog_posts %>
<% end %>
</section>