added watchlist and position transfer feature
[smr.git] / gui / app / views / watchlist / index.html.erb
blobbb3f07069da18f3d827f67226ffb39fabb42c1fe
2 <h1>Watchlist</h1>
4 <% if @quote %>
5     <%= render :partial=>'asset/quote_form', locals: { :quote=>@quote, :securities=>@securities  } %>
6 <% end %>
8 <table id='watchlist'>
9   <thead>
10     <tr>
11     </tr>
12     <tr>
13         <th></th>
14         <th>Exchange</th>
15         <th>Low / High</th>
16         <th>Volume</th>
17         <th>Last Trade</th>
18     </tr>
19   </thead>
20   <tbody>
21   <% @watchlist.each do |i| %>
22     <tr class="separaterows">
23       <td>
24         <%= link_to '+', :intraday_data=>i.id %><%= i.stock.name %>
25         <span><%=i.stock.symbol%> <%= link_to 'IR', i.stock.url%></span>
26       </td>
27       <td><%= i.quote.exchange %></td>
28           <td>
29             <% if i.quote.low or i.quote.high %>
30                 <%= smr_humanize(i.quote.low) %> / <%= smr_humanize(i.quote.high) %>
31             <% end %>
32           </td>
33       <td><%= smr_humanize(i.quote.volume, :shortword=>true) %></td>
34       <td><%= smr_humanize(i.quote.quote) %> <span class="<%= i.quote.css_class(smr_browse_date(:keep_current_time=>true), :intraday=>true) %>">&bull;</span></td>
35     </tr>
36    <% if @have_intraday_data == i.id %>
37      <% @intraday_data.each do |q| %>
38        <tr class="have_intraday_data">
39           <td><%= smr_humanize(q.time, :date_time_only=>true) %></td>
40           <td><%= q.exchange %></td>
41           <td>
42             <% if q.low or q.high %>
43                 <%= smr_humanize(q.low) %> / <%= smr_humanize(q.high) %>
44             <% end %>
45           </td>
46           <td><%= smr_humanize(q.volume, :shortword=>true) %></td>
47           <td><%= smr_humanize(q.quote) %></td>
48        </tr>
49      <% end %>
50    <% end %>
51   <% end %>
52   </tbody>
53 </table>
55 <br/>