
  
    <div class="table-responsive table-cont" id="table-cont">
  <table class="table table-striped table-bordered" id="example1m" st-table="mailbox" st-safe-src="rowCollectionm" search-watch-model="querym">
    <thead>
      <tr>
        <th>
          Action
        </th>
        <th st-sort="mailfrom" class="st-sort-default sheader" st-sort-ascent="st-sort-ascent" st-sort-descent="st-sort-descent" st-sort-default="reverse">
          Mail From
        </th>
        <th st-sort="mailsubject" class="st-sort-default" style="width:20%;min-width:50px;" st-sort-ascent="st-sort-ascent" st-sort-descent="st-sort-descent" st-sort-default="reverse">
          Subject
        </th>
        <th st-sort="mailbody" class="st-sort-default" style="width:40%;min-width:50px;" st-sort-ascent="st-sort-ascent" st-sort-descent="st-sort-descent" st-sort-default="reverse">
          Body
        </th>
        <th st-sort="senton" class="st-sort-default sheader" st-sort-ascent="st-sort-ascent" st-sort-descent="st-sort-descent" st-sort-default="reverse">
          Date
        </th>
      
       
       
      </tr>
    </thead>
    <tbody>
      <!--<tr class="unread" dir-paginate="mail in mailbox | orderBy:sortKey:reverse|filter:search1|itemsPerPage:6" pagination-id="mailPage">-->
      <tr class="unread" *ngFor="let mail of mailbox | filter:searchMail">
        <td class="text-center">
          <a type="button" title="Delete" ng-if="mail.active != 0" (click)="OpenConfirmTemplate(mail)">
            <i class="fal fa-trash red"></i></a>
        </td>
        <td class="hidden-xs sbody" (dblclick)="mailview(mailPopUp, mail.mail_id)" style="cursor:pointer;" title="Double click to view the details">
          <b *ngIf="mail.readflag != 1">{{mail.mailfrom.split('@@')[0]}}</b>
          <span *ngIf="mail.readflag == 1">{{mail.mailfrom.split('@@')[0]}}</span>
        </td>
        <td class="max-texts sbody" (dblclick)="mailview(mailPopUp, mail.mail_id)" style="cursor:pointer;width:20%;min-width:50px;" title="Double click to view the details">
          <b *ngIf="mail.readflag != 1">{{mail.mailsubject}}</b>
          <span *ngIf="mail.readflag == 1">{{mail.mailsubject}}</span>
        </td>
        <td class="max-texts sbody" (dblclick)="mailview(mailPopUp, mail.mail_id)" style="cursor:pointer;width:40%;min-width:50px;" title="Double click to view the details">
          <!--<div ngBindHtml="(mail.mailbody | limitTo:150) + (mail.mailbody.length > 150 ? '...' : '')"></div>-->
          <div [innerHTML]="mail.mailbody"></div>
        </td>
        <td width="200px" (dblclick)="mailview(mailPopUp, mail.mail_id)" style="cursor:pointer;" title="Double click to view the details">{{mail.senton|date:'medium'}}</td>
       
                                                                                                                                                                                          
       
      </tr>

                                                                                                                                                                                                               
                                                                                                                                                                                                                

      <!--<tr class="unread" *ngFor="let mail of mailbox">
                  <td class="hidden-xs sbody" style="cursor:pointer;" title="Double click to view the details">
        <b *ngIf="mail.readflag != 1">{{mail.mailfrom.split('@@')[0]}}</b>
        <span *ngIf="mail.readflag == 1">{{mail.mailfrom.split('@@')[0]}}</span>
      </td>
      <td class="max-texts sbody" style="cursor:pointer;width:20%;min-width:50px;" title="Double click to view the details">
        <b *ngIf="mail.readflag != 1">{{mail.mailsubject}}</b>
        <span *ngIf="mail.readflag == 1">{{mail.mailsubject}}</span>
      </td>
      <td class="max-texts sbody" style="cursor:pointer;width:40%;min-width:50px;" title="Double click to view the details">
        <div ng-bind-html="(mail.mailbody) + (mail.mailbody.length > 150 ? '...' : '')"></div>
      </td>
      <td width="200px" style="cursor:pointer;" title="Double click to view the details">{{mail.senton}}</td>
      <td>
        <button type="button" class="btn btn-danger btn-xs" title="Delete" *ngIf="mail.active != 0" (click)="DeleteMail(mail.mail_id,mail.mailsubject)" style="padding: 1px 12px;height:20px;">
          <i class="fa fa-trash-o" style="color:#192e44;"></i>
        </button>
      </td>
      </tr>-->
    </tbody>
  </table>
  <div *ngIf="mailbox.length===0" style="text-align:center;background-color: #ddd;padding:3px;" class="ng-scope"><b>No Mails Found.</b></div>
  <br />
  <!-- <dir-pagination-controls pagination-id="mailPage" max-size="5" *ngIf="mailbox.length"
                           direction-links="true"
                           boundary-links="true">
  </dir-pagination-controls> -->

</div>


<div class="row">
  <ng-template #mailPopUp>
   
<div class="modal-content " id="mainNgCnt" ngDraggable [handle]="dragHandle">
<div class="modal-header" style="cursor:move" #dragHandle>
  <h4 class="modal-title pull-left">Read Mail</h4>
  <button type="button" class="close pull-right" aria-label="Close" (click)="mailModalRef.hide()">
    <span aria-hidden="true">&times;</span>
  </button>
</div>
  <div class="modal-body">
    <div class="box box-primary" *ngFor="let mail of showMailValue">
      
      <!-- /.box-header -->
      <div class="box-body no-padding">
        <div class="mailbox-read-info">
          <h3 class="ng-binding">
            Stage Acknowledgement: {{mail.mailsubject}}
            <!-- ngIf: callType.mailtemp.active != 0 --><button type="button" class="btn btn-danger btn-xs pull-right ng-scope" title="Delete"  (click)="OpenConfirmTemplate(mail)" style="padding: 1px 12px; height: 20px;"><i class="fa fa-trash-o" style="color:#192e44;"></i></button><!-- end ngIf: callType.mailtemp.active != 0 -->
          </h3>
          <h5 class="ng-binding">
            From: {{mail.mailfrom}}
            <span class="mailbox-read-time pull-right ng-binding">{{mail.senton | date:'medium'}}</span>
          </h5>
        </div>
        <!-- /.mailbox-read-info -->
        <!-- /.mailbox-controls -->
        <div class="mailbox-read-message">
          <div class="mailbox-read-message">
            <div [innerHTML]="mail.mailbody"></div>
        </div>

        </div>
        <!-- /.mailbox-read-message -->
      </div>
      <!-- /.box-body -->
      <!-- /.box-footer -->
      <div class="box-footer">
      </div>
      <!-- /.box-footer -->
    </div>
  </div>
</div>

</ng-template>
</div>