Browse files

Made slight changes to restaurants view

  • Loading branch information...
1 parent f96eb81 commit af0b5702912f5d7a5eb4cad9e440a90ca5e81e85 @brennascurlock brennascurlock committed May 2, 2011
Showing with 11 additions and 9 deletions.
  1. +4 −6 app/views/restaurants/index.html.erb
  2. +3 −3 app/views/restaurants/show.html.erb
  3. +4 −0 public/stylesheets/screen.css
View
10 app/views/restaurants/index.html.erb
@@ -1,18 +1,16 @@
-<h1>Listing restaurants</h1>
+<h1>Restaurants</h1>
<table>
<% @restaurants.each do |restaurant| %>
<tr>
- <td><%= restaurant.name %></td>
+ <td><%= link_to restaurant.name, restaurant %></td>
<td><%= restaurant.location %></td>
- <td><%= "Closed" if restaurant.open == false %></td>
- <td><%= link_to 'Show', restaurant %></td>
- <td><%= link_to 'Edit', edit_restaurant_path(restaurant) %></td>
- <td><%= link_to 'Destroy', restaurant, :confirm => 'Are you sure?', :method => :delete %></td>
+ <td><%= "Closed" if restaurant.open == false %></td>
</tr>
<% end %>
+
</table>
<br />
View
6 app/views/restaurants/show.html.erb
@@ -10,10 +10,10 @@
<%= @restaurant.location %>
</p>
-<p>
- <b>Open:</b>
- <%= @restaurant.open %>
+<p id="closed">
+ <% @restaurant.open %>
</p>
+
<p>Visits:
<% @visits.each do |visit|%>
<%= visit.date %>
View
4 public/stylesheets/screen.css
@@ -76,6 +76,10 @@ p{
padding:5px 10px;
}
+p.closed{
+ color:red;
+}
+
section.page{
padding: 5px;
background-color:#DBE3E3;

0 comments on commit af0b570

Please sign in to comment.