public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
insoshi / app / views / blogs / show.html.erb
100644 29 lines (25 sloc) 0.825 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<%- column_div :type => :primary do -%>
  <h2>Blog for <%= h @blog.person.name %></h2>
 
  <%- if @posts.empty? -%>
    <h3 class="blankslate">
      No posts yet!
      <%- if current_person?(@blog.person) -%>
        <%= link_to "Write a post", new_blog_post_path(@blog) %>
      <%- end -%>
    </h3>
  <%- else -%>
    <ul class="list blog full">
      <%= render :partial => 'posts/blog_post', :collection => @posts %>
    </ul>
  <%- end -%>
  
  <%= will_paginate(@posts) %>
<%- end -%>
 
<%- column_div :type => :secondary do -%>
  <%- if current_person?(@blog.person) -%>
  <h2>Add new post</h2>
 
  <%= render :partial => 'posts/blog_form',
             :locals => { :url => blog_posts_path(@blog),
                          :method => :post } %>
  <%- end -%>
  <%= render :partial => 'shared/minifeed' %>
<%- end -%>