<div class="content-wrapper">
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="text-indigo">
                        <go-back/>
                        <i class="fas fa-envelope"></i> Shout Out List ({{shouts.length}})
                    </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 active">Shout Out</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>
    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <div class="card card-indigo card-outline">
                        <div class="card-header border-transparent">
                            <h3 class="card-title">&nbsp;</h3>
                            <div class="card-tools">
                                <div class="btn-group">
                                    <button ng-click="goTo($event,'ShoutOutAdd')" type="button" class="btn bg-indigo"><i class="fas fa-plus"></i> <span class="d-none d-lg-inline-block">Add Shout Out</span></button>
                                    <button type="button" title="Fullscreen Toggle" class="btn btn-dark toggle-fullscreen"><i class="fas fa-expand"></i></button>
                                    <button type="button" class="btn btn-dark" data-widget="collapse"><i class="fas fa-minus"></i></button>
                                </div>
                            </div>
                        </div>
                        <div class="card-body p-0">
                            <div class="table table-responsive">
                                <table id="heroshoutList" class="table table-bordered table-striped">
                                    <thead>
                                    <tr>
                                        <th>To Hero</th>
										<th>Created At</th>
										<th width="20%">Detail</th>
										<th>View Image</th>
                                        <th>Actions</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr ng-repeat="shout in shouts">
                                        
                                        <td><span class="nowrap">{{shout.emp_first_name +' '+shout.emp_last_name | capitalize}} ({{shout.emp_code}})</span></td>	
										 <td><span class="nowrap">{{shout.created_at | datetz:'DD-MMM-YY'}}</span></td>
										<td><span class="">{{shout.shout_data | capitalize}}</span><br></td>
										<td>
                                         <div><a href="#" ng-click="viewImgModel(shout)">View Image</a></div>
                                        </td>
                                        <td>
                                            <div class="btn-group nowrap" ng-if="shout.status!=1">
                                              <a ng-href="{{baseurl+'/shoutouts/edit/'+shout.shout_id}}"><button type="button" class="btn bg-indigo"><i class="fas fa-pen"></i> Edit</button></a>                                          
                                         </div>
                                         <div class="btn bg-success" ng-if="shout.status==1">
                                            Approved
                                         </div>
                                         </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <script type="text/ng-template" id="DeleteContact.html">
        <div class="">
            <div class="modal-header bg-danger">
                <h3 class="modal-title" id="modal-title">Delete Tip {{data.tip.title}}</h3>
            </div>
            <div class="modal-body" id="modal-body"><p>Are you sure to delete this tip</p></div>
            <div class="modal-footer bg-danger">
                <button class="btn btn-default" type="button" ng-click="ok()">Yes</button>
                <button class="btn btn-primary" type="button" ng-click="cancel()">No</button>
            </div>
        </div>
    </script>
</div>

    <script type="text/ng-template" id="Viewimg.html">
      <div class="">    
		 <div class="modal-body" id="modal-body" ng-repeat="a in shout">
			<a href="#" ng-if="a.image_url">   
			<img alt="{{a.image_url}}" ng-src="{{baseurl}}/app/uploads/shoutout/{{a.image_url}}" style="width:750px;height:500px;" />
			</a>
			<span ng-if="a.image_url==''">No Image<span>
         </div>
         <div class="modal-footer">
            <button class="btn btn-default" type="button" ng-click="cancel()">Close</button>
         </div>
      </div>
    </script>
