diff --git a/client/src/js/components/bhBreadcrumb.js b/client/src/js/components/bhBreadcrumb.js index 346f19d81e..c4f5b6a429 100644 --- a/client/src/js/components/bhBreadcrumb.js +++ b/client/src/js/components/bhBreadcrumb.js @@ -4,7 +4,8 @@ angular.module('bhima.components') path: '<', button: '<', label: '<', - dropdown: '<' + dropdown: '<', + print : '<' }, templateUrl : 'partials/templates/breadcrumb.tmpl.html', controller : BreadcrumbController, @@ -99,6 +100,9 @@ function BreadcrumbController() { vm.bcDropdowns = vm.dropdown || []; + vm.buttonPrint = vm.print || []; + + /** call the appropriate function and update the dropdown label **/ vm.helperDropdown = function helperDropdown(child, parent) { parent.selected = child.label; diff --git a/client/src/partials/inventory/list/list.html b/client/src/partials/inventory/list/list.html index c61ea27a7c..3596f014fe 100644 --- a/client/src/partials/inventory/list/list.html +++ b/client/src/partials/inventory/list/list.html @@ -1,7 +1,9 @@ + path ="InventoryCtrl.bcPaths" + button ="InventoryCtrl.bcButtons" + print ="InventoryCtrl.buttonPrint" +> diff --git a/client/src/partials/inventory/list/list.js b/client/src/partials/inventory/list/list.js index d66927c102..ac7a66a208 100644 --- a/client/src/partials/inventory/list/list.js +++ b/client/src/partials/inventory/list/list.js @@ -33,12 +33,15 @@ function InventoryListController ($translate, Inventory, Notify, uiGridConstants { icon: 'fa fa-plus', label: $translate.instant('FORM.LABELS.ADD'), action: addInventoryItem, color: 'btn-default', dataMethod: 'create' - }, - { icon: 'fa fa-print', label: $translate.instant('FORM.LABELS.PRINT'), - action: printList, color: 'btn-default' } ]; + /** button Print */ + vm.buttonPrint = { + pdfUrl: '/inventory/reports/metadata' + }; + + // edit button template var editTemplate = '
' + ' {{ "FORM.BUTTONS.SEARCH" | translate }}
+
+ + +
diff --git a/client/src/partials/templates/breadcrumb.tmpl.html b/client/src/partials/templates/breadcrumb.tmpl.html index b2cd426c05..2c302454ca 100644 --- a/client/src/partials/templates/breadcrumb.tmpl.html +++ b/client/src/partials/templates/breadcrumb.tmpl.html @@ -40,6 +40,13 @@ + +
+ + +
+