<div class="row" ng-include="'app-content/header.html?ver=199'" style=" margin:0 0 50px; "></div>

<section class="pt-5 mt-5">
	<div class="container-fluid">
		<div class="row mx-0 ">
			
			
			
<div class="tab-pane show active col-12" ng-if="vm.screen=='listing'" id="v-pills-study">
	<div class="row">
	   <div class="col-12">
			<div ng-class="{ 'alert': flash, 'alert-success': flash.type === 'success', 'alert-danger': flash.type === 'error' }" ng-if="flash" ng-click="flash.type=false; flash.message='';">{{flash.message}}<span class="close" ng-show="flash.message!=''" data-dismiss="alert" aria-label="close" title="close">×</span></div>
		</div>
	   <div class="box form-box bg-white rounded-xl w-100 px-lg-4 py-lg-4 py-4 px-2">
		  <div class="col-12">
			 <div class="d-flex align-items-center mb-3">
				<input type="text" class="form-control mr-2" placeholder="Enter your text" ng-change="vm.currentPage = 0" ng-model="vm.search.client_name">
				<div class="input-group-append">
				   <button class="btn btn-primary btn-search d-flex align-items-center rounded-lg"><span class="flaticon-search"></span> Search</button>
				</div>
			 </div>
		  </div>
		  <div class="col-12 mt-4 d-flex justify-content-between">
			 <p class="h6 font-weight-bold">Advanced Search</p>
			 <a href="javascript:;" ng-click="hideAdvanceSearch=!hideAdvanceSearch"><span class="flaticon-down-arrow"></span></a>
		  </div>
		  <div class="collapse  w-100 mt-4" id="demo" ng-class="{'show':!hideAdvanceSearch}">
			 <div class="col-12 d-flex justify-content-between flex-wrap flex-md-nowrap">
				<div class="form-group">
				   <label for="">Domain</label>
				   <select class="form-control" ng-model="vm.search.domain">
					  <option value="">Select All</option>
					  <option ng-repeat="dom in vm.tree.domains" ng-value="dom.id" class="ng-binding ng-scope" ng-bind="dom.name"></option>
				   </select>
				</div>
				<div class="form-group">
				   <label for="">Country</label>
				   <select class="form-control" ng-model="vm.search.country">
					  <option value="">Select All</option>
					  <option value="US">US</option>
					  <option value="USA">USA</option>
					  <option value="London">London</option>
					  <option value="UK">UK</option>
					  <option value="AUS">AUS</option>
					  <option value="Australia">Australia</option>
					  <option value="Belgium">Belgium</option>
					  <option value="Cyprus">Cyprus</option>
					  <option value="Spain">Spain</option>
					  <option value="New Zealand">New Zealand</option>
					  <option value="France">France</option>
					  <option value="Switzerland">Switzerland</option>
					  <option value="Israel">Israel</option>
					  <option value="Isreal">Isreal</option>
					  <option value="Singapore">Singapore</option>
					  <option value="Canada">Canada</option>
					  <option value="Netherlands">Netherlands</option>
					  <option value="Denmark">Denmark</option>
					  <option value="ScotLand">ScotLand</option>
					  <option value="CEO">CEO</option>
					  <option value="Norway">Norway</option>
					  <option value="Holland">Holland</option>
					  <option value="Germany">Germany</option>
					  <option value="Mexico">Mexico</option>
					  <option value="Iceland">Iceland</option>
				   </select>
				</div>
				<div class="form-group">
				   <label for="">Ratings</label>
				   <select class="form-control" ng-model="vm.search.rating">
					  <option  value="">Select All</option>
					  <option  value="4">4 Star or Above</option>
					  <option  value="3">3 Star</option>
					  <option  value="2">2 Star</option>
					  <option  value="1">1 Star</option>
					  <option  value="-1">Not Rated</option>
				   </select>
				</div>
				<div class="form-group">
				   <label for="">Category</label>
				   <select class="form-control" ng-model="vm.search.cat_id">
					  <option  value="">Select All</option>
					  <option  ng-repeat="cat in vm.tree.categories" ng-value="cat.id" class="ng-binding ng-scope" ng-bind="cat.name"></option>
				   </select>
				</div>
				<div class="form-group">
				   <label for="">Tags</label>
				   <select class="form-control" ng-model="vm.search.tags">
					  <option  value="">Select All</option>
					  <option  ng-repeat="tag in vm.tree.tags" ng-value="tag.id" class="ng-binding ng-scope" ng-bind="tag.title"></option>
				   </select>
				</div>
				<div class="form-group">
				   <label for="">Year</label>
				   <select class="form-control" ng-model="vm.search.creation_date">
					  <option value="">Select All</option>
					  <option value="2020">2020</option>
					  <option value="2019">2019</option>
					  <option value="2018">2018</option>
					  <option value="2017">2017</option>
					  <option value="2016">2016</option>
					  <option value="2015">2015</option>
					  <option value="2014">2014</option>
					  <option value="2013">2013</option>
					  <option value="2012">2012</option>
					  <option value="2011">2011</option>
					  <option value="2010">2010</option>
					  <option value="2009">2009</option>
				   </select>
				</div>
			 </div>
		  </div>
	   </div>
	</div>
	
	<div class="row ">
	   <div class="col-12">
				<div class="form-group  pull-right ">
					<button class="btn btn-outline-primary shadow-sm float-right mb-4" ng-click="vm.screen='add_video'">+ Videos</button>
				</div>	   
	   </div>
	   <div class="col-12">
		  <div class="heading-sec d-flex justify-content-between flex-md-row flex-column">
			 <h2 class="h3 font-weight-bold mb-4" >All Videos ({{filterData.length}})   </h2>
			 <div class="filter-sec d-flex">
				<div class="form-group mr-4 d-flex align-items-center">
				   <label for="sel1">Sort By</label>
				   <select class="form-control" ng-model="vm.orderByField">
					  <option value="client_name">Name</option>
					  <option value="domain_name">Domain</option>
					  <option value="average_rating">Ratings</option>
					  <option value="uploaded_at">Upload Date</option>
				   </select>
				</div>
				<div class="form-group mr-4 d-flex align-items-center">
				   <select class="form-control" ng-model="vm.reverseSort">
					  <option value="1">Desc</option>
					  <option value="0">Asc</option>
				   </select>
				</div>
				<div class="form-group d-flex align-items-center">
				   <label for="sel1">Show</label>
				   <select class="custom-select w-auto custom-select-sm form-control form-control-sm " ng-model="vm.pageSize" name="pageSize" id="pageSize">
					  <option value="5">5</option>
					  <option value="10">10</option>
					  <option value="25">25</option>
					  <option value="50">50</option>
					  <option value="10000000">All</option>
				   </select>
				</div>

				
			 </div>
		  </div>
		  <div class="table-responsive">
			 <table class="table ">
				<thead>
				  <tr >
					<th style="width:5%;">#</th>
					<th style="width:30%;"><a role="button" class="text-primary" ng-click="vm.orderByField='title'; vm.reverseSort = !vm.reverseSort">Title &nbsp;<i ng-class="(vm.reverseSort == true)?'fa fa-long-arrow-down':'fa fa-long-arrow-up'" aria-hidden="true" ng-show="vm.orderByField == 'title'"></i></a></th>
					<th style="width:10%;"><a role="button" class="text-primary" ng-click="vm.orderByField='client_name'; vm.reverseSort = !vm.reverseSort">Client &nbsp;<i ng-class="(vm.reverseSort == true)?'fa fa-long-arrow-down':'fa fa-long-arrow-up'" aria-hidden="true" ng-show="vm.orderByField == 'client_name'"></i></a></th>
					<th  style="width:15%;"><a role="button" class="text-primary" ng-click="vm.orderByField='youtube_video_id'; vm.reverseSort = !vm.reverseSort">Video &nbsp;<i ng-class="(vm.reverseSort == true)?'fa fa-long-arrow-down':'fa fa-long-arrow-up'" aria-hidden="true" ng-show="vm.orderByField == 'youtube_video_id'"></i></a></th>
					<th  style="width:10%;"><a role="button" class="text-primary" ng-click="vm.orderByField='cat_name'; vm.reverseSort = !vm.reverseSort">Category &nbsp;<i ng-class="(vm.reverseSort == true)?'fa fa-long-arrow-down':'fa fa-long-arrow-up'" aria-hidden="true" ng-show="vm.orderByField == 'cat_name'"></i></a></th>
					<th  style="width:10%;"><a role="button" class="text-primary" ng-click="vm.orderByField='status'; vm.reverseSort = !vm.reverseSort">Status &nbsp;<i ng-class="(vm.reverseSort == true)?'fa fa-long-arrow-down':'fa fa-long-arrow-up'" aria-hidden="true" ng-show="vm.orderByField == 'status'"></i></a></th>
					<th  style="width:10%;"><a role="button" class="text-primary" ng-click="vm.orderByField='website'; vm.reverseSort = !vm.reverseSort">Website &nbsp;<i ng-class="(vm.reverseSort == true)?'fa fa-long-arrow-down':'fa fa-long-arrow-up'" aria-hidden="true" ng-show="vm.orderByField == 'website'"></i></a></th>
					<th  style="width:15%;">Action &nbsp;</th>
				  </tr>
				</thead>				 
				<tbody>
				   <tr ng-repeat="data in filterData = (vm.tree.nodes | filter:vm.search.creation_date | filter:vm.search.tags | filter: vm.search.client_name | filter:vm.search.country | filter:vm.search.domain | filter:vm.search.rating | filter:vm.search.cat_id | orderBy:vm.orderByField:(vm.reverseSort == 1? true:false))  | startFrom:vm.currentPage*vm.pageSize | limitTo: vm.pageSize ">
						<td>{{vm.currentPage * vm.pageSize + $index + 1}}</td>
						<td ng-bind="data.title">Title</td>
						<td ng-bind="data.client_name">Client Name</td>
						<td ><a href="javascript:;" ng-click="vm.openRatingModel(data.id, 'video')" ng-bind="data.youtube_video_id" >Youtube Video ID</a></td>
						<td ng-bind="data.cat_name">Category Name</td>
						<td ng-bind="data.status">Status</td>
						<td ng-bind="data.website"></td>
						<td>
							<a role="button" class="btn btn-primary shadow-sm" ng-click="vm.screen='add_video'; vm.video=data; vm.selectVideoIndex=data.id; vm.getCountryStates(data.country);"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Edit</a>  
							<a role="button" class="btn btn-outline-primary shadow-sm" ng-click="vm.screen='add_video'; vm.video=data; vm.selectVideoIndex=data.id; vm.getCountryStates(data.country);"><i class="fa fa-eye" aria-hidden="true"></i> View</a>  
						</td>
				   </tr>
				</tbody>
			 </table>
		  </div>
		  <h1  ng-if="!filterData.length">No Record Found{{filterData.length}}</h1	>
		  <ul class="pagination justify-content-center" ng-if="filterData.length">
			 <li class="page-item"><button class="page-link"  ng-disabled="vm.currentPage <= 0" ng-click="vm.currentPage=(vm.currentPage-1)"><span class="flaticon-down-arrow rotate-left"></span></button></li>
			 <li class="page-item" ng-repeat="page in vm.GetPager(filterData.length, vm.currentPage, vm.pageSize).pages" >
				<a ng-click="vm.currentPage=page-1" href="javascript:;" class="page-link" ng-class="{active:vm.currentPage == page-1}">{{page}}</a>
			 </li>
			 <li class="page-item"><button class="page-link"  class="page-link"  ng-disabled="vm.currentPage >= filterData.length/vm.pageSize - 1" ng-click="vm.currentPage=(vm.currentPage+1)"><span class="flaticon-down-arrow rotate-right"></span></a></li>
		  </ul>
	   </div>
	</div>
