Пример #1
0
?>

<p>
    <strong>Status:</strong><br/>
    <?php 
$lastRunHourly = Yii::$app->settings->get('cronLastHourlyRun');
$lastRunDaily = Yii::$app->settings->get('cronLastDailyRun');
if ($lastRunHourly == "") {
    $lastRunHourly = "<span style='color:red'>" . Yii::t('AdminModule.views_setting_cronjob', 'Never') . "</span>";
} else {
    $lastRunHourly = \humhub\widgets\TimeAgo::widget(['timestamp' => $lastRunHourly]);
}
if ($lastRunDaily == "") {
    $lastRunDaily = "<span style='color:red'>" . Yii::t('AdminModule.views_setting_cronjob', 'Never') . "</span>";
} else {
    $lastRunDaily = \humhub\widgets\TimeAgo::widget(['timestamp' => $lastRunDaily]);
}
?>

    <?php 
echo Yii::t('AdminModule.views_setting_cronjob', 'Last run (hourly):');
?>
 <?php 
echo $lastRunHourly;
?>
 <br/>
    <?php 
echo Yii::t('AdminModule.views_setting_cronjob', 'Last run (daily):');
?>
 <?php 
echo $lastRunDaily;
            ?>
                            <div class="pull-right">
                                <?php 
            echo Html::a('<i class="fa fa-pencil-square-o"></i>', ["/mail/mail/edit-entry", 'messageEntryId' => $entry->id], array('data-target' => '#globalModal', 'class' => ''));
            ?>
                            </div>
                        <?php 
        }
        ?>

                        <div class="media-body">
                            <h4 class="media-heading" style="font-size: 14px;"><?php 
        echo Html::encode($entry->user->displayName);
        ?>
                                <small><?php 
        echo TimeAgo::widget(['timestamp' => $entry->created_at]);
        ?>
</small>
                            </h4>

                            <span class="content">
                                <?php 
        echo humhub\widgets\MarkdownView::widget(array('markdown' => $entry->content));
        ?>
                            </span>
                        </div>
                    </div>

                    <hr>

                <?php 
Пример #3
0
    <div class="media-body">
        <h4 class="media-heading"><a href="<?php 
echo $user->getUrl();
?>
"><?php 
echo Html::encode($user->displayName);
?>
</a>
            <small><?php 
echo \humhub\widgets\TimeAgo::widget(['timestamp' => $comment->created_at]);
?>
                <?php 
if ($comment->updated_at != "" && $comment->created_at != $comment->updated_at) {
    ?>
                    (<?php 
    echo Yii::t('CommentModule.widgets_views_showComment', 'Updated :timeago', array(':timeago' => \humhub\widgets\TimeAgo::widget(['timestamp' => $comment->updated_at])));
    ?>
)
                <?php 
}
?>
            </small>
        </h4>


        <div class="content" id="comment_editarea_<?php 
echo $comment->id;
?>
">
            <span id="comment-message-<?php 
echo $comment->id;
Пример #4
0
            <!-- Show space image, if you are outside from a space -->
            <?php 
if (!Yii::$app->controller instanceof \humhub\modules\content\components\ContentContainerController && $record->content->space !== null) {
    ?>
                <?php 
    echo \humhub\modules\space\widgets\Image::widget(['space' => $record->content->space, 'width' => 20, 'htmlOptions' => ['class' => 'img-space pull-left']]);
    ?>
            <?php 
}
?>

            <div class="media-body">

                <!-- Show content -->
                <?php 
echo $content;
?>
<br/>

                <!-- show time -->
                <?php 
echo \humhub\widgets\TimeAgo::widget(['timestamp' => $record->content->created_at]);
?>
            </div>
        </div>
    </li>
<?php 
if ($clickable) {
    ?>
</a><?php 
}
        ?>
            <?php 
    }
    ?>
        </div>
    </td>
    <?php 
}
?>
    <?php 
if (in_array('timestamp', $columns)) {
    ?>
    <td class="hidden-xxs text-right">
        <div class="timestamp pull-right">
            <?php 
    echo \humhub\widgets\TimeAgo::widget(['timestamp' => $updatedAt]);
    ?>
        </div>
    </td>
    <?php 
}
?>
    <?php 
