Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplified show markup

  • Loading branch information...
commit 200968d58d9f580d0e86ae681e8dddcdf1ce74d8 1 parent eb55f36
@jcasimir jcasimir authored
Showing with 22 additions and 47 deletions.
  1. +11 −22 app/views/companies/show.html.erb
  2. +11 −25 app/views/people/show.html.erb
View
33 app/views/companies/show.html.erb
@@ -1,26 +1,15 @@
-<% title "Company" %>
+<div class="company">
+ <% title @company.name %>
-<p>
- <strong>Name:</strong>
- <%= @company.name %>
-</p>
-
-<p>
- <strong>Phone Numbers:</strong>
<%= render :partial => 'phone_numbers/phone_numbers', :object => @company.phone_numbers %>
-</p>
-
-<%= link_to "Add a New Phone Number", new_phone_number_path(:company_id => @company), :id => "new_phone_number" %>
+ <%= link_to "Add a New Phone Number", new_phone_number_path(:company_id => @company), :id => "new_phone_number" %>
-<p>
- <strong>Email Addresses:</strong>
<%= render :partial => 'email_addresses/email_addresses', :object => @company.email_addresses %>
-</p>
-
-<%= link_to "Add a New Email Address", new_email_address_path(:company_id => @company), :id => "new_email_address" %>
-
-<p>
- <%= link_to "Edit", edit_company_path(@company) %> |
- <%= link_to "Destroy", @company, :confirm => 'Are you sure?', :method => :delete %> |
- <%= link_to "View All", companies_path %>
-</p>
+ <%= link_to "Add a New Email Address", new_email_address_path(:company_id => @company), :id => "new_email_address" %>
+
+ <ul>
+ <li><%= link_to "Edit", edit_company_path(@company) %></li>
+ <li><%= link_to "Destroy", @company, :confirm => 'Are you sure?', :method => :delete %></li>
+ <li><%= link_to "View All", companies_path %></li>
+ </p>
+</div>
View
36 app/views/people/show.html.erb
@@ -1,29 +1,15 @@
-<% title "Person" %>
+<div class="person">
+ <% title "#{@person.last_name}, #{@person.first_name}" %>
-<p>
- <strong>First Name:</strong>
- <%= @person.first_name %>
-</p>
-<p>
- <strong>Last Name:</strong>
- <%= @person.last_name %>
-</p>
-<p>
- <strong>Phone Numbers:</strong>
<%= render :partial => 'phone_numbers/phone_numbers', :object => @person.phone_numbers %>
-</p>
+ <%= link_to "Add a New Phone Number", new_phone_number_path(:person_id => @person.id ) %>
-<%= link_to "Add a New Phone Number", new_phone_number_path(:person_id => @person.id ) %>
-
-<p>
- <strong>Email Addresses:</strong>
<%= render :partial => 'email_addresses/email_addresses', :object => @person.email_addresses %>
-</p>
-
-<%= link_to "Add a New Email Address", new_email_address_path(:person_id => @person.id ), :id => "new_email_address" %>
-
-<p>
- <%= link_to "Edit", edit_person_path(@person) %> |
- <%= link_to "Destroy", @person, :confirm => 'Are you sure?', :method => :delete %> |
- <%= link_to "View All", people_path %>
-</p>
+ <%= link_to "Add a New Email Address", new_email_address_path(:person_id => @person.id ), :id => "new_email_address" %>
+
+ <ul class="actions">
+ <li><%= link_to "Edit", edit_person_path(@person) %></li>
+ <li><%= link_to "Destroy", @person, :confirm => 'Are you sure?', :method => :delete %></li>
+ <li><%= link_to "View All", people_path %></li>
+ </ul>
+</div>
Please sign in to comment.
Something went wrong with that request. Please try again.