diff options
| author | cedricnjanga | 2017-11-03 10:09:13 +0100 | 
|---|---|---|
| committer | cedricnjanga | 2017-11-06 10:26:16 +0100 | 
| commit | 078f03093f23f6979f6a6065809a84fe0859ea04 (patch) | |
| tree | aae77aba13a3695927b065e8d3ae6a07398e5ec0 | |
| parent | 9ac53bd73a96bd48b670b159e333c24cdff8f19f (diff) | |
| download | chouette-core-078f03093f23f6979f6a6065809a84fe0859ea04.tar.bz2 | |
Refs #4838 Add pagination to CCS#index
| -rw-r--r-- | app/controllers/compliance_control_sets_controller.rb | 2 | ||||
| -rw-r--r-- | app/views/compliance_control_sets/index.html.slim | 2 | 
2 files changed, 3 insertions, 1 deletions
| diff --git a/app/controllers/compliance_control_sets_controller.rb b/app/controllers/compliance_control_sets_controller.rb index b45e85d49..956f26112 100644 --- a/app/controllers/compliance_control_sets_controller.rb +++ b/app/controllers/compliance_control_sets_controller.rb @@ -9,7 +9,7 @@ class ComplianceControlSetsController < InheritedResources::Base        scope = self.ransack_period_range(scope: @compliance_control_sets, error_message: t('imports.filters.error_period_filter'), query: :where_updated_at_between)        @q_for_form = scope.ransack(params[:q])        format.html { -        @compliance_control_sets = decorate_compliance_control_sets(@q_for_form.result) +        @compliance_control_sets = decorate_compliance_control_sets(@q_for_form.result.paginate(page: params[:page], per_page: 30))        }      end    end diff --git a/app/views/compliance_control_sets/index.html.slim b/app/views/compliance_control_sets/index.html.slim index 02d40c813..8ea9250b3 100644 --- a/app/views/compliance_control_sets/index.html.slim +++ b/app/views/compliance_control_sets/index.html.slim @@ -48,6 +48,8 @@                sortable: true,                links: [:show],                cls: 'table has-filter has-search' + +          = new_pagination @compliance_control_sets, 'pull-right'      - unless @compliance_control_sets.any?        .row.mt-xs          .col-lg-12 | 
