Skip to content

Commit

Permalink
Add super templete
Browse files Browse the repository at this point in the history
  • Loading branch information
kk_Ataka committed Apr 18, 2012
1 parent 246645e commit 809a1d3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 25 deletions.
18 changes: 6 additions & 12 deletions app/views/ads/index.html.erb
@@ -1,12 +1,6 @@
<html>
<head>
</head>
<body>
<h1>Welcome</h1>
<ul>
<% @ads.each do |ad| %>
<li><a href='/ads/<%= ad.id %>'><%= ad.name %></a></li>
<% end %>
</ul>
</body>
</html>
<h1>Welcome</h1>
<ul>
<% @ads.each do |ad| %>
<li><a href='/ads/<%= ad.id %>'><%= ad.name %></a></li>
<% end %>
</ul>
20 changes: 7 additions & 13 deletions app/views/ads/show.html.erb
@@ -1,13 +1,7 @@
<html>
<head>
</head>
<body>
<h1>Welcome</h1>
<b>Name:</b><%= @ad.name %>
<b>Description:</b><%= @ad.description %>
<b>Price:</b><%= @ad.price %>
<b>Seller Id:</b><%= @ad.seller_id %>
<b>Email:</b><%= @ad.email %>
<b>Img:</b><img src='<%= @ad.img_url %>' />
</body>
</html>
<h1>Welcome</h1>
<b>Name:</b><%= @ad.name %>
<b>Description:</b><%= @ad.description %>
<b>Price:</b><%= @ad.price %>
<b>Seller Id:</b><%= @ad.seller_id %>
<b>Email:</b><%= @ad.email %>
<b>Img:</b><img src='<%= @ad.img_url %>' />
25 changes: 25 additions & 0 deletions app/views/layouts/ads.html.erb
@@ -0,0 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ads: <%= controller.action_name %></title>
<%= stylesheet_link_tag 'default.css' %>
</head>
<body>
<div id="wrapper">
<div id="header">
<div>
<h1>MeBay</h1>
<ul id="nav">
<li><a href="/ads/">All Ads</a></li>
</ul>
</div>
</div>
<div id="content">
<%= yield %>
</div>
<div id="clearfooter"></div>
</div>
<div id="footer"></div>
</body>
</html>

0 comments on commit 809a1d3

Please sign in to comment.