| 
1 | 1 | <% if @trip %>  | 
2 |  | -	<h2>Items for <%= @trip.name %></h2>  | 
 | 2 | +	<h2 class="page-header"><%= @trip.name %></h2>  | 
3 | 3 | 	<button id="add-expense">Add Expense</button>  | 
4 | 4 | <% elsif wishlist %>  | 
5 | 5 |   <h2>Wishlist for <%= @wishlist.name %></h2>  | 
6 | 6 | <% end %>  | 
7 | 7 | 
 
  | 
8 | 8 | <% if @trip %>  | 
9 | 9 | 
 
  | 
 | 10 | +<div class="row placeholders">  | 
10 | 11 | <%= form_for [@trip, @expense] do |f| %>  | 
11 | 12 |   <% if @expense.errors.any? %>  | 
12 | 13 |     <div id="error_explanation">  | 
 | 
20 | 21 |     </div>  | 
21 | 22 |   <% end %>  | 
22 | 23 | 
 
  | 
23 |  | -    <%= f.text_field :location_id, class: "location", placeholder: "Enter a location" %>  | 
 | 24 | +    <%= f.text_field :location_id, class: "location", placeholder: "Enter a location" %><br>  | 
24 | 25 |     <%= f.text_field :cost, class: "currency", placeholder: "Enter cost" %>  | 
25 | 26 |     <%= f.select :currency_id, Currency.all.collect {|currency| [ currency.code, currency.id ] }, {:include_blank => "Currency"}, class: "currency" %>  | 
26 |  | -    <%= f.text_field :usd_cost, readonly: true, placeholder: "USD", class: "currency" %>  | 
 | 27 | +    <%= f.text_field :usd_cost, readonly: true, placeholder: "USD", class: "currency" %><br>  | 
27 | 28 |     <%= f.hidden_field :description, value: "Enter a description" %>  | 
28 | 29 | 
 
  | 
29 |  | -    <%= f.select :category_id, Category.all.collect {|category| [ category.name, category.id ] }, {:include_blank => "Select Category"} %>  | 
 | 30 | +    <%= f.select :category_id, Category.all.collect {|category| [ category.name, category.id ] }, {:include_blank => "Select Category"} %><br><br>  | 
30 | 31 | 
 
  | 
31 |  | -    <%= f.date_field :date, :value => Time.now.strftime('%Y-%m-%d') %>  | 
 | 32 | +<!--     <%= f.date_field :date, :value => Time.now.strftime('%Y-%m-%d') %> -->  | 
32 | 33 |     <%= f.submit "Submit" %>  | 
33 | 34 | <% end %>  | 
 | 35 | +</div>  | 
 | 36 | + | 
34 | 37 | 
 
  | 
35 | 38 | <% expenses.each do |expense| %>  | 
36 | 39 |   <div class="item_box">  | 
37 | 40 |     <%= expense.location.name %><br>  | 
38 | 41 |     <%= expense.currency.code %>  | 
39 | 42 |     <%= expense.cost %> |  | 
40 | 43 |     <%= expense.usd_cost %> |  | 
41 |  | -    <%= expense.category.name %> |  | 
42 |  | -    <%= best_in_place expense, :date %><br>  | 
 | 44 | +    <%= expense.category.name %><br>  | 
43 | 45 |     <%= best_in_place expense, :description, type: :textarea %>  | 
44 | 46 |     <%= button_to "delete", {:controller => :expenses, :action => 'destroy', :id => expense.id }, method: 'delete' %>  | 
45 | 47 |   </div>  | 
 | 
51 | 53 |     <div class="item_box">  | 
52 | 54 |       <%= expense.location.name %><br>  | 
53 | 55 |       <%= expense.usd_cost %> |  | 
54 |  | -      <%= expense.category.name %> |  | 
55 |  | -      <%= expense.date %><br>  | 
 | 56 | +      <%= expense.category.name %><br>  | 
56 | 57 |       <%= expense.description %>  | 
57 | 58 |       <%= button_to "delete", {:controller => :expenses, :action => 'destroy', :id => expense.id }, method: 'delete' %>  | 
58 | 59 |     </div>  | 
 | 
0 commit comments