
<div class="row">
  <div class="container">
    <ol class="breadcrumb">
      <li><a href="#">خصائص عامة</a></li>
      <li><a href="#">الأصول</a></li>
      <li class="active">عرض الأصول</li>
    </ol>
    <div class="panel panel-default"> 
      <!-- Default panel contents -->
      <div class="panel-heading">عرض الأصول</div>
      <div class="panel-body">
        <form class="form-inline" method="post" action="assetController.php?do=show">
          <div class="form-group">
            <label class="sr-only">اسم المنتج</label>
            <select data-placeholder="اختر اصل"  class="select2 wdt100" name="assetid" id="assetid" onchange="getResult();">
              <option value="-1"></option>
              
              
             
										{foreach $assetsearchData as $assetsearch}
            
              
              <option value="{$assetsearch->assetid}">{$assetsearch->assetname}</option>
              
              
                                            {/foreach}
										
          
            
            </select>
            <input type="hidden" name="usergroupname" id="usergroupname" value="{$usergroupname}"/>
          </div>
          <button type="submit" class="btn btn-primary">بحث</button>
        </form>
      </div>
      <hr/>
      <!-- Table -->
      <table class="table">
        <thead>
          <tr>
            <th>اسم الاصل</th>
            <th>سعر الاصل</th>
            <th>تعديل</th>
            <th>حذف مؤقت</th>
            {if {$usergroupname} eq "admin"}
            <th>حذف</th>
            {/if} </tr>
        </thead>
        <tbody>
        
        {foreach $assetData as $asset}
        {if {$asset->tempdelete} eq 1}
        <tr id="tt" class="danger"> {elseif {$asset->tempdelete} eq 0}
        
        <tr> {/if}
          <td>{$asset->assetname}</td>
          <td>{$asset->assetprice}</td>
          <td class="aw_optiontb"><a href="assetController.php?do=edit&assetid={$asset->assetid}" type="button" class="btn btn-default btn-lg editicon"> </a></td>
          <td class="aw_optiontb"><a href="assetController.php?do=delete&assetid={$asset->assetid}&delelte={$asset->tempdelete}" type="button" class="btn btn-default btn-lg removeicon"> </a></td>
          {if {$usergroupname} eq "admin"}
          <td class="aw_optiontb"><a name="dd"  type="button" class="btn btn-default btn-lg deleteicon conformdel" data-position="assetController.php?do=deleteFinaly&assetid="  data-id="{$asset->assetid}"> </a></td>
          {/if} </tr>
        {/foreach}
        
            </tbody>
        
      </table>
      
      <!-- <div class="col-lg-offset-8 col-lg-4">
        	<div class="well well-sm"><h4 class="text-center">اجمالى الاصول:  {$sumValue}</h4></div>
        </div>-->
      
      <div class="dataTables_info" id="datatable_2_info"> هناك &nbsp;[{$paginate.first}-{$paginate.last}]&nbsp; عنصر من &nbsp; &nbsp; [{$paginate.total}]</div>
      <div class="dataTables_paginate paging_full_numbers" id="datatable_2_paginate"> {if {paginate_prev} eq ""}
        {else} <span class="next paginate_button" id="datatable_2_next">{paginate_prev}</span> {/if} <span> {if {paginate_middle} eq ""}
        {else} <span class="paginate_button">{paginate_middle format="page"}</span> {/if} </span> {if {paginate_next} eq ""}
        {else} <span class="last paginate_button" id="datatable_2_last">{paginate_next}</span> {/if} </div>
      <div class="clearfix"></div>
    </div>
    
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close pull-left" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title">تأكيد الحذف</h4>
          </div>
          <div class="modal-body"> هل تريد حذف الأصل؟ </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">لا</button>
            <button type="button" class="btn btn-primary savemodel">نعم</button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
    <!-- /.modal --> 
    
  </div>
</div>
