portrait Security and Organization records
[smr.git] / gui / app / views / blog / index.html.erb
blob54ca0759ff33a55d3fd52e5487fa1064406d9d49
1 <h1>Blog</h1>
3 <% if @article %>
4     <%= form_for @article, :url=>{action: :create}, :method=>:POST do |f| %>
5      <fieldset id='article'>
6       <legend>New Blog Post</legend>
7         <%= f.hidden_field :id %>
8         <%= f.text_field :title, :size=>45, :placeholder=>'Headline' %><br/>
9         <%= f.text_area :comment, :cols=>50, :rows=>20, placeholder: 'Some valuable insights.' %>
10         <br/>
11         <%= f.submit 'Save Article' %>
12       </div>
13      </fieldset>
14     <% end %>
15 <% end %>
17 <% if @blogroll.empty? then  %>
18     <p>No commentary happened in the past four weeks.</p>
19 <% else %>
20     <div class='blogitem spacer' />
22     <div class='blogindex'>
23         <h3>Index</h3>
24         <ul>
25         <% @blogroll.each do |i| %>
26           <li><%= link_to i.title, blog_index_path(:anchor=>i.id) %>
27               <span>on <%= smr_humanize i.date, :time_for_humans=>true %></span></li>
28         <% end %>
29         </ul>
30     </div>
32     <% @blogroll.each do |i| %>
33     <div class='blogitem' id='<%= i.id %>'>
34         <h3><%= i.title %></h3> 
35         <%= link_to '+', i.link.to_url if i.link and not (i.type=='Comment' and i.date<7.days.ago) %>
36         <span>recorded <%= i.type %> at <%= i.date %></span>
37         <p class="comment_text"><%= i.body %></p>
38     </div>
39     <% end %>
40 <% end %>