<?php defined('BASEPATH') or exit('No direct script access allowed'); ?>

<?php init_head(); ?>

<script>
var settings = <?= json_encode($settings); ?>;
</script>

<div id="wrapper">
	<div class="breadcrumb">
		<a href="<?php echo admin_url(); ?>"><?= _l('breadcrumb_dashboard'); ?></a>&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;<?php echo html_entity_decode($title); ?>
	</div>
    <div class="admin-title">
		<h1><?= $this->config->item('icons')['invoices']; ?><?php echo _l($title); ?></h1>
    </div>
	<div class="content">
		<div class="row">
            <div class="col-md-12">
                <div class="panel_s mbot10">
                    <div class="panel-body _buttons">
                        <?php if(has_permission('invoices','','create')){ ?>
                            <a href="<?php echo admin_url('invoices/import/upload'); ?>" class="btn btn-info pull-left new new-invoice-list mright5"> <?php echo _l('import'); ?></a>
                        <?php } ?>
                    </div>
                </div>
            </div>
		</div>
        <!-- Providers -->
        <?php if (!isset($selectedProviderId)): ?>
            <?php $this->load->view('admin/invoices/import/providers_template'); ?>
        <?php endif; ?>

        <?php if (isset($selectedProviderId)): ?>
            <?php $this->load->view('admin/invoices/import/provider_import_template'); ?>
        <?php endif; ?>
	</div>
</div>
<?php show_footer(); ?><?php init_tail(); ?>

</body>
</html>