Skip to content

Commit

Permalink
Design changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jm committed Feb 5, 2010
1 parent e8a6ba3 commit 03b2c39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
10 changes: 7 additions & 3 deletions app/views/layouts/posts.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Posts: <%= controller.action_name %></title>
<title>My Blog Is Awesome</title>

<%= stylesheet_link_tag 'scaffold' %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
</head>
<body>

<p class="notice"><%= notice %></p>
<h1>My Blog Is Awesome</h1>

<%= yield %>
<p class="notice"><%= notice %></p>

<%= yield %>

</body>
</html>
24 changes: 3 additions & 21 deletions app/views/posts/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
<h1>Listing posts</h1>

<table>
<tr>
<th>Title</th>
<th>Body</th>
<th></th>
<th></th>
<th></th>
</tr>

<% @posts.each do |post| %>
<tr>
<td><%= post.title %></td>
<td><%= post.body %></td>
<td><%= link_to 'Show', post %></td>
<td><%= link_to 'Edit', edit_post_path(post) %></td>
<td><%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %></td>
</tr>
<h2><%= link_to post.title, post %></h2>
<p>posted at <%= post.created_at.strftime('%D') %></p>
<p><%= post.body %></p>
<% end %>
</table>

<br />
<%= link_to 'New post', new_post_path %>

0 comments on commit 03b2c39

Please sign in to comment.