3 <%= form_tag({:action=>'index'}, method: :get) do %>
5 <%= select_tag 'id_stock', options_from_collection_for_select(@securities, "id", "name", @selected_security.id), prompt: '-- Select Security --' %>
6 <%= button_tag 'show', :name=>'show', :value=>'this' %>
7 <%= button_tag '<= previous', :name=>'show', :value=>'previous' %>
8 <%= button_tag 'next =>', :name=>'show', :value=>'next' %>
13 <%= form_for @figuredata, :url=>{action: :create}, :method=>:POST do |f| %>
14 <fieldset id='figuredata'>
15 <legend><% if @figuredata.id %>Edit <% else %>Add new<% end %>Figure Record</legend>
16 <%= f.hidden_field :id %>
17 <%= f.hidden_field :id_stock %>
18 <div style='display: block; float: left;'>
19 <%= f.select :id_figure_var, @figurevariables.collect{|v| [v.name, v.id] }, :prompt=>'-- Select Variable --' %><br/>
20 <%= f.select :period, @figuredata.get_periods.collect{|p| [@figuredata.translate_period(p), p] }, :prompt=>'-- Select Period --' %><br/>
21 <%= f.date_field :time, :placeholder=>'Date Recorded.' %><br/>
22 <%= f.text_field :analyst, :placeholder=>'Who analysed?' %><br/>
23 <%= f.number_field :value, :step=>0.01, :placeholder=>'The value.' %><br/>
25 <div>Value options:</div>
26 <%= f.check_box :is_expected %><%= label :new_figuredata, :is_expected %><br/>
27 <%= f.check_box :is_audited %><%= label :new_figuredata, :is_audited %><br/>
29 <div>Data entry options:</div>
30 <%= check_box_tag(:keep_form_open, true, @keep_form_open) %><%= label_tag :keep_form_open, 'Keep form open to add more data.' %><br/>
31 <%= number_field_tag(:scale_value, @scale_value, :placeholder=>'Scale the value.') %><%= label_tag :scale_value, 'thousands... billions...' %><br/>
33 <%= f.text_area :comment, :cols=>40, :rows=>15, placeholder: 'Remarks? Ie. how that number came up?' %>
34 <%= f.submit 'Save Figure Data' %>
40 <% if not @have_data %>
41 <p>No figures recorded yet for this security.</p>
48 <td colspan="<%= @datatable.columns %>">
49 <% @datayears.each do |y| %>
50 <%= link_to y, '?year=%i' % y %>
56 <% for row in 0...@datatable.rows %>
58 <% for col in 0...@datatable.columns %>
59 <% next if col == 0 and not @datatable.rowspan(row) #skip blanked cells %>
61 <td <% if col == 0 %>rowspan="<%=@datatable.rowspan(row)%>"<% end %>>
62 <%= if @datatable.link(row, col) then
63 link_to(smr_humanize(@datatable.cell(row, col), :scientific=>true), @datatable.link(row, col))
64 else smr_humanize(@datatable.cell(row, col), :scientific=>true) end %><%= @datatable.cell_unit(row, col) %>