if (in_array('likesncomments', $columns)) {
    ?>
    <td class="text-right">
        <?php 
    if ($socialActionsAvailable) {
        ?>
        <div class="file-controls pull-right">
            <?php 
Пример #6
0
echo $user->getUrl();
?>
"><?php 
echo Html::encode($user->displayName);
?>
</a>
                    <small>
                        <?php 
echo \humhub\widgets\TimeAgo::widget(['timestamp' => $object->content->created_at]);
?>

                        <?php 
if ($object->content->created_at !== $object->content->updated_at && $object->content->updated_at != '') {
    ?>
                            (<?php 
    echo Yii::t('ContentModule.views_wallLayout', 'Updated :timeago', array(':timeago' => \humhub\widgets\TimeAgo::widget(['timestamp' => $object->content->updated_at])));
    ?>
)
                        <?php 
}
?>

                        <!-- show space name -->
                        <?php 
if (!Yii::$app->controller instanceof ContentContainerController && $container instanceof Space) {
    ?>
                            <?php 
    echo Yii::t('ContentModule.views_wallLayout', 'in');
    ?>
 <strong><a
                                    href="<?php 
 messagePreviewEntry entry">
        <a href="javascript:loadMessage('<?php 
    echo $message->id;
    ?>
');">
            <div class="media">
                <img class="media-object img-rounded pull-left" data-src="holder.js/32x32" alt="32x32" style="width: 32px; height: 32px;" src="<?php 
    echo $message->getLastEntry()->user->getProfileImage()->getUrl();
    ?>
">
                <div class="media-body">
                    <h4 class="media-heading"><?php 
    echo Html::encode($message->getLastEntry()->user->displayName);
    ?>
 <small><?php 
    echo TimeAgo::widget(['timestamp' => $message->updated_at]);
    ?>
</small></h4>
                    <h5><?php 
    echo Html::encode(Helpers::truncateText($message->title, 75));
    ?>
</h5>
                    <?php 
    echo Helpers::truncateText(MarkdownView::widget(['markdown' => $message->getLastEntry()->content, 'parserClass' => '\\humhub\\libs\\MarkdownPreview', 'returnPlain' => true]), 200);
    ?>
                    <?php 
    // show the new badge, if this message is still unread
    if ($message->updated_at > $userMessage->last_viewed && $message->getLastEntry()->user->id != Yii::$app->user->id) {
        echo '<span class="label label-danger">' . Yii::t('MailModule.views_mail_index', 'New') . '</span>';
    }
    ?>
                                 height="48" alt="48x48" data-src="holder.js/48x48"
                                 style="width: 48px; height: 48px;">
                        </a>
                    </td>
                    <td>
                        <div class="content">
                            <strong><?php 
        echo Yii::t('ReportcontentModule.base', 'by :displayName', array(':displayName' => Html::a(Html::encode($report->user->displayName), $report->user->getUrl())));
        ?>
</strong>
                            <br/>
                            <small class="media" title="<?php 
        echo $report->created_at;
        ?>
"><?php 
        echo \humhub\widgets\TimeAgo::widget(['timestamp' => $report->created_at]);
        ?>
</small>
                        </div>
                    </td>
                    <td style="vertical-align:middle">
                        <?php 
        echo \humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'delete_' . $report->id, 'title' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', '<strong>Confirm</strong> report deletion'), 'message' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', 'Do you really want to delete this report?'), 'buttonTrue' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', 'Delete'), 'buttonFalse' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', 'Cancel'), 'class' => 'btn btn-primary btn-sm', 'linkContent' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', 'Delete report'), 'linkHref' => Url::to(["//reportcontent/report-content/appropriate", 'id' => $report->id])));
        ?>
                    </td>
                    <td style="vertical-align:middle">
                        <?php 
        echo \humhub\widgets\ModalConfirm::widget(array('uniqueID' => $report->id, 'title' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', '<strong>Confirm</strong> post deletion'), 'message' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', 'Do you really want to delete this post? All likes and comments will be lost!'), 'buttonTrue' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', 'Delete'), 'buttonFalse' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', 'Cancel'), 'class' => 'btn btn-sm btn-danger', 'linkContent' => Yii::t('ReportcontentModule.widgets_views_reportContentAdminGrid', 'Delete post'), 'linkHref' => Url::to(["//reportcontent/report-content/delete-content", 'model' => get_class($report->getSource()), 'id' => $report->getSource()->id])));
        ?>
                    </td>
                <?php 
Пример #9
0
    }
    ?>
            </td>
            <td class="text-right" data-sort-value="" title=""><a
                href="<?php 
    echo $item->creator->createUrl();
    ?>
">
                    <?php 
    echo $item->creator->username;
    ?>
                </a></td>

            </td>
            <td class="text-right" data-sort-value="" title="">
                <?php 
    echo \humhub\widgets\TimeAgo::widget(['timestamp' => $item->content->updated_at]);
    ?>
            </td>
        </tr>
        <?php 
}
?>

    </table>
</div>
<script>
    $(function() {
        initFileList();
    });
</script>
Пример #10
0
 *
 * @property User $user is the user object
 *
 * @package application.modules.questionanswer
 * @since 0.5
 */
use yii\helpers\Html;
use humhub\modules\karma\models\KarmaUser;
?>

<div class="media-body qanda-profile">

    <div class="row">
        <div class="col-xs-12 qanda-profile-timestamp">
            <small>posted <?php 
echo \humhub\widgets\TimeAgo::widget(['timestamp' => $timestamp]);
?>
</small>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <a href="<?php 
echo \yii\helpers\Url::toRoute(['/user/profile', 'uguid' => $user->guid]);
?>
">
                <span class="pull-left profile-size-sm">
                    <img class="media-object img-rounded profile-size-sm"
                     src="<?php 
echo $user->getProfileImage()->getUrl();
?>
                            <td class="text-right" data-sort-value=""
                                title=""><a
                                href="<?php 
        echo File::getCreatorById($item['file']->created_by)->createUrl();
        ?>
">
                                    <?php 
        echo File::getCreatorById($item['file']->created_by)->username;
        ?>
                                </a></td>

                            </td>
                            <td class="text-right" data-sort-value=""
                                title="">
                                <?php 
        echo \humhub\widgets\TimeAgo::widget(['timestamp' => $item['file']->updated_at]);
        ?>
                            </td>
                        </tr>
                        <?php 
    }
} else {
    ?>
                        <p><?php 
    echo Yii::t('CfilesModule.base', 'No files found.');
    ?>
</p>
                        <?php 
}
?>