



<table class="table table-striped table-hover table-bordered">
    <thead>
        <tr>
            <th class="bold col-md-1"> <div align="center">Date </div></th>
            <th class="bold"> <div align="center">Rays </div></th>
        </tr>
    </thead>


    <tbody>
        {foreach $dates as $inv}
        <tr>
            <td>{$inv["date"]}</td>
            <td>
                <table class="table table-striped table-hover table-bordered">
                    {if $countWife[$inv["date"]] > 0 }
                    <tr>
                        <td class="bold col-md-1">
                           Patient
                        </td>
                        <td>
                            {foreach $inv.raysw as $invest}

                            <div class="row  col-md-12"  style=" font-size: 16px; margin-bottom: 3px !important;">
                                <label class="col-md-3 control-label bold txtl" >{$invest->invname}:</label>
                                <div class="col-md-3">
                                    <input type="text" class="form-control updateElement" data-colName="rayresult" data-id="{$invest->id}"  data-tableName="gynarays" value="{$invest->rayresult}">

                                </div>
                                <div class="col-md-6">
                                    {if $invest->raysresults_id > 0 }
                                    {foreach $invest->imgs as $img}
                                    <a class="btn btn-xs blue" target="_blank"   title="تنزيل " href="{$hosturl}/../upload/rayimg/{$img->rayimg}">
                                        <i class="fa fa-download"></i>  </a>
                                    {/foreach}
                                    {else}
                                    {if $invest->rayimg}
                                    <a class="btn btn-xs blue" target="_blank"   title="تنزيل " href="{$hosturl}/../upload/rayimg/{$invest->rayimg}"> <i class="fa fa-download"></i>  </a>
                                    {/if}
                                    {/if}

                                </div>
                            </div>
                            {/foreach}
                        </td>
                        <td class="col-md-1"><button type="button" class="btn green btn-block btn-xs printRayShow" data-for="wife"  data-date="{$inv.date}"  data-controller="gyna">  Print  </button></td>
                        <td class="col-md-1">
                            <a class="btn grey-cascade btn-xs delNew" data-id="1" data-for="0" data-date="{$inv['date']}" style=" float: left;" href="#" data-link="gyna" data-fn="del" data-tableName="gynarays">
                                <i class="fa fa-close"></i>
                            </a>
                        </td>
                    </tr>
                    {/if}
                    {if $countHusband[$inv["date"]] > 0 }
                    <tr>
                        <td class="bold col-md-1">
                            Husband
                        </td>

                        <td>

                            {foreach $inv.raysh as $invest}

                            <div class="row  col-md-12"  style=" font-size: 16px; margin-bottom: 3px !important;">
                                <label class="col-md-3 control-label bold txtl" >{$invest->invname}:</label>
                                <div class="col-md-3">
                                    <input type="text" class="form-control updateElement" data-colName="rayresult" data-id="{$invest->id}"  data-tableName="gynarays" value="{$invest->rayresult}">

                                </div>
                                <div class="col-md-6">
                                    {if $invest->raysresults_id > 0 }
                                    {foreach $invest->imgs as $img}
                                    <a class="btn btn-xs blue" target="_blank"   title="تنزيل " href="{$hosturl}/../upload/rayimg/{$img->rayimg}">
                                        <i class="fa fa-download"></i>  </a>
                                    {/foreach}
                                    {else}
                                    {if $invest->rayimg}
                                    <a class="btn btn-xs blue" target="_blank"   title="تنزيل " href="{$hosturl}/../upload/rayimg/{$invest->rayimg}"> <i class="fa fa-download"></i>  </a>
                                    {/if}
                                    {/if}

                                </div>
                            </div>
                            {/foreach}
                        </td>
                        <td class="col-md-1"><button type="button" class="btn green btn-block btn-xs printRayShow" data-for="husband"  data-date="{$inv.date}"  data-controller="gyna">  Print  </button></td>
                        <td class="col-md-1">
                            <a class="btn grey-cascade btn-xs delNew" data-id="1" data-for="1" data-date="{$inv['date']}" style=" float: left;" href="#" data-link="gyna" data-fn="del" data-tableName="gynarays">
                                <i class="fa fa-close"></i>
                            </a>
                        </td>
                    </tr>
                    {/if}
                </table>
            </td>
        </tr>
        {/foreach}
    </tbody>

</table>