{extends file="layout/layout.tpl"}
{block name=main}
    <div class="slim-mainpanel">
      <div class="container">
        <div class="slim-pageheader">
          <ol class="breadcrumb slim-breadcrumb">
            <li class="breadcrumb-item"><a href="#">Admin</a></li>
            <li class="breadcrumb-item"><a href="#">License</a></li>
            <li class="breadcrumb-item active" aria-current="page">List</li>
          </ol>
          <h6 class="slim-pagetitle">Licenses</h6>
        </div><!-- slim-pageheader -->

        <div class="section-wrapper">
        
          <div class="table-wrapper">
            <table id="datatable1" class="table display responsive nowrap">
              <thead>
                <tr>
                  <th class="wd-15p">Name</th>
                  <th class="wd-15p">UserID</th>
                  <th class="wd-15p">IP</th>
                  <th class="wd-15p">HardwareID</th>
                  <th class="wd-15p">Status</th>
                  <th class="wd-20p">Version</th>
                  <th class="wd-15p">Expire</th>
                  <th class="wd-20p">Action</th>
                  <th class="wd-25p">Delet</th>
                </tr>
              </thead>
              <tbody>
               {foreach key=i item=k from=$license}
                <tr>
                  <td>{$k['UserID'] }</td>
                  <td>{$k['Information1']}</td>
                  <td>{$k['Information2']}</td>
                  <td>{$k['Status'] === (1) ? 'Ativada' : 'Desativada'}</td>
                  <td>{$k['PackageIndex']}</td>
                  <td>{$plans[$k['ProductId']]}</td>
                  <td>{$k['Expire']}</td>
                  <td><a href="/admin/license/edit/{$k['LicenseId']}" class="btn btn-success">Editar</button></td>
                  <td><a href="/admin/license/delete/{$k['LicenseId']}" class="btn btn-success">Delete</button></td>
                </tr>
              {/foreach}
              </tbody>
            </table>
          </div><!-- table-wrapper -->
        </div><!-- section-wrapper -->
      </div><!-- container -->
    </div><!-- slim-mainpanel -->
    {/block}