﻿
<button onclick="warrantApp.showList();" style="margin-bottom:10px;" class="btn btn-primary"><i class="fa fa-chevron-left" style="margin-right:5px"></i> Warrant List</button>

<div class="row">
  {{#if HasPhoto}}
    <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
    <div style="width: 100%; margin-bottom: 10px;">
      <img id="img-mugshot" src="data:image/jpg;base64,{{Photo}}" style="display: block; margin: auto; max-width: 150px" class="img-thumbnail img-responsive" alt="Photo of {{LastName}}, {{MiddleName}} {{FirstName}}" />
    </div>
  </div>
  {{else}}
   <div class="col-lg-2 col-md-2 col-sm-12 col-xs-12">
    <div style="width: 100%; margin-bottom: 10px;" class="img-thumbnail text-center">
      <i class="fa fa-user-circle fa-5x" style="margin: 30px 0 30px 0;"></i>
      <br/>
      No Photo Available
    </div>
  </div>
  {{/if}}

  <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12">
    <table class="table table-condensed table-striped">
      <tr>
        <td class="table-label">Name</td>
        <td>{{FirstName}} {{MiddleName}} {{LastName}}</td>
      </tr>
      <tr>
        <td class="table-label">Name Number</td>
        <td>{{NameNumber}}</td>
      </tr>
    </table>
  </div>
</div>
<div class="row">
  <div class="col-sm-12">
    {{#each ./Warrants}} 
    <div class="clearfix"></div>
    <div style="font-size: 24px; font-weight: normal; color: #987658; margin-bottom: 10px; border-bottom: 1px solid #987658; width: 100%;">
      Warrant #{{WarrantId}} Information
      {{#if IsDaneCase}}
      <a target="_blank" class="btn btn-sm btn-secondary pull-right" href="https://wcca.wicourts.gov/caseDetail.html?caseNo={{CourtCaseNumber}}&countyNo=13&mode=details">View in CCAP</a>
      {{/if}}
    </div>
    <table class="table table-condensed table-bordered">
      <thead>
        <tr>
          <th>Date</th>
          <th>Process Type</th>
          <th>Crime Class</th>
          <th>Court Case Number</th>
        </tr>
      </thead>
      <tbody>
        <tr style="background-color: #777; color: #fff;">
          <td>{{DateIssuedFormatted}}</td>
          <td>{{ProcessTypeDescription}}</td>
          <td>{{CrimeClassDescription}}</td>
          <td>{{CourtCaseNumber}}</td>
        </tr>
        {{#if HasOffenses}}
        
        <tr>
          <td colspan="4">
            <table class="table table-condensed table-striped" style="margin-bottom: 0; color: #333;">
              <thead>
                <tr>
                  <th>Offense Code</th>
                  <th>Description</th>
                </tr>
              </thead>
              <tbody>
                {{#each ./Offenses}}                
                <tr>
                  <td>{{OffenseCode}}</td>
                  <td>{{Description}}</td>
                </tr>
                {{/each}}
              </tbody>
            </table>
          </td>
        </tr>
        {{/if}}
      </tbody>
    </table>
    {{/each}}
  </div>
</div>

  
  <button onclick="warrantApp.showList();" class="btn btn-primary"><i class="fa fa-chevron-left" style="margin-right:5px"></i> Warrant List</button>