Skip to content

Commit

Permalink
fixed the tab thing
Browse files Browse the repository at this point in the history
  • Loading branch information
siyigu1 committed Apr 30, 2012
1 parent 7c92c57 commit d58d3a4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
10 changes: 5 additions & 5 deletions app/views/users/_addressDisplay.html.erb
Expand Up @@ -9,31 +9,31 @@ $(function() {
<h3><a href="#home">Home</a></h3>
<div>
<p>
<%= render "addresses/quickshow.html.erb", :@address => params[:home] %>
<%= render "addresses/quickshow.html.erb", :@address => home %>
</p>
</div>
<h3><a href="#office">Office</a></h3>
<div>
<p>
<%= render "addresses/quickshow.html.erb", :@address => params[:office] %>
<%= render "addresses/quickshow.html.erb", :@address => office %>
</p>
</div>
<h3><a href="#school">School</a></h3>
<div>
<p>
<%= render "addresses/quickshow.html.erb", :@address => params[:school] %>
<%= render "addresses/quickshow.html.erb", :@address => school %>
</p>
</div>
<h3><a href="#travel">Travel</a></h3>
<div>
<p>
<%= render "addresses/quickshow.html.erb", :@address => params[:travel] %>
<%= render "addresses/quickshow.html.erb", :@address => travel %>
</p>
</div>
<h3><a href="#travel">Other</a></h3>
<div>
<p>
<%= render "addresses/quickshow.html.erb", :@address => params[:other] %>
<%= render "addresses/quickshow.html.erb", :@address => other %>
</p>
</div>

Expand Down
32 changes: 23 additions & 9 deletions app/views/users/show.html.erb
Expand Up @@ -2,19 +2,33 @@
Welcome to NomAddress <%= @user.first_name%>!

<p id="construction">The site is currently under construction, but you will be hearing from us soon!</p>
<p id="instruction">Select the address you would like to update below!</p>
</div>

<%= link_to "ABOUT PAGE", "/about" %>

<div id="address">

<% @user.addresses.each do |a| %>
<%= render "addresses/quickshow.html.erb", :@address => a %>
<% end %>
</div>
<div id="user_box">
<div id="buttons">
<%= render "addressDisplay.html.erb" %>
<p id="notice" style="text-align:center"><%= notice %></p>
<div id="buttons">
<% home = nil %>
<% office = nil %>
<% school = nil %>
<% travel = nil %>
<% other = nil %>
<% @user.addresses.each do |a| %>
<% if a.category == "Home" %>
<% home = a %>
<% elsif a.category == "Office" %>
<% office = a %>
<% elsif a.category == "School" %>
<% school = a %>
<% elsif a.category == "Travel" %>
<% travel = a %>
<% else %>
<% other = a %>
<% end %>
<% end %>
<%= render :partial => "addressDisplay.html.erb", :locals => {:home => home, :office => office, :school => school, :travel => travel, :other => other} %>

</div>

<div id="dialog-form" title="Create new user">
Expand Down

0 comments on commit d58d3a4

Please sign in to comment.