Data |
<% if current_table %>
<%= select("chart", "column1", current_table.columns.map {|c| c.name }.sort) %> |
<%= select("chart", "aggregation_function", Chart::AGGREGATION_FUNCTIONS) -%><%= select("chart", "aggregation_column", ["*"] + current_table.columns.map {|c| c.name} ) %> |
<%= select("chart", "column2", current_table.columns.map {|c| c.name }.sort, { :include_blank => true }) %> |
<%= select("chart", "column3", current_table.columns.map {|c| c.name }.sort, { :include_blank => true }) %> |
<% else %>
<%= text_field("chart", "column1",:size => 10) %> |
<%= select("chart", "aggregation_function", Chart::AGGREGATION_FUNCTIONS) -%><%= text_field("chart", "aggregation_column", {:default => "*",:size => 10}) %> |
<%= text_field("chart", "column2",:size => 10) %> |
<%= text_field("chart", "column3",:size => 10) %> |
<% end %>
|
<% ["1st","2nd","3rd"].each {|num| %>
<%= num %>-Order <%= short_help "How the data should be orderd in the chart", "Select an order an the chart will be ordered like this. SQL syntax is used here. For example COUNT(*) DESC means it will be orderd by COUNT(*) descending." %> |
<% Chart::ORDER_NAMES.each_with_index {|order_name,index| %>
<%= image_tag("up.png") %><%= radio_button "chart", "order_#{num}", "#{order_name}" %>
<%= image_tag("down.png") %><%= radio_button "chart", "order_#{num}", "#{order_name}_desc" %> |
<% } %>
<% if current_table %>
<%= radio_button "chart", "order_#{num}", "none" %><%= select("chart", "order_field_#{num}", @chart.possible_orders, { :include_blank => true } ) %>
<% else %>
| <%= text_field("chart", "order_by",:size => 10) %>
<% end %>
|
<% } %>