1 <h1><%= @headline %></h1>
4 <%= form_for @stock, :url=>{action: :create}, :method=>:POST do |f| %>
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=>'Some URL' %><br/>
16 <%= f.submit 'Save Security' %>
18 <div style='display: block; float: left;'>
19 <%= f.text_area :comment, :cols=>40, :rows=>15, placeholder: 'What is this company or paper about?' %>
27 <p>No securities exist yet.</p>
31 <table id='securities' border>
34 <th><%= paginate @stocks %></th>
41 <% @stocks.each do |s| %>
44 <%= link_to '+', controller: 'objects/stock', action: 'edit', id: s.id %>
48 <td><%= s.symbol %><%= s.StockSymbolextension %></td>
49 <td><%= s.StockQuotesource %></td>
50 <td><%= s.fetch_quote %></td>
53 <td colspan=4><%= s.comment %></td>