aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/general/blog.rhtml23
-rw-r--r--app/views/layouts/default.rhtml1
2 files changed, 24 insertions, 0 deletions
diff --git a/app/views/general/blog.rhtml b/app/views/general/blog.rhtml
new file mode 100644
index 000000000..7972cfcf6
--- /dev/null
+++ b/app/views/general/blog.rhtml
@@ -0,0 +1,23 @@
+<% @title = "WhatDoTheyKnow blog" %>
+
+<h1><%=@title %></h1>
+
+<div id="blog">
+
+<%=@output%>
+
+<% for item in @items: %>
+ <div class="blog_post">
+ <h2><a href="<%=item['link']%>"><%=h item['title'] %></a></h2>
+ <p class="subtitle">Posted on <%= simple_date(Time.parse(item['pubDate'][0])) %> by <%=h item['creator'] %></p>
+ <div><%= item['encoded'] %></div>
+ <p><em>
+ <a href="<%=item['comments'][0]%>"><%=item['comments'][1]%> comments</a>
+ </em>
+ </p>
+ </div>
+<% end %>
+
+<p><a href="<%=@all_url%>">See all posts</a></p>
+
+</div>
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index a76440d93..43715fea9 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -115,6 +115,7 @@
<% if @user %>
<li><%=link_to "My requests", user_url(@user) %></li>
<% end %>
+ <li><%= link_to "Read blog", blog_url %></li>
<li><%= link_to "Help", about_url %></li>
</ul>
<% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>