</div>			
			

<div class="tab-pane show active col-12" ng-if="vm.screen=='add_video'">


    <div class="container-fluid pb-5">
		<div class="row">
		
		    <div class="col-12">
			<div ng-class="{ 'alert': flash, 'alert-success': flash.type === 'success', 'alert-danger': flash.type === 'error' }" ng-if="flash" ng-click="flash.type=false; flash.message='';">{{flash.message}}<span class="close" ng-show="flash.message!=''" data-dismiss="alert" aria-label="close" title="close">×</span></div>
		    </div>
		    
			<div class="col-12 mb-3 border-bottom">
				<h3 class="h3 mb-4" ng-bind="vm.video.id != null ? 'Edit Video' : 'Add video'"></h3><!--{{vm.selectVideoIndex}}-->
			</div>
			               
                
                 </div>
                 
           <form name="form" ng-submit="vm.add_video('ve')" role="form"> 
			  <div class="col-8 m-auto">
				  <div class="row">
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Title <!--{{vm.selectVideoIndex}}--></div>
                    </div>
                    <input type="text" class="form-control" placeholder="Enter Title" aria-label="Input group example"  ng-model="vm.video.title" required aria-describedby="btnGroupAddon">
                    <span ng-show="vm.video.title.$dirty && vm.video.title.$error.required" class="help-block">Title is required</span>
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Video ID</div>
                    </div>
                    <input type="text" class="form-control" placeholder="Enter Video ID" aria-label="Input group example" ng-model="vm.video.youtube_video_id" aria-describedby="btnGroupAddon">
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Client Name*</div>
                    </div>
                    <input type="text" class="form-control" placeholder="Enter Client Name" aria-label="Input group example" ng-model="vm.video.client_name" required aria-describedby="btnGroupAddon">
                    <span ng-show="vm.video.client_name.$dirty && vm.client_name.title.$error.required" class="help-block">Client Name is required</span>
                  </div>
            </div> 
			<div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Country</div>
                    </div>
					<select class="form-control" ng-model="vm.video.country" ng-change="vm.getCountryStates(vm.video.country);"  ng-class="{ 'has-error': vm.video.country.$dirty && vm.video.country.$error.required }" required>
                        <option>Select</option>  
                        <option ng-repeat="dom in vm.tree.countries" value="{{dom.id}}" >{{dom.name}}</option>
                    </select>
                  </div>
            </div>
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">State</div>
                    </div>                    
					<select class="form-control" ng-model="vm.video.state" ng-class="{ 'has-error': vm.video.state.$dirty && vm.video.state.$error.required }" required>
                        <option>Select</option>  
                        <option ng-repeat="dom in vm.tree.states" value="{{dom.id}}">{{dom.name}}</option>
                    </select>
					
                  </div>
            </div> 			
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">City</div>
                    </div>
                    <input type="text" class="form-control" placeholder="Enter City" ng-model="vm.video.city" aria-label="Input group example" aria-describedby="btnGroupAddon">
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Company Name</div>
                    </div>
                    <input type="text" class="form-control" placeholder="Enter Company Name" ng-model="vm.video.company_name" aria-label="Input group example" aria-describedby="btnGroupAddon">
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Designation</div>
                    </div>
                    <input type="text" class="form-control" placeholder="Enter Designation" aria-label="Input group example" ng-model="vm.video.designation" aria-describedby="btnGroupAddon">
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Quote</div>
                    </div>
                    <input type="text" class="form-control" placeholder="Enter Quote" aria-label="Input group example" ng-model="vm.video.quote" aria-describedby="btnGroupAddon">
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Enter Domain</div>
                    </div>
                    <select class="form-control" ng-model="vm.video.domain" ng-class="{ 'has-error': vm.video.domain.$dirty && vm.video.domain.$error.required }" required>
                        <option>Select</option>  
                        <option ng-repeat="dom in vm.tree.domains" value="{{dom.id}}">{{dom.name}}</option>
                    </select>
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Category*</div>
                    </div>
                    <select class="form-control" ng-model="vm.video.cat_id" ng-class="{ 'has-error': vm.video.cat_id.$dirty && vm.video.cat_id.$error.required }" required>
						<option value="">Select</option>
						<option ng-repeat="cat in vm.tree.categories" value="{{cat.id}}">{{cat.name}}</option>
				</select>
                  </div>
            </div> 
           
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Status</div>
                    </div>
                    <select class="form-control" ng-model="vm.video.status">
						<option value="">Select</option>
						<option value="Raw">Raw</option>
						<option value="Editing">Editing</option>
						<option value="Unlisted">Unlisted</option>
						<option value="Private">Private</option>
						<option value="Public">Public</option>
                    </select>
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Live on Website</div>
                    </div>
					<select class="form-control" ng-model="vm.video.website">
						<option value="0">No</option>
						<option value="1">Yes</option>
				    </select>
                  </div>
            </div> 
            <div class="col-6 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Video Creation Year</div>
                    </div>
                    <select class="form-control" ng-model="vm.video.creation_date">
						<option value="">Select</option>
						<option value="2020">2020</option>
						<option value="2019">2019</option>
						<option value="2018">2018</option>
						<option value="2017">2017</option>
						<option value="2016">2016</option>
						<option value="2015">2015</option>
						<option value="2014">2014</option>
						<option value="2013">2013</option>
						<option value="2012">2012</option>
					</select>	
                  </div>
            </div> 
            <div class="col-12 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Remark</div>
                    </div>
                    <textarea class="form-control" placeholder="Enter Remarks" aria-label="Input group example" aria-describedby="btnGroupAddon" ng-model="vm.video.remarks"></textarea>
                  </div>
            </div>  
            
            <div class="col-12 mt-3">
                  <div class="input-group">
                    <div class="input-group-prepend">
                      <div class="input-group-text" id="btnGroupAddon">Tag</div>
                    </div>
                    <select class="form-control" ng-init="vm.video.tagsDummy = vm.video.tags != null ? vm.video.tags.split(',') : []" ng-model="vm.video.tagsDummy" multiple size="4">
						<option ng-repeat="tag in vm.tree.tags | orderBy : title" value="{{tag.id}}" ng-selected="vm.inSelectedTags(tag.id, vm.video.tags)">{{tag.title}}{{tag.id}}</option>
				</select>
				
                  </div>
                  <a href="javascript:;" class="btn  shadow-sm float-right mb-4" ng-click="vm.openedTag=true;">+ Tags</a>
            </div>   
            
            <div class="col-12 mt-5 mb-4 mx-auto text-center">
               <button ng-click="vm.screen='listing'; vm.resetValues(); vm.video.tagsDummy=vm.video.tags;" class="btn btn-secondary btn-lg ng-binding">Back</button>
               <button type="submit" ng-disabled="form.$invalid || vm.dataLoading" class="btn btn-primary btn-lg" ng-bind="vm.video.id != null ? 'Save' : 'Submit'"></button>
				<img ng-if="vm.dataLoading" src="data:image/gif;base64,R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==" />
            </div>
             </div>
             </div>
            </form>
       
    </div>



