app/views/itsf/backend/resource/base/index.html.haml in itsf_backend-1.0.1 vs app/views/itsf/backend/resource/base/index.html.haml in itsf_backend-1.1.0
- old
+ new
@@ -11,10 +11,15 @@
= link_to new_resource_path, id: "link-to-#{controller.class.name.underscore.gsub('_controller', '').gsub(/[\/_]/, '-')}-new", class: 'btn btn-success btn-responsive' do
%span.glyphicon.glyphicon-plus
%span.btn-text= t('.new', inflections)
.panel.panel-default.panel-with-actions
+ - if Itsf::Backend.features?(:kaminari)
+ .panel-heading
+ .pull-right.form-inline
+ = select_tag(:per_page, options_for_select({ '1': 1, '5': 5, '10': 10, '15': 15, '20': 20, '50': 50, '100': 100, t('.all') => 'all' }, (params[:per_page] || Itsf::Backend::Configuration.default_pagination_size)), 'data-select-pagination-size': true, id: 'pagination-size', class: 'form-control input-xs')
+ = button_tag(t('.reset_column_order'), class: 'btn btn-default btn-xs', data: { 'reset-column-order': true})
- if Itsf::Backend.features?(:ransack)
.panel-body
#filter
= search_form_for(@q, url: collection_path, class: 'form-inline', html: { 'data-auto-submit': true }) do |f|
#scopes.bottom-margin-1
@@ -27,20 +32,22 @@
= link_to t('ransack.reset'), {},class: 'btn btn-danger'
- else
= f.submit
.table-responsive
- = render_collection(@collection, resource_class, as: :bootstrap_table) do |table|
+ = render_collection(@collection, resource_class, as: :bootstrap_table, table_html_options: { class: 'table table-responsive table-condensed table-striped table-hover dragtable' }) do |table|
= render 'table', table: table
= render 'table_actions', table: table
.panel-footer
- if Itsf::Backend.features?(:kaminari)
.row
.col-md-4
.col-md-4
.text-center= paginate @collection, theme: 'twitter-bootstrap-3'
.col-md-4
+
+= render 'index_extras', collection: @collection
.well.well-sm
.btn-container-right
= link_to root_path, class: 'btn btn-default btn-responsive' do
%span.glyphicon.glyphicon-arrow-left
\ No newline at end of file