 <div class="uk-grid-small" uk-grid >
        <div class="uk-width-1-4 no-print">
       <div class="uk-card uk-card-default uk-card-body uk-padding-small">
	   <div class=" uk-float-left" v-if="!ist_fltrs.search.q==''"><a @click="ist_fltrs.search.q=''; search_ist_book()" class="uk-icon-link fa fa-close" ></a></div>
  <div> <strong><?=sprintf(lang('search_by_'),'')?>: </strong>{{ist_fltrs.search.name}} <span class="fa fa-caret-down"></span></div>
  <div uk-dropdown="mode: click" class=" uk-padding-small"> 


    <ul class="uk-nav uk-dropdown-nav">
        <li class="uk-active"><a href="#" @click="ist_fltrs.search.in='title'; ist_fltrs.search.name='<?=lang('book_title')?>'; ist_fltrs.page=1; search_ist_book()"><?=sprintf(lang('search_by_'),lang('book_title'))?></a></li>
        <li class="uk-active"><a href="#" @click="ist_fltrs.search.in='book_id'; ist_fltrs.search.name='<?=lang('book_id')?>'; ist_fltrs.page=1; search_ist_book()"><?=sprintf(lang('search_by_'),lang('book_id'))?></a></li>
        <li class="uk-nav-divider"></li>
        <li class="uk-active"><a href="#" @click="ist_fltrs.search.in='member_name'; ist_fltrs.search.name='<?=lang('mustair')?>'; ist_fltrs.page=1; search_ist_book()"></a></li>
        <li class="uk-active"><a href="#" @click="ist_fltrs.search.in='user_name'; ist_fltrs.search.name='<?=lang('amin_maktaba')?>';ist_fltrs.page=1; search_ist_book()"><?=lang('amin_maktaba_muir_mustarid')?></a></li>

    </ul>
</div>
					<input type="text" class="uk-input  uk-form-small" v-model="ist_fltrs.search.q"  v-on:keyup.enter="search_ist_book" placeholder="<?=lang('search_word')?>">
				
					
	</div>
	<div class="uk-card uk-card-default uk-card-body">
    <ul class="uk-nav-default uk-nav-parent-icon"  uk-nav="multiple: true" >
        

        <li class="uk-nav-divider"></li>
		<li class="uk-parent uk-active uk-open" >
         <div class=" uk-float-left" v-if="!ist_fltrs.return_options.codes.length==0"><a @click="ist_fltrs.return_options.codes=[]; ist_fltrs.page=1; search_ist_book()" class="uk-icon-link  fa fa-close" ></a></div>
		 <a><b><?=lang('ist_stts')?></b></a>
            <ul class="uk-nav-sub" >
                 <li v-for="row,index in ist_fltrs.return_options.rows"><label><input :value="row.val" class="uk-checkbox" @change="ist_fltrs.page=1; search_ist_book()" type="checkbox" v-model="ist_fltrs.return_options.codes"> {{row.opt}}</label></li>
            </ul>
        </li>
		<li class="uk-parent  uk-active uk-open" >
		
            <ul class="uk-nav-sub" v-if="_.indexOf(ist_fltrs.return_options.codes,0)==false" >
<div class=" uk-float-left" ><a @click="ist_fltrs.days_left.from=0; ist_fltrs.days_left.to=1000; search_ist_book()" class="uk-icon-link fa fa-close" ></a></div>
            <a><b><?=lang('days_left')?></b></a>
                <li>
				<label><input class="uk-radio" type="radio" name="radio2"  @change="ist_fltrs.days_left.to=0;ist_fltrs.days_left.from=0; fltrs.page=1; search_ist_book()"> <span style="color: red;"><?=lang('time_over')?></span> </label>
				</li>
                
                            
                <li>
				<label><input class="uk-radio" type="radio" name="radio2"  @change="fltrs.page=1;search_ist_book()"> <?=lang('numbers_from')?>: <input class="uk-input uk-form-small" style="width: 50px" v-model="ist_fltrs.days_left.from"  @keyup.enter="search_ist_book" > <?=lang('til')?> : <input  class="uk-input uk-form-small" style="width: 50px"  v-model="ist_fltrs.days_left.to" @keyup.enter="search_ist_book" > </label>
				</li>
				<li>
				</li>
            </ul>
        </li>      
        
 
        

    </ul>
</div>
   
   
   
   
   
   
   
   
	</div><div class="uk-width-expand@m">
<h3 class="uk-heading-bullet"> <?=lang('ist_list')?></h3>
<div class="uk-grid-small uk-child-width-expand@s uk-section-muted  no-print" uk-grid>
    <div>
        <div class="uk-flex-righ">
		<div class="uk-button-group">
		<button class="uk-button uk-button-default  uk-button-small"> <?=lang('total')?>: {{search_ist_books.total_rows}}</button>
    <a :href="'<?=site_url()?>/ajax/istiara?q=' + ist_fltrs.search.q + 
