<commit_before>'use strict';
angular.module('willPaginate')
.run(['$templateCache', function($templateCache){
  $templateCache.put('template/will_paginate/paginator.html',
  '<ul class="{{options.paginationClass}}">' +
  '  <li class="prev" ng-class="{true:\'disabled\'}[params.currentPage == 1]">' +
  '    <a ng-hide="params.currentPage == 1" ng-click="getPage(params.currentPage - 1)" class="ng-binding">{{options.previousLabel}}</a>' +
  '    <span ng-show="params.currentPage == 1" class="ng-binding ng-hide">{{options.previousLabel}}</span>' +
  '  </li>' +
  '  <li ng-class="{active:params.currentPage == page.value, disabled:page.kind == \'gap\' }" ng-repeat-start="page in collection">' +
  '    <span ng-show="params.currentPage == page.value || page.kind == \'gap\'">{{page.value}}</span>' +
  '    <a ng-hide="params.currentPage == page.value || page.kind == \'gap\'" ng-click="getPage(page.value)">{{page.value}}</a>' +
  '  </li>' +
  '  <li ng-repeat-end></li>' +
  '  <li class="next" ng-class="{true:\'disabled\'}[params.currentPage == params.totalPages]">' +
  '    <a ng-hide="params.currentPage == params.totalPages" ng-click="getPage(params.currentPage + 1)">{{options.nextLabel}}</a>' +
  '    <span ng-show="params.currentPage == params.totalPages">{{options.nextLabel}}</span>' +
  '  </li>' +
  '</ul>'
);
}])

.directive('willPaginate', function() {
  return {
    restrict: 'ACE',
    templateUrl: 'template/will_paginate/paginator.html',
    scope: {
      params: '=',
      config: '=',
      onClick: '='
    },
    controller: ['$scope',
      function($scope) {
        $scope.getPage = function(num){
          if($scope.onClick){
            $scope.onClick(num);
          }<commit_msg>Do not show paging when it's only one page<commit_after>'use strict';
angular.module('willPaginate')
.run(['$templateCache', function($templateCache){
  $templateCache.put('template/will_paginate/paginator.html',
  '<ul class="{{options.paginationClass}}" ng-show="params.totalPages > 1">' +
  '  <li class="prev" ng-class="{true:\'disabled\'}[params.currentPage == 1]">' +
  '    <a ng-hide="params.currentPage == 1" ng-click="getPage(params.currentPage - 1)">{{options.previousLabel}}</a>' +
  '    <span ng-show="params.currentPage == 1">{{options.previousLabel}}</span>'+
  '  </li>' +
  '  <li ng-class="{active:params.currentPage == page.value, disabled:page.kind == \'gap\' }" ng-repeat-start="page in collection">' +
  '    <span ng-show="params.currentPage == page.value || page.kind == \'gap\'">{{page.value}}</span>' +
  '    <a ng-hide="params.currentPage == page.value || page.kind == \'gap\'" ng-click="getPage(page.value)">{{page.value}}</a>' +
  '  </li>' +
  '  <li ng-repeat-end></li>' +
  '  <li class="next" ng-class="{true:\'disabled\'}[params.currentPage == params.totalPages]">' +
  '    <a ng-hide="params.currentPage == params.totalPages" ng-click="getPage(params.currentPage + 1)">{{options.nextLabel}}</a>' +
  '    <span ng-show="params.currentPage == params.totalPages">{{options.nextLabel}}</span>' +
  '  </li>' +
  '</ul>'
);
}])

.directive('willPaginate', function() {
  return {
    restrict: 'ACE',
    templateUrl: 'template/will_paginate/paginator.html',
    scope: {
      params: '=',
      config: '=',
      onClick: '='
    },
    controller: ['$scope',
      function($scope) {
        $scope.getPage = function(num){
          if($scope.onClick){
            $scope.onClick(num);
          }
{'fraction_non_alphanumeric': 0.23076923076923078, 'fraction_numerical': 0.0031810294968189707, 'mean_word_length': 3.771034482758621, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 48, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '667904', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1171, 'n_words': 163}