<div class="box-header with-border">

    <h3 class="box-title">Mensagens</h3>

</div>

<!-- /.box-header -->

<div class="box-body no-padding">

    <div class="mailbox-controls">

        <?php if(isset($inbox)): ?>

        <div class="btn-group">

            <button type="button" class="btn btn-default checkbox-toggle"><input type="checkbox"/></button>

            <button type="button" class="btn btn-default excluir" style="height: 36px;"><i class="fa fa-trash-o"></i> Excluir</button>

        </div>

        <button type="button" class="btn btn-default btn-refresh" style="height: 36px;"><i class="fa fa-refresh"></i> Atualizar</button>

        <!-- /.btn-group -->

        <?php elseif(isset($trashed)): ?>

        <div class="btn-group">

            <button type="button" class="btn btn-default checkbox-toggle"><input type="checkbox"/></button>

            <button type="button" class="btn btn-default excluir" style="height: 36px;"><i class="fa fa-trash-o"></i> Excluir</button>

            <button type="button" class="btn btn-default restaurar" style="height: 36px;"><i class="fa fa-level-up"></i> Restaurar</button>

        </div>

        <?php endif; ?>

    </div>

    <div class="table-responsive mailbox-messages">

        <table class="table table-hover table-striped" id="inbox-table">

            <tbody>

                

                <?php 

                if(isset($inbox)):

                    foreach($inbox as $msg): 

                ?>

                <tr data-id="<?php echo $msg->id; ?>" <?php echo ($msg->status === '1') ? 'class="text-strong"' : ''; ?>>

                    <td>

                        <input type="checkbox" class="checkbox"  value="<?php echo $msg->id; ?>" data-action='excluir'/>

                    </td>

                    <td class="mailbox-name"><a href="<?php echo base_url('blog/conta/mensagem').'/'.$msg->id; ?>"><?php echo $msg->nome; ?></a></td>

                    <td class="mailbox-subject"><?php echo (strlen($msg->assunto) > 0) ? $msg->assunto.'  &#149;  ': ''; ?> <span class="text-muted"><?php echo $msg->mensagem; ?></span></td>

                    <td class="mailbox-date"><?php echo $msg->data; ?></td>

                </tr>

                <?php 

                    endforeach; 

                    

                elseif(isset($trashed)):

                    foreach($trashed as $msg): 

                ?>

                <tr <?php echo ($msg->status === '1') ? 'class="text-strong"' : ''; ?>>

                    <td>

                        <input type="checkbox" class="checkbox" value="<?php echo $msg->id; ?>" data-action='remover' />

                    </td>

                    <td class="mailbox-name"><a href="<?php echo base_url('blog/conta/mensagem').'/'.$msg->id; ?>"><?php echo $msg->nome; ?></a></td>

                    <td class="mailbox-subject"><?php echo (strlen($msg->assunto) > 0) ? $msg->assunto.'  &#149;  ': ''; ?> <span class="text-muted"><?php echo $msg->mensagem; ?></span></td>

                    <td class="mailbox-date"><?php echo $msg->data; ?></td>

                </tr>

                <?php 

                    endforeach; 

                endif;    

                ?>

            </tbody>

        </table>

        <!-- /.table -->

    </div>

    <!-- /.mail-box-messages -->

</div>

<!-- /.box-body -->

<div class="box-footer">

    <div class="mailbox-controls">

        <div class="pull-right">

            <span id="total" class="badge bg-success"></span>

            <div class="btn-group">

                <button type="button" class="btn btn-default btn-sm" id="loadMore"><i class="fa fa-plus"></i></button>

                <button type="button" class="btn btn-default btn-sm" id="showLess"><i class="fa fa-minus"></i></button>

            </div>

        </div>

        <!-- /.pull-right -->

    </div>

</div>