% title "'#{@table.name}'"%>
Table: <%= @table.name %>
<%= link_to '+ ADD', table_new_path(@table), remote: true, class: 'button small' %>
- <%= render '/rails_db/shared/exp_col' %>
- <%= link_to raw("#{fa_icon('table')} Records"), table_data_path(@table), remote: true %>
- <%= link_to raw("#{fa_icon('tasks')} Schema"), table_path(@table), remote: true %>
- <%= select_top_from_table(@table.name) %>
-
<%= fa_icon 'download' %> Export
-
<%= fa_icon 'th-large' %> Functions
- <%= link_to raw("#{fa_icon('cogs')} Settings"), '#', :class => 'settings-link', :table_name => "#{@table.name}" %>
- <%= link_to raw("#{fa_icon('search')} Search"), '#', :class => 'search-link' %>
- <%= link_to raw("#{fa_icon('trash-o')} Truncate Table"), table_truncate_path(@table), data: {confirm: 'Are you sure?'} %>
- <%= link_to raw("#{fa_icon('file-text-o')} Export table to CSV"), table_csv_path(@table) %>
<% if defined? Axlsx %>
- <%= link_to raw("#{fa_icon('file-excel-o')} Export table to Excel"), table_xlsx_path(@table, format: 'xls') %>
<% end %>
Total: <%= pluralize @records.total_count, 'record' %>
SQL
<% if @records.total_count > 10 %>
<%= form_tag table_pagination_path, method: :get, remote: true do %>
<%= select_tag :per_page, options_for_select([10, 15, 20, 50, 100, 200, 500], per_page), class: 'per_page_pagination_select' %>
<% end %>
<% end %>
<%= render 'sql', sql: @sql %>