<% if @records %> <% for column in current_table.columns %> <% if not column.name =~ /metas_id$/ then %> <% end %> <% end %> <% if params[:show_originals] %> <% end %> <% if not current_table.class.name =~ /View$/ %> <% end %> <% record_index = 0 %> <% for record in @records %> <% record_index = record_index + 1 %> <% column_index = 0 %> <% for column in current_table.columns %> <% if not column.name =~ /metas_id$/ then %> <% column_index = column_index + 1 %> <% color_index = (column_index % 2 + record_index % 2) %> <% color = "#FFFFFF;" if color_index == 2 %> <% color = "#DDDDDD;" if color_index == 1 %> <% color = "#BBBBBB;" if color_index == 0 %> <% end %> <% end %> <% if params[:show_originals] %> <% end %> <% if record.class.columns.map {|col| col.name}.include?("id") %> <% end %> <% end %> <% else %> <% end %>
">
<%= column.human_name %>
style="right:0px;top:0px;"> <%= link_to_remote image_tag("up.png"), :update => 'survey_table', :before => "table_reload()", :url => { :action => 'list_inline', :order => "#{column.name}", :state_id => @state_id} %> <%= link_to_remote image_tag("down.png"), :update => 'survey_table', :before => "table_reload()", :url =>{ :action => 'list_inline', :order => "#{column.name} DESC", :state_id => @state_id} %> <% if column.name != "id" %> <%=link_to image_tag("pie-chart.png"), :action => 'chart', :chart_type => :pie, "chart[column1]" => column.name, "chart[column2]" => "", "chart[aggregation_column]"=>"*", "chart[aggregation_function]" => "COUNT", :state_id => @state_id %> <%=link_to image_tag("bar-chart.png"), :action => 'chart', :chart_type => :bar, "chart[column1]" => column.name, "chart[column2]" => "", "chart[aggregation_column]"=>"*", "chart[aggregation_function]" => "COUNT", :state_id => @state_id %> <% if Chart.column_supports_type?(column,"line") then %><%= link_to image_tag("line-chart.png"), :action => 'chart', :chart_type => :line, "chart[column1]" => column.name, "chart[column2]" => "", "chart[aggregation_column]"=>"*", "chart[aggregation_function]" => "COUNT", :state_id => @state_id %><% end %> <% end %>
Original Message <%= link_to_remote image_tag("show.png"), :update => 'survey_table', :before => "table_reload()", :url => { :action => 'list_inline', :show_originals => !params[:show_originals], :state_id => @state_id} unless params[:show_originals]%>
>
<%= format_column(record,column,record_index) %>
style="right:0px;top:0px;"> <%= link_to_remote image_tag("remove.png"), :update => 'edit_filter', :url => { :controller=> 'filters', :action => 'add_condition', :column => column.name, :operator => '!=', :value => record[column.name], :state_id => @state_id}, :before => "table_reload()", :loaded => 'update_table()' %> <%= link_to_remote image_tag("add.png"), :update => 'edit_filter', :url => { :controller=> 'filters', :action => 'add_condition', :column => column.name, :operator => '=', :value => record[column.name], :state_id => @state_id}, :before => "table_reload()", :loaded => 'update_table()' %>
<%=h record.original_text %><%= link_to image_tag("show.png", :title => 'Show'), :action => 'show', :id => record["id"], :state_id => @state_id %>
No records to display.