1 <h1><%= @headline %></h1>
4 <%= form_for @stock, :url=>{action: :create}, :method=>:POST do |f| %>
5 <fieldset id='stock' style='float:left;'>
6 <legend><% if @stock.id %>Edit<% else %>Add<% end %> Security</legend>
7 <%= f.hidden_field :id %>
8 <div style='display: block; float: left;'>
9 <%= f.text_field :name, :size=>25, :placeholder=>'Name' %><br/>
10 <%= f.text_field :symbol, :size=>12, :placeholder=>'Trading Symbol' %>
11 <%= f.select :id_stock_symbolextension, @symbolextensions.collect{|se| [se.extension, se.id] }, :prompt=>'-- Select Extension --' %>
12 via <%= f.select :id_stock_quotesource, @quotesources.collect{|qs| [qs.source, qs.id] }, :prompt=>'-- Select Source --' %>
15 <%= f.url_field :url, :size=>25, :placeholder=>'Link to Investor Relations page' %><br/>
16 <%= f.label :fetch_quote %><%= f.check_box :fetch_quote %><br/>
17 <%= f.submit 'Save Security' %>
19 <div style='display: block; float: left;'>
20 <%= f.text_area :comment, :cols=>40, :rows=>15, placeholder: 'What is this company or paper about?' %>
24 <% if @stock.fetch_quote and @quote_retrieval_status %>
25 <table class='quote_retrieval_status'>
26 <thead><tr><th colspan='2'>Quote Retrieval Status</th></thead>
28 <% @quote_retrieval_status.each do |k,v| %>
29 <tr><td><%= k %>:</td><td><%= v %></td></tr>
38 <p>No securities exist yet.</p>
42 <table id='securities' border>
45 <th><%= smr_paginate @page, @total_pages, objects_stock_index_path %></th>
52 <% @stocks.each do |s| %>
55 <%= link_to '+', controller: 'objects/stock', action: 'edit', id: s.id %>
59 <td><%= s.symbol %><%= s.StockSymbolextension %></td>
60 <td><%= s.StockQuotesource %></td>
61 <td><%= s.fetch_quote %></td>
64 <td colspan=4><%= s.comment %></td>