<!-- <div class="content-wrapper" ng-if="!myAccess.heroEdit">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-6 offset-sm-1 offset-md-2 offset-lg-3 mt-5">
                <div class="alert alert-warning alert-dismissible">
                    <h5><i class="icon fas fa-ban"></i> 	!</h5>
                    Unauthorised Access.
                </div>
            </div>
        </div>
    </div>
</div> -->

<div class="content-wrapper" class="modal-demo">
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="text-{{page.color}}">
                        <go-back/>
                        <i class="fas {{page.icon}}"></i> Upload Files
                    </h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a ng-href="{{baseurl}}/dashboard">Home</a></li>
                        <li class="breadcrumb-item text-blue"><a href="{{baseurl}}/heroes/list">Heres</a></li>
                        <li class="breadcrumb-item text-blue">Upload Files</li>
                    </ol>
                </div>
            </div>
        </div>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="card card-outline card-success sticky-top top-100">
                    <div class="card-body" id="formCard">
                           <!-- Add New Rows -->
                           <h5>Hero Name : {{empData.emp_first_name}} {{empData.emp_last_name}} - ({{empData.emp_code}})</h5>
                            <!-- Edit Form -->
                           <div ng-if="editform">
                            <div class="row">
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <label for="title">Title</label>
                                        <input type="text" id="title" class="form-control" ng-model="fileRow[0].title">
                                    </div>
                                </div>
                                <div class="col-sm-3">
                                    <div class="form-group">
                                        <br><br>
                                        <label for="is_show">Do you want this file to be visible to hero ? 
                                            <input type="checkbox" id="is_show" ng-model="fileRow[0].is_show"></label>
                                        </div>                            
                                </div>

                                <div class="col-sm-2">
                                    <div class="form-group">
                                        <br>
                                        <button type="button" class="btn btn-info float-left" ng-click="update(fileRow[0])">Update</button>
                                    </div>                            
                                </div>
                               
                            </div>
                        </div>
                        <!-- Edit ENd -->
                           
                           <div ng-repeat="row in rows" ng-if="addform">
                                <div class="row">
                                    <div class="col-sm-3">
                                        <div class="form-group">
                                            <label for="title">Title</label>
                                            <input type="text" id="title" class="form-control" ng-model="row.title">
                                        </div>
                                    </div>
                                    <div class="col-sm-3">
                                        <div class="form-group">
                                            <label for="file">Upload File</label>
                                            <input type="file" id="file"  class="form-control fileinput" file-model="row.file">
                                        </div>
                                    </div>
                                    <div class="col-sm-4">
                                        <div class="form-group">
                                            <label for="description">Description</label>
                                            <textarea  id="description" class="form-control" rows="1" ng-model="row.description"></textarea>
                                        </div>                            
                                    </div>
                                    <div class="col-sm-2">
                                        <div class="form-group">
                                            <label ></label><br>
                                            <button type="button" id="addRow" class="btn btn-info float-right" ng-click="addRow()"><i class="fas fa-plus"></i> Add Row</button>
                                            <button class="btn btn-danger" ng-click="removeRow($index)"><i class="fas fa-minus"></i> Remove</button>
                                        </div>                            
                                    </div>
                                    <div class="form-group">
                                        <label for="is_show">Do you want this file to be visible to hero ? <input type="checkbox" id="is_show" ng-model="row.isShow"></label>
                                    </div>
                                </div>
                            </div>
                         <!-- End Add New Rows -->
                     

                        <div ng-if="addform">
                            <div class="row">
                                <div class="col-12">
                                </div>
                            </div> <br>
                            <div class="row">
                                <div class="col-12">
                                    <button type="button" class="btn btn-success float-right" ng-click="add(data)"><i class="fas fa-save"></i> Upload File</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!--  -->
                <div class="col-12 col-md-12 col-lg-12">
                <div class="card card-outline card-success">
                    <div class="card-body">
                                <h5>Files List</h5>
                                <div class="table-responsive">
                                    <table id="masterList" class="table table-bordered table-sm">
                                        <thead>
                                        <tr>
                                            <th>Title</th>
                                            <th>Show To Hero</th>
                                            <th>Document</th>
                                            <th>Action</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr ng-repeat="dl in dataList">
                                            <td><strong>{{dl.title|capitalize}}</strong></td>
                                            <td><strong><i class="fa fa-{{dl.is_show ? 'check' : 'times'}}"></i></strong></td>
                                            <td><strong><a href="{{baseurl}}/app/uploads/heroesFiles/{{dl.file_name}}" target="_blank">View Document</a> </strong></td>
                                            <td>
                                                <div class="btn-group btn-group-sm">
                                                    <!-- <button type="button" class="btn btn-xs bg-cyan" ng-click="edit(dl)"><i class="fas fa-pen-square" title="Edit"></i></button> -->
                                                    <button type="button" class="btn btn-xs bg-danger" ng-click="delete(dl.id)">Delete</button>
                                                    <button type="button" class="btn btn-xs bg-info" ng-click="edit(dl.id)">Edit</button>
                                                    <!-- <button type="button" class="btn btn-xs {{dl.status==false?'bg-danger':'bg-success'}}" ng-click="changeStatus(dl)">
                                                        <i class="fas fa-{{dl.status==true?'trash':'redo'}}" title="{{dl.status==false?'Inactive':'Active'}}"></i> {{dl.status==0?'Inactive':'Active'}}</button> -->
                                                </div>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                    </div>
                </div>
                </div>
                <!--  -->
            </div>
        </div>
    </section>
    <!-- <section class="content">
        <div class="row">
            <div class="col-md-12">
           
            </div>
        </div>
    </section> -->
</div>
