3 <% if @selected_security %><em>on <%=@selected_security%></em><% end %>
6 <%= render :partial=>'portrait/smart_links', locals: { :item_to_portrait=>@selected_security, :shown_is=>:figures } %>
9 <%= form_tag({:action=>'index'}, :method=>:get, :id=>'controller_filter') do %>
11 <%= select_tag 'id_security', options_from_collection_for_select(@securities, :id, :to_s_with_symbol, @selected_security.id), prompt: '-- Select Security --' %>
12 <%= button_tag 'show', :name=>'show', :value=>'this' %>
13 <%= button_tag '<= previous', :name=>'show', :value=>'previous' %>
14 <%= button_tag 'next =>', :name=>'show', :value=>'next' %>
19 <%= form_for @figuredata, :url=>{action: :create}, :method=>:POST do |f| %>
20 <fieldset id='figuredata'>
21 <legend><% if @figuredata.id %>Edit <% else %>Add new<% end %>Figure Record</legend>
22 <%= f.hidden_field :id %>
23 <%= f.hidden_field :id_security %>
24 <div style='display: block; float: left;'>
25 <%= f.number_field :value, :step=>0.01, :placeholder=>'The value.' %><br/>
26 <%= f.select :id_figure_var, @figurevariables.collect{|v| [v.name, v.id] }, :prompt=>'-- Select Variable --' %><br/>
27 <%= f.number_field :value, :step=>0.01, :placeholder=>'The value.' %><br/>
28 <%= f.select :period, @figuredata.get_periods.collect{|p| [@figuredata.translate_period(p), p] }, :prompt=>'-- Select Period --' %><br/>
29 <%= f.date_field :time, :placeholder=>'Date Recorded.' %><br/>
30 <%= f.text_field :analyst, :placeholder=>'Who analysed?' %><br/>
32 <div>Value options:</div>
33 <%= f.check_box :is_expected %><%= label :new_figuredata, :is_expected %><br/>
34 <%= f.check_box :is_audited %><%= label :new_figuredata, :is_audited %><br/>
36 <div>Data entry options:</div>
37 <%= check_box_tag(:keep_form_open, true, @keep_form_open) %><%= label_tag :keep_form_open, 'Keep form open to add more data.' %><br/>
38 <%= number_field_tag(:scale_value, @scale_value, :placeholder=>'Scale the value.') %><%= label_tag :scale_value, 'thousands... billions...' %><br/>
40 <%= f.text_area :comment, :cols=>40, :rows=>7, placeholder: 'Remarks? Ie. how that number came up?' %>
41 <%= f.submit 'Save Figure Data' %>
51 <td class="smr_topic_menu" colspan="<%= @datayears.count %>">
52 <% @datayears.each do |y| %>
53 <%= link_to '>> %s' % y, '?year=%i' % y %>
60 <% if not @have_data %>
62 <tr><td colspan="<%= @datayears.count %>">
63 No figures recorded yet for this security and current year.
67 <% for row in 0...@datatable.rows %>
68 <tr <% if @datatable.rowspan(row) %>
69 <% if row>0 and @datatable.rowspan(row+1) %>class="separaterows"
70 <% elsif row>0 %>class="separaterows_rowspan"<% end %>
73 <% for col in 0...@datatable.columns %>
74 <% next if col==0 and not @datatable.rowspan(row) #skip blanked cells %>
76 <td <% if col==0 %>rowspan="<%=@datatable.rowspan(row)%>"<% end %>>
77 <%= if @datatable.link(row, col) then
78 link_to(smr_humanize(@datatable.cell(row, col), :scientific=>true), @datatable.link(row, col))
79 else smr_humanize(@datatable.cell(row, col), :scientific=>true) end %><%= @datatable.cell_unit(row, col) %>