<div>
    <div class="form-group">
        <div>
            <label>{{ 'bids.labels.SUPPLIER_BIDS' | translate }}</label>
            <span class="selected-supplier-bid" ng-repeat="supplierBid in bid.supplierBids">{{supplierBid.bidNumber}}, </span>
        </div>
        <div>
            <div ng-click="showLinkBidDialog()" class="btn btn-primary">
                {{ 'bids.buttons.LINK_BID' | translate }}
            </div>
            <div ng-click="showSupBidDialog()" class="btn btn-primary">
                {{ 'bids.buttons.ADD_BID' | translate }}
            </div>
        </div>
    </div>

    <div ng-if="isLinkSupBidDialogVisible" ng-controller="linkSupplierBidsCtrl" ng-init="init(bid.supplierBids)">
        <div id="dialog-link-supplier-bid"
             dialog
             is-modal="true"
             has-buttons="true"
             on-confirmation="$parent.linkSuppliers"
             on-close="showLinkBidDialog"
             parameters="{selectedBids}"
             buttons-names="{confirmation: 'Link Supplier Bids', cancel: 'Cancel'}"
             title="{{'bids.headers.LINK_SUPPLIER_BIDS' | translate}}">
             <?php include('LinkSupplierBidsTemplate.php'); ?>
        </div>
    </div>

    <div ng-if="isAddSupBidDialogVisible" ng-controller="addSupplierBidCtrl">
        <div id="dialog-add-supplier-bid"
             dialog
             is-modal="true"
             has-buttons="true"
             on-confirmation="saveSupplierBid"
             on-close="showSupBidDialog"
             buttons-names="{confirmation: 'Add Supplier Bid', cancel: 'Cancel'}"
             title="{{'bids.headers.SUPPLIER_BID' | translate}}">
             <?php include('AddSupplierBidTemplate.php'); ?>
        </div>
    </div>
</div>