</div>	

			
			
		</div>
	</div>
</section>


<div class="modal d-block" ng-if="vm.openedVideo!=false" id="ratingModal">
	<div class="modal-dialog" ng-class="{'modal-xl':vm.openedVideo.type!='rating'}">
	  <div class="modal-content">
  
		<!-- Modal Header -->
		<div class="modal-header border-0 p-0">
		  <button type="button" class="close" ng-click="vm.openRatingModel(false, 'video')">&times;</button>
		</div>
  
		<div class="embed-responsive embed-responsive-16by9" ng-if="vm.openedVideo.type!='rating'">
		  <iframe class="embed-responsive-item" ng-src="{{vm.trustSrc(vm.openedVideo.youtube_video_url)}}"></iframe>
		</div>  
  
		<!-- Modal body -->
		<div class="modal-body pt-5 text-center" ng-if="vm.openedVideo.type=='rating'">
		  <div class="img-sec">
			  <img ng-src="https://img.youtube.com/vi/{{vm.openedVideo.youtube_video_id}}/0.jpg" alt="thumb" />
		  </div>
		  <h3 class="font-weight-bold mt-4 h3">Liked it?</h3>
		  <p  class="h6 px-5">If you like our video, Please take<br/> a moment to rate it</p>
		</div>
		<div class="ratings-footer text-center" ng-if="vm.openedVideo.type=='rating'">
			<a href="javascript:;" ng-click="vm.openedVideo.user_rating = 1"><span class="flaticon-star " ng-class="{'active':vm.openedVideo.user_rating > 0}"></span></a>
			<a href="javascript:;" ng-click="vm.openedVideo.user_rating = 2"><span class="flaticon-star " ng-class="{'active':vm.openedVideo.user_rating > 1}"></span></a>
			<a href="javascript:;" ng-click="vm.openedVideo.user_rating = 3"><span class="flaticon-star " ng-class="{'active':vm.openedVideo.user_rating > 2}"></span></a>
			<a href="javascript:;" ng-click="vm.openedVideo.user_rating = 4"><span class="flaticon-star " ng-class="{'active':vm.openedVideo.user_rating > 3}"></span></a>
			<a href="javascript:;" ng-click="vm.openedVideo.user_rating = 5"><span class="flaticon-star " ng-class="{'active':vm.openedVideo.user_rating > 4}"></span></a>
			
		</div>
		<!-- Modal footer -->
		<div class="modal-footer justify-content-between p-0" ng-if="vm.openedVideo.type=='rating'">
			<button type="button" class="btn btn-default m-0 w-50 text-center rounded-0" ng-click="vm.openRatingModel(false, 'video')">Cancel</button>
			<button type="button" class="btn btn-primary m-0 w-50 text-center rounded-0" ng-click="vm.saveRating(vm.openedVideo.user_rating)">Submit</button>
		</div>
  
	  </div>
	</div>
</div>
<div class="modal d-block" ng-if="vm.openedTag!=false" id="ratingModal">
	<div class="modal-dialog">
	  <div class="modal-content">
  
		<!-- Modal Header -->
		<div class="modal-header border-0 p-0">
		  <button type="button" class="close" ng-click="vm.openedTag=false;">&times;</button>
		</div>
  
		
  
		<!-- Modal body -->
		<div class="modal-body pt-5 text-center">
				  <form ng-submit="vm.newTag(vm.video.tagsDummy,tagName)" name="tagform" role="tagform">
				   
				    <div class="form-group">
				      <input type="text" class="form-control rounded-sm" ng-model="tagName" id="tagname" placeholder="Enter Tag Name" required>
				       <div class="invalid-feedback" ng-show="form.password.$dirty && form.password.$error.required">Please enter tag name.</div>
				    </div>
				    <button type="submit" class="btn btn-primary w-100 mt-4 py-3" ng-disabled="tagform.$invalid || vm.dataLoading">Add Tag</button>
				   
				  </form>
		</div>

		
	  </div>
	</div>
  </div>
<div class="modal-backdrop show" ng-if="vm.openedVideo!=false || vm.openedTag!=false"></div>

