fix(templates): fix an issue with the maximum number of templates displayed (#883)

pull/889/head
Anthony Lapenna 2017-05-24 14:38:53 +02:00 committed by GitHub
parent 3356fd9815
commit 0f3fcb2917
2 changed files with 2 additions and 7 deletions

View File

@ -250,7 +250,7 @@
<rd-widget-body classes="padding template-widget-body"> <rd-widget-body classes="padding template-widget-body">
<div class="template-list"> <div class="template-list">
<!-- template --> <!-- template -->
<div dir-paginate="tpl in templates | filter:state.filters:true | itemsPerPage: state.pagination_count" class="template-container" id="template_{{ tpl.index }}" ng-click="selectTemplate(tpl.index, $index)"> <div ng-repeat="tpl in templates | filter:state.filters:true" class="template-container" id="template_{{ tpl.index }}" ng-click="selectTemplate(tpl.index, $index)">
<div class="template-main"> <div class="template-main">
<!-- template-image --> <!-- template-image -->
<span class=""> <span class="">
@ -289,7 +289,7 @@
<div ng-if="!templates" class="text-center text-muted"> <div ng-if="!templates" class="text-center text-muted">
Loading... Loading...
</div> </div>
<div ng-if="(templates | filter:state.filters:true | itemsPerPage: state.pagination_count).length == 0" class="text-center text-muted"> <div ng-if="(templates | filter:state.filters:true).length == 0" class="text-center text-muted">
No templates available. No templates available.
</div> </div>
</div> </div>

View File

@ -5,7 +5,6 @@ function ($scope, $q, $state, $stateParams, $anchorScroll, $filter, Config, Cont
selectedTemplate: null, selectedTemplate: null,
showAdvancedOptions: false, showAdvancedOptions: false,
hideDescriptions: $stateParams.hide_descriptions, hideDescriptions: $stateParams.hide_descriptions,
pagination_count: Pagination.getPaginationCount('templates'),
formValidationError: '', formValidationError: '',
filters: { filters: {
Categories: '!', Categories: '!',
@ -18,10 +17,6 @@ function ($scope, $q, $state, $stateParams, $anchorScroll, $filter, Config, Cont
name: '' name: ''
}; };
$scope.changePaginationCount = function() {
Pagination.setPaginationCount('templates', $scope.state.pagination_count);
};
$scope.addVolume = function () { $scope.addVolume = function () {
$scope.state.selectedTemplate.Volumes.push({ containerPath: '', name: '', readOnly: false, type: 'auto' }); $scope.state.selectedTemplate.Volumes.push({ containerPath: '', name: '', readOnly: false, type: 'auto' });
}; };