5 <%= render :partial=>'asset/quote_form', locals: { :quote=>@quote, :securities=>@securities } %>
8 <%= search_form_for @watchlist.query, :url=>{:controller=>:watchlist, :action=>:index}, :class=>'filter_form, watchlist_filter', :id=>:controller_filter do |f| %>
10 <%= f.search_field :symbol_or_brief_or_Organization_name_cont_any, :placeholder=>'Pattern' %>
11 <%= f.submit :filter %>
14 <tr><th colspan="2">Generic Filters</th></tr>
15 <tr><td><%= check_box_tag :exclude_securities, true, @opt_exclude_securities %></td><td><%= f.label :exclude_held_securities %></td></tr>
17 <tr><td><%= check_box_tag :provides_collateral, true, @opt_provides_collateral %></td><td><%= f.label :provides_collateral %></td></tr>
19 <tr><td><%= check_box_tag :provides_cashflow, true, @opt_provides_cashflow %></td><td><%= f.label :provides_cashflow_this_year %></td></tr>
21 <tr><td><%= check_box_tag :provides_huge_coupon, true, @opt_provides_huge_coupon %></td><td><%= f.label :provides_huge_coupon %></td></tr>
23 <tr><td><%= check_box_tag :provides_subannual_payments, true, @opt_provides_subannual_payments %></td><td><%= f.label :provides_subannual_payments %></td></tr>
25 <tr><td><%= check_box_tag :matures_within_year, true, @opt_matures_within_year %></td><td><%= f.label :matures_within_year %></td></tr>
27 <tr><th colspan="2">Type of Security</th></tr>
28 <% Security.types.each do |t|
29 type_id_column = ('id_security_%s_gt' % t).to_sym
31 <tr><td><%= check_box_tag 'q[%s]' % type_id_column,
33 (if params[:q] and params[:q][type_id_column] then true else false end)
35 <%= label_tag 'q[%s][]' % type_id_column, Security.describe_type(t) %></td></tr>
38 <tr><th colspan="2">Bond Properties</th></tr>
39 <% SecurityBond.types.each do |t| %>
40 <tr><td><%= check_box_tag 'q[SecurityBond_type_eq_any][]',
42 (if params[:q] and params[:q][:SecurityBond_type_eq_any] and params[:q][:SecurityBond_type_eq_any].include?(t.second.to_s) then true else false end)
44 <%= label_tag 'q[SecurityBond_type_eq_any][]', SecurityBond.describe_type(t.first) %></td></tr>
47 <tr><th colspan="2">Stock Properties</th></tr>
48 <% SecurityStock.types.each do |t| %>
49 <tr><td><%= check_box_tag 'q[SecurityStock_type_eq_any][]',
51 (if params[:q] and params[:q][:SecurityStock_type_eq_any] and params[:q][:SecurityStock_type_eq_any].include?(t.second.to_s) then true else false end)
53 <%= label_tag 'q[SecurityStock_type_eq_any][]', SecurityStock.describe_type(t.first) %></td></tr>
59 <div id='watchlist_overview' class="overview_counters">
61 <li>Items Found: <span><%= @watchlist.count %></span></li>
65 <table id='watchlist'>
75 <th><%= sort_link @watchlist.query, :current_yield, 'CY', default_order: :desc %></th>
76 <th><%= sort_link @watchlist.query, :yield_to_maturity, 'YTM', default_order: :desc %></th>
77 <th><%= sort_link @watchlist.query, :yield_to_call, 'YTC', default_order: :desc %></th>
78 <th><%= sort_link @watchlist.query, :cashflow_this_year, 'Cashflow this Year', default_order: :desc %></th>
79 <th><%= sort_link @watchlist.query, :collateral_coverage_ratio, 'Collateral Provided', default_order: :desc %></th>
83 <% @watchlist.each do |i| %>
84 <tr class="separaterows">
86 <%= link_to '+', watchlist_index_path(:intraday_data=>i.id, :anchor=>"watchlist_id#{i.id}"), :id=>"watchlist_id#{i.id}" %>
87 <%= link_to '...', i.security.link.to_url %>
89 <span class="symbol"><%=i.security.symbol%></span>
91 <td><%= i.quote.exchange %></td>
93 <% if i.quote.low or i.quote.high %>
94 <%= smr_humanize(i.quote.low) %> / <%= smr_humanize(i.quote.high) %>
97 <td><%= smr_humanize(i.quote.volume, :shortword=>true)%></td>
98 <td><%= smr_humanize i.quote.last %> <span class="<%= i.quote.css_class(smr_browse_date(:keep_current_time=>true), :intraday=>true) %>">•</span></td>
99 <td><%= smr_humanize(i.security.current_yield(i.quote), :scale=>2)%></td>
100 <td><%= smr_humanize(i.security.yield_to_maturity(i.quote), :scale=>2)%></td>
101 <td><%= smr_humanize(i.security.yield_to_call(i.quote), :scale=>2)%></td>
102 <td><%= smr_humanize(i.security.cashflow_this_year smr_browse_date)%></td>
103 <td><%= smr_humanize i.security.collateral_coverage_ratio %></td>
105 <% if @have_intraday_data == i.id %>
107 _have_shown_cashflow = false
108 @intraday_data.each do |q| %>
109 <tr class="have_intraday_data">
110 <td><%= smr_humanize(q.time, :date_time_only=>true) %></td>
111 <td><%= q.exchange %></td>
113 <% if q.low or q.high %>
114 <%= smr_humanize(q.low) %> / <%= smr_humanize(q.high) %>
117 <td><%= smr_humanize q.volume, :shortword=>true %></td>
118 <td><%= smr_humanize q.last %> </td>
119 <td><%= smr_humanize i.security.current_yield(q), :scale=>2 %></td>
120 <td><%= smr_humanize i.security.yield_to_maturity(q),:scale=>2 %></td>
121 <% unless _have_shown_cashflow %>
122 <td rowspan="<%= @intraday_data.count %>">
123 <div class="overview_container">
124 <table id="overview_cashflow">
126 <% i.security.cashflow(:start_date=>smr_browse_date).each do |c| %>
128 <td><%= smr_humanize c.date %></td>
129 <td><%= smr_humanize c.total, :scale=>2 %>
130 <% unless [0, 1.0].include? c.poolfactor %><span>pf=<%= smr_humanize c.poolfactor, :scale=>3 %></span><% end %>
133 <% _have_shown_cashflow = true