Skip to content

Commit

Permalink
Minor fixes to contact carts
Browse files Browse the repository at this point in the history
  • Loading branch information
djcp committed Apr 28, 2010
1 parent 5561410 commit 7fbb14b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
6 changes: 2 additions & 4 deletions app/views/contact_carts/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<h1>Editing contact_cart</h1>
<% form_for(@contact_cart) do |f| %>
<%= f.error_messages %>
<p><%= f.label :user_id %><br/>
<%= f.text_field :user_id %></p>
<p><%= f.label :name %><br/>
<%= f.text_field :name %></p>
<p><%= f.label :title %><br/>
<%= f.text_field :title %></p>
<p><%= f.label :global %><br/>
<%= f.check_box :global %></p>
<p><%= f.submit 'Update' %></p>
Expand Down
34 changes: 18 additions & 16 deletions app/views/contact_carts/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<h1>Contact Carts</h1>
<% if @session_user.active_contact_cart %>
<h3>Active Cart <%= link_to '(clear active)', contact_cart_clear_active_path %></h3>
<%= render :partial => 'carts', :locals => {:contact_carts => [@session_user.active_contact_cart] } %>
<% end %>
<% if @my_contact_carts %>
<h3>My Carts</h3>
<%= render :partial => 'carts', :locals => {:contact_carts => @my_contact_carts} %>
<% end %>
<% if @global_contact_carts %>
<h3>Global Carts</h3>
<%= render :partial => 'carts', :locals => {:contact_carts => @global_contact_carts ||[]} %>
<% end %>
<% if !@my_contact_carts and !@global_contact_carts and !@session_user.active_contact_cart %>
<h3>You have none. Create a contact cart on the <%= link_to 'Contact Page', :controller => '/admin/dashboard', :action => :contacts %>.</h3>
<% end %>
<div class="dashboard-list fullwidth">
<h2>Contact Carts</h2>
<% if @session_user.active_contact_cart %>
<h3>Active Cart <%= link_to '(clear active)', contact_cart_clear_active_path %></h3>
<%= render :partial => 'carts', :locals => {:contact_carts => [@session_user.active_contact_cart] } %>
<% end %>
<% if @my_contact_carts %>
<h3>My Carts</h3>
<%= render :partial => 'carts', :locals => {:contact_carts => @my_contact_carts} %>
<% end %>
<% if @global_contact_carts %>
<h3>Global Carts</h3>
<%= render :partial => 'carts', :locals => {:contact_carts => @global_contact_carts ||[]} %>
<% end %>
<% if !@my_contact_carts and !@global_contact_carts and !@session_user.active_contact_cart %>
<h3>You have none. Create a contact cart on the <%= link_to 'Contact Page', :controller => '/admin/dashboard', :action => :contacts %>.</h3>
<% end %>
</div>

0 comments on commit 7fbb14b

Please sign in to comment.