'&in=' + ist_fltrs.search.in + 
'&return_options=' + JSON.stringify(ist_fltrs.return_options.codes) + 
'&days_left_from=' + ist_fltrs.days_left.from + '&days_left_to=' + ist_fltrs.days_left.to+'&sorts=' + JSON.stringify(ist_fltrs.sorts) + 
'&page=' + ist_fltrs.page+'&export=csv'" class="uk-button uk-button-default  uk-button-small"> <?=sprintf(lang('export_to_'),'Excel')?></a>
   <a class="uk-button uk-button-small uk-button-default" href="<?=site_url("admin/Istiarat/creat_word/")?>">  <?=lang('notify_file_for_mustairin')?></a> 
    
</div>
	 
	
	</div>
    </div>
    <div>
	<pagination :records="parseInt(search_ist_books.total_rows)" v-model="ist_fltrs.page" :per-page="100" @paginate="istBooksPaging">
  </pagination>
      
    </div>
    
</div>
	

 <table class="uk-table uk-table-hover uk-table-small uk-table-divider">
        <thead>
            <tr>
			
                <th><?=lang('ist_id')?></th>
                <th><?=lang('book_title')?></th>

                 <th><?=lang('mujallad_no')?></th>
                 <th><?=lang('mustair')?></th>
                 <th><?=lang('mueer_amin_maktaba')?></th>
                <th><?=lang('ist_date')?> </th>
               <th><?=lang('days')?></th>
               <th><?=lang('days_left')?></th>
                <th><?=lang('mustarid_amin_maktaba')?></th>
                <th><?=lang('ist_return_date')?></th>
                <th><?=lang('options')?></th>
            </tr>
        </thead>
        <tbody>
            <tr v-for="b,index in search_ist_books.rows">
                <td>{{b.book_id}}</td>
                <td class="uk-table-link uk-visible-toggle"><a  href="#bookModal" uk-toggle="target: #bookModal"  @click="bookInfo(b); bookIstiarat(b.book_id);" class="uk-link-reset">{{b.title}}<i class=" fa fa-ellipsis-h uk-invisible-hover"></i></a></td>
                <td>{{b.mujallad}}</td>
                <td class="uk-table-link uk-visible-toggle"><a  href="#memberModal" uk-toggle="target: #memberModal"  @click="memberInfo(b.member_id); memberModelUpd(b.member_id)"class="uk-link-reset">{{b.member_name}}<i class=" fa fa-ellipsis-h uk-invisible-hover"></i></a></td>
                <td>{{b.user_name}}</td>
                <td>{{b.date}}</td>
                <td>{{b.days_limit}}</td>
                <td>
					<span v-if="b.returnd" class="uk-text-success"><?=lang('returnd')?></span>
					<span v-else >
						<span v-if="b.days_left>0">{{b.days_left}}</span>
						<span v-else class="uk-text-danger"><?=lang('must_return')?></span>
					</span>
				</td>
                <td>{{b.return_user_name}}</td>
                <td>{{b.return_date}}</td>
				<td class="no-print">
                    <span v-if="b.returnd">
        <i class="fa fa-circle fa-lg  uk-animation-slide-top uk-text-success"></i></span> <?php if (is_right('ist_return')): ?><span v-else class="uk-text-danger">
		
		<a class="fa fa-repeat fa-lg uk-link-reset no-print" @click="returnBookDropDown(b)" ></a><div uk-dropdown="mode: click" class="no-print">
					<h5><span uk-icon="icon: forward"></span><?=lang('istirja_book')?></h5>
					<?=lang('mustarid_amin_maktaba')?>:  {{return_book.user_name}} 
<?php if(right('ist_swith_amin')):?>
<a class="uk-icon-link no-print fa fa-search uk-link-reset" ></a>
					  <div id="cart_select_user" uk-dropdown="mode: click; pos: left-center" class="no-print">
							<div class="member_select">
<h5> <?=lang('users')?> </h5>
					
	<ul class="uk-list uk-list-divider uk-list-small">
					<li v-for="m in users" ><a @click="return_book.user_name=m.name; return_book.user_id=m.id" class="uk-link-reset">{{m.name}} </a></li>
					
				</ul>
	
	</div>
					  </div>
					  
					  <?php endif; ?>

					<br/>
					<?=lang('ist_return_date')?>: <span><input v-model="return_book.return_date" class=" uk-input uk-form-width-medium uk-form-small" type="date"  ></span>
						
					   <br/>
					   <br/>
					  
                                
                         
                               <div class="uk-margin"> <button v-on:click='returnBook(b)' class="uk-button uk-button-primary"><?=lang('istirja')?> </button></div>

                    </div>		                              
		

                  
		</span> <?php endif; ?>
		<?php if (is_right('ist_del')): ?>
              <a class="fa fa-close fa-lg uk-link-reset no-print" @click="DeleteIst(b)" ></a><?php endif; ?>
			  </td>
                
            </tr>
        </tbody>
    </table>
</div>
</div>

