<div class="panel panel-custom">
    <div class="panel-heading">
        <h3 class="panel-title"><?= lang('activities') ?></h3>
    </div>
    <div class="panel-body" id="chat-box">
        <div id="activity">
            <ul class="list-group no-radius mt-xs list-group-lg no-border">
                <?php if (!empty($activities_info)) {
                    foreach ($activities_info as $v_activities) {
                        $profile_info = $this->db->where(array('user_id' => $v_activities->user))->get('tbl_account_details')->row();
                        ?>
                        <div class="timeline-2">
                            <div class="time-item">
                                <div class="item-info">
                                    <small data-toggle="tooltip" data-placement="top" title="<?= display_datetime($v_activities->activity_date) ?>" class="text-gray-500 dark:text-gray-50">
                                        <?= time_ago($v_activities->activity_date); ?>
                                    </small>

                                    <p>
                                        <strong>
                                            <?php if (!empty($profile_info)) { ?>
                                                <span class="text-info"><?= $profile_info->fullname ?></span>
                                            <?php } ?>
                                        </strong>
                                        <?= sprintf(lang($v_activities->activity)) ?>
                                        <strong><?= $v_activities->value1 ?></strong>
                                        <?php if (!empty($v_activities->value2)) { ?>
                                            <p class="m0 p0"><strong><?= $v_activities->value2 ?></strong></p>
                                        <?php } ?>
                                    </p>
                                </div>
                            </div>
                        </div>
                    <?php }
                } else { ?>
                    <li class="list-group-item text-muted"><?= lang('nothing_to_display') ?></li>
                <?php } ?>
            </ul>
        </div>
    </div>
</div>
