123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <!-- SLIDER CHAT BEGIN-->
- <?php $chatEntity = \app\models\entity\Chat::find()->where(['company_id' => $companyID])->orderBy(['date_massage' => SORT_ASC])->all(); ?>
- <aside id="aside_open_panel" class="control-sidebar" style="width: 420px; display:none">
- <!-- Tab panes -->
- <div class="tab-content" style="margin-top: 460px;">
- <div class="row">
- <div class="col-md-12">
- <div class="box box-primary direct-chat direct-chat-primary">
- <div class="box-header with-border">
- <h3 class="box-title">Чат компании</h3>
- <div class="box-tools pull-right">
- <span data-toggle="tooltip" title="3 New Messages" class="badge bg-light-blue">0</span>
- <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
- </button>
- <button type="button" class="btn btn-box-tool" data-toggle="tooltip" title="Contacts" data-widget="chat-pane-toggle">
- <i class="fa fa-comments"></i></button>
- <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
- </div>
- </div>
- <!-- /.box-header -->
- <div class="box-body">
- <!-- Conversations are loaded here -->
- <div id="scrollFieldChat" class="direct-chat-messages">
- <? foreach($chatEntity as $msg): ?>
- <? if ($id == $msg->acc_id): ?>
- <div id="<?php echo $msg->id;?>_msgId" class="direct-chat-msg right">
- <div class="direct-chat-info clearfix">
- <span class="direct-chat-name pull-right"><?php echo $msg->accounts->login; ?></span>
- <span class="direct-chat-timestamp pull-left">
- <?php echo date("d M H:i",strtotime($msg->date_massage)); ?>
- </span>
- </div>
- <!-- /.direct-chat-info -->
- <i class="fa fa-3x fa-user direct-chat-img"></i><!-- /.direct-chat-img -->
- <div class="direct-chat-text">
- <? if (null != $msg->file): ?>
- <a href="<?php echo "/uploads/chat/" . $msg->file ?> " target='_blank' style="color: #fff;">
- <?php echo $msg->file_name ?><br>
- <i class="fa fa-2x fa-file direct-chat-img" style="color: #fff;float: left;"></i>
- </a><br><br>
- <?php endif; ?>
- <?php echo $msg->msg; ?>
- </div>
- <!-- /.direct-chat-text -->
- </div>
- <? else:?>
- <!-- Message. Default to the left -->
- <div id="<?php echo $msg->id; ?>_msgId" class="direct-chat-msg">
- <div class="direct-chat-info clearfix">
- <span class="direct-chat-name pull-left"><?php echo $msg->accounts->login; ?></span>
- <span class="direct-chat-timestamp pull-right"><?php echo date("d M H:i",strtotime($msg->date_massage)); ?><!--23 Jan 2:00 pm--></span>
- </div>
- <!-- /.direct-chat-info -->
- <!-- /.direct-chat-img -->
- <i class="fa fa-3x fa-user direct-chat-img"></i>
- <div class="direct-chat-text">
- <? if (null != $msg->file): ?>
- <a href="<?php echo "/uploads/chat/" . $msg->file ?> " target='_blank' style="color: #fff;">
- <?php echo $msg->file_name ?><br>
- <i class="fa fa-2x fa-file direct-chat-img" style="color: #fff;float: left;"></i>
- </a><br><br>
- <?php endif;?>
- <?php echo $msg->msg;?>
- </div>
- <!-- /.direct-chat-text -->
- </div>
- <!-- /.direct-chat-msg -->
- <? endif;?>
- <? endforeach;?>
- </div>
- <!--/.direct-chat-messages-->
- <!-- Contacts are loaded here -->
- <div class="direct-chat-contacts">
- <ul class="contacts-list">
- <li>
- <a href="#">
- <img class="contacts-list-img" src="lte/dist/img/user1-128x128.jpg" alt="User Image">
- <div class="contacts-list-info">
- <span class="contacts-list-name">
- Count Dracula
- <small class="contacts-list-date pull-right">2/28/2015</small>
- </span>
- <span class="contacts-list-msg">How have you been? I was...</span>
- </div>
- <!-- /.contacts-list-info -->
- </a>
- </li>
- <!-- End Contact Item -->
- </ul>
- <!-- /.contatcts-list -->
- </div>
- <!-- /.direct-chat-pane -->
- </div>
- <!-- /.box-body -->
- <div class="box-footer">
- <form id="chat_form" action="response.php" method="post" enctype="multipart/form-data">
- <div class="input-group">
- <input id="massage_field" type="text" name="message" placeholder="Сообщение ..." class="form-control">
- <span class="input-group-btn">
- <button id="massage_chat_send" type="submit" class="btn btn-primary btn-flat" style="height: 34px;margin-bottom: 1.5rem !important;"><i class="fa fa-fw fa-send-o"></i></button>
- </span>
- <span class="input-group-btn" style="vertical-align: top">
- <div class="btn btn-default btn-file">
- <i class="fa fa-paperclip"></i>
- <input id="file_v" type="file" name="attachment" >
- </div>
- </span>
- </div>
- </form>
- </div>
- <!-- /.box-footer-->
- </div>
- </div>
- </div>
- <!-- /.content -->
- </div>
- </aside>
- <!-- SLIDER CHAT END-->
|