<?php $__env->startSection('content'); ?>
<div class="col-md-12 content-header" >
    <h1><i class="fa fa-money"></i> Payment Methods</h1>
</div>

<section class="content">
    <div class="row">
        <div class="col-md-3">
            <?php echo $__env->make('settings.partials._menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        </div>
        <div class="col-md-9">
            <div class="panel panel-default">
                <div class="panel-heading">Payment Methods</div>
                <div class="panel-body">
                    <?php if(count($errors) > 0): ?>
                    <?php echo form_errors($errors); ?>

                    <?php endif; ?>
                    <?php if(Session::has('flash_notification.message')): ?>
                    <?php echo message(); ?>

                    <?php endif; ?>

                    <?php echo Form::open(['route' => ['settings.payment.store']]); ?>

                    <div class="form-group">
                        <?php echo Form::label('name', ' Name'); ?>

                        <div class="input-group col-md-4">
                        <?php echo Form::text('name', null, ['class' => "form-control", 'required']); ?>

                        </div>
                    </div>
                    <div class="form-group">
                        <?php echo Form::submit('Save', ['class="btn btn-info"']); ?>

                    </div>
                    <?php echo Form::close(); ?>


                    <table class="table table-striped table-bordered datatable">
                        <thead>
                        <tr>
                            <th></th>
                            <th>Name</th>
                            <th>Default</th>
                            <th>Action</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php if($payment_methods->count() > 0): ?>
                        <?php foreach($payment_methods as $method): ?>
                        <tr>
                            <td></td>
                            <td><?php echo e($method->name); ?></td>
                            <td><?php echo $method->selected  ? '<span class="label label-success">Yes</span>' : '<span class="label label-danger">No</span>'; ?></td>
                            <td>
                                <?php echo edit_btn('settings.payment.edit', $method->id); ?>

                                <?php echo delete_btn('settings.payment.destroy', $method->id); ?>

                            </td>
                        </tr>
                        <?php endforeach; ?>
                        <?php endif; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>