if (count($message->users) != 0) {
        ?>
                    <?php 
        if (count($message->users) != 1) {
            ?>
                        <?php 
            echo ModalConfirm::widget(array('uniqueID' => 'modal_leave_conversation_' . $message->id, 'title' => Yii::t('MailModule.views_mail_show', '<strong>Confirm</strong> leaving conversation'), 'message' => Yii::t('MailModule.views_mail_show', 'Do you really want to leave this conversation?'), 'buttonTrue' => Yii::t('MailModule.views_mail_show', 'Leave'), 'buttonFalse' => Yii::t('MailModule.views_mail_show', 'Cancel'), 'linkContent' => '<i class="fa fa-sign-out"></i> ', 'cssClass' => 'btn btn-primary btn-sm', 'linkHref' => Url::to(["/mail/mail/leave", 'id' => $message->id])));
            ?>
                    <?php 
        }
        ?>
                    <?php 
        if (count($message->users) == 1) {
            ?>
                        <?php 
            echo ModalConfirm::widget(array('uniqueID' => 'modal_leave_conversation_' . $message->id, 'title' => Yii::t('MailModule.views_mail_show', '<strong>Confirm</strong> deleting conversation'), 'message' => Yii::t('MailModule.views_mail_show', 'Do you really want to delete this conversation?'), 'buttonTrue' => Yii::t('MailModule.views_mail_show', 'Delete'), 'buttonFalse' => Yii::t('MailModule.views_mail_show', 'Cancel'), 'linkContent' => '<i class="fa fa-times"></i> ', 'cssClass' => 'btn btn-primary btn-sm', 'linkHref' => Url::to(["/mail/mail/leave", 'id' => $message->id])));
            ?>
                    <?php 
        }
        ?>
                    <?php 
        foreach ($message->users as $user) {
            ?>
                        <a href="<?php 
            echo $user->getUrl();
            ?>
">
                            <img src="<?php 
            echo $user->getProfileImage()->getUrl();
            ?>
"
Exemplo n.º 2
0
<?php

use yii\helpers\Url;
?>
<div class="panel panel-default panel-tour" id="getting-started-panel">
    <?php 
// Temporary workaround till panel widget rewrite in 0.10 verion
$removeOptionHtml = "<li>" . \humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'hide-panel-button', 'title' => '<strong>Remove</strong> tour panel', 'message' => 'This action will remove the tour panel from your dashboard. You can reactivate it at<br>Account settings <i class="fa fa-caret-right"></i> Settings.', 'buttonTrue' => 'Ok', 'buttonFalse' => 'Cancel', 'linkContent' => '<i class="fa fa-eye-slash"></i> ' . Yii::t('TourModule.widgets_views_tourPanel', ' Remove panel'), 'linkHref' => Url::to(["/tour/tour/hide-panel", "ajax" => 1]), 'confirmJS' => '$(".panel-tour").slideToggle("slow")'), true) . "</li>";
?>

    <!-- Display panel menu widget -->
    <?php 
echo \humhub\widgets\PanelMenu::widget(array('id' => 'getting-started-panel', 'extraMenus' => $removeOptionHtml));
?>

    <div class="panel-heading">
        <?php 
echo Yii::t('TourModule.widgets_views_tourPanel', '<strong>Getting</strong> Started');
?>
    </div>
    <div class="panel-body">
        <p>
            <?php 
echo Yii::t('TourModule.widgets_views_tourPanel', 'Get to know your way around the site\'s most important features with the following guides:');
?>
        </p>

        <?php 
// Get states of current guides (to mark them as done)
$interface = Yii::$app->user->getIdentity()->getSetting("interface", "tour");
$spaces = Yii::$app->user->getIdentity()->getSetting("spaces", "tour");
Exemplo n.º 3
0
                            <!--                            <a id="profile-image-upload-edit-button"
                               style="<?php 
/*                               if (!$user->getProfileImage()->hasImage()) {
                          echo 'display: none;';
                          }
                         */
?>
"
                               href="<?php 
/* echo Url::toRoute('/user/account/crop-profile-image'); */
?>
"
                               class="btn btn-info btn-sm" data-target="#globalModal"><i
                                    class="fa fa-edit"></i></a>-->
                            <?php 
echo \humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_profileimagedelete', 'linkOutput' => 'a', 'title' => Yii::t('UserModule.widgets_views_deleteImage', '<strong>Confirm</strong> image deleting'), 'message' => Yii::t('UserModule.widgets_views_deleteImage', 'Do you really want to delete your profile image?'), 'buttonTrue' => Yii::t('UserModule.widgets_views_deleteImage', 'Delete'), 'buttonFalse' => Yii::t('UserModule.widgets_views_deleteImage', 'Cancel'), 'linkContent' => '<i class="fa fa-times"></i>', 'cssClass' => 'btn btn-danger btn-sm', 'style' => $user->getProfileImage()->hasImage() ? '' : 'display: none;', 'linkHref' => Url::toRoute(["/user/account/delete-profile-image", 'type' => 'profile']), 'confirmJS' => 'function(jsonResp) { resetProfileImage(jsonResp); }'));
?>
                        </div>


                    </div>
                    <p class="help-block text-center"><i
                            class="fa fa-arrow-up"></i><br><?php 
echo Yii::t('TourModule.views_tour_welcome', 'Drag a photo here or click to browse your files');
?>
                    </p>

                </div>
                <div class="col-md-9">
                    <?php 
$form = ActiveForm::begin();
Exemplo n.º 4
0
}
?>
"
                     data-src="holder.js/140x140"
                     alt="<?php 
echo Yii::t('AdminModule.views_setting_index', "You're using no logo at the moment. Upload your logo now.");
?>
"
                     style="max-height: 40px;"/>

                <div class="image-upload-buttons" id="logo-upload-buttons" style="display: block;">
                    <a href="#" onclick="javascript:$('#logo').click();" class="btn btn-info btn-sm"><i
                            class="fa fa-cloud-upload"></i></a>

                    <?php 
echo \humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_logoimagedelete', 'linkOutput' => 'a', 'title' => Yii::t('AdminModule.views_setting_index', '<strong>Confirm</strong> image deleting'), 'message' => Yii::t('UserModule.views_setting_index', 'Do you really want to delete your logo image?'), 'buttonTrue' => Yii::t('AdminModule.views_setting_index', 'Delete'), 'buttonFalse' => Yii::t('AdminModule.views_setting_index', 'Cancel'), 'linkContent' => '<i class="fa fa-times"></i>', 'cssClass' => 'btn btn-danger btn-sm', 'style' => $logo->hasImage() ? '' : 'display: none;', 'linkHref' => Url::toRoute("/admin/setting/delete-logo-image"), 'confirmJS' => 'function(jsonResp) { resetLogoImage(jsonResp); }'));
?>
                </div>
            </div>
        </div>

        <hr>
        <?php 
echo CHtml::submitButton(Yii::t('AdminModule.views_setting_design', 'Save'), array('class' => 'btn btn-primary'));
?>

        <?php 
echo \humhub\widgets\DataSaved::widget();
?>
        <?php 
ActiveForm::end();
Exemplo n.º 5
0
                        </li>




                    <?php 
} else {
    ?>

                        <?php 
    if (!$page->admin_only || $page->canAdminister()) {
        ?>

                            <!-- load modal confirm widget -->
                            <li><?php 
        echo \humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_pagedelete_' . $page->id, 'linkOutput' => 'a', 'title' => Yii::t('WikiModule.base', '<strong>Confirm</strong> page reverting'), 'message' => Yii::t('WikiModule.base', 'Do you really want to revert this page?'), 'buttonTrue' => Yii::t('WikiModule.base', 'Revert'), 'buttonFalse' => Yii::t('WikiModule.base', 'Cancel'), 'linkContent' => '<i class="fa fa-history history"></i> ' . Yii::t('WikiModule.base', 'Revert this'), 'linkHref' => $contentContainer->createUrl('/wiki/page/revert', array('id' => $page->id, 'toRevision' => $revision->revision)), 'confirmJS' => 'function(jsonResp) { window.location.href = "' . $contentContainer->createUrl('/wiki/page/view', array('title' => $page->title)) . '"; }'));
        ?>
</li>


                        <?php 
    }
    ?>
                        <li><?php 
    echo Html::a('<i class="fa fa-reply"></i> ' . Yii::t('WikiModule.base', 'Go back'), $contentContainer->createUrl('/wiki/page/history', array('id' => $page->id)));
    ?>
</li>

                    <?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 
    }
    ?>
        </tbody>
    </table>

    <div class="pagination-container">
        <?php 
    echo \humhub\widgets\LinkPager::widget(['pagination' => $pagination]);
    ?>
    </div>

<?php 
Exemplo n.º 7
0
CActiveForm::end();
?>
            </div>

            <div class="col-lg-2 col-md-3 col-sm-3 wiki-menu">
                <?php 
if (!$page->isNewRecord) {
    ?>

                    <ul class="nav nav-pills nav-stacked">
                        <?php 
    if ($page->canAdminister()) {
        ?>
                            <!-- load modal confirm widget -->
                            <li><?php 
        echo \humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_pagedelete_' . $page->id, 'linkOutput' => 'a', 'title' => Yii::t('WikiModule.base', '<strong>Confirm</strong> page deleting'), 'message' => Yii::t('WikiModule.base', 'Do you really want to delete this page?'), 'buttonTrue' => Yii::t('WikiModule.base', 'Delete'), 'buttonFalse' => Yii::t('WikiModule.base', 'Cancel'), 'linkContent' => '<i class="fa fa-trash-o delete"></i> ' . Yii::t('WikiModule.base', 'Delete'), 'linkHref' => $contentContainer->createUrl('//wiki/page/delete', array('id' => $page->id)), 'confirmJS' => 'function(jsonResp) { window.location.href = "' . $contentContainer->createUrl('index') . '"; }'));
        ?>
</li>

                        <?php 
    }
    ?>

                        <li><?php 
    echo Html::a('<i class="fa fa-reply back"></i> ' . Yii::t('WikiModule.base', 'Cancel'), $contentContainer->createUrl('//wiki/page/view', array('title' => $page->title)));
    ?>
</li>
                        <li class="nav-divider"></li>
                        <?php 
    if ($homePage !== null) {
        ?>
Exemplo n.º 8
0
        echo humhub\modules\like\widgets\LikeLink::widget(array('object' => $link));
        ?>
                                    </div>
                                    <?php 
        // all admins and users that created the link may edit or delete it
        ?>
                                    <?php 
        if ($accessLevel == 2 || $accessLevel == 1 && $link->content->created_by == Yii::app()->user->id) {
            ?>
                                        <div class="linklist-edit-controls linklist-editable">
                                            <?php 
            echo \humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_linkdelete_' . $link->id, 'linkOutput' => 'a', 'class' => 'deleteButton btn btn-xs btn-danger" title="' . Yii::t('LinklistModule.base', 'Delete link'), 'title' => Yii::t('LinklistModule.base', '<strong>Confirm</strong> link deleting'), 'message' => Yii::t('LinklistModule.base', 'Do you really want to delete this link?'), 'buttonTrue' => Yii::t('LinklistModule.base', 'Delete'), 'buttonFalse' => Yii::t('LinklistModule.base', 'Cancel'), 'linkContent' => '<i class="fa fa-trash-o"></i>', 'linkHref' => $contentContainer->createUrl("/linklist/linklist/delete-link", array('category_id' => $category->id, 'link_id' => $link->id)), 'confirmJS' => 'function() {
											$("#linklist-link_' . $link->id . '").remove();
											$("#linklist-widget-link_' . $link->id . '").remove();
											if($("#linklist-widget-category_' . $category->id . '").find("li").length == 0) {
												$("#linklist-widget-category_' . $category->id . '").remove();
											}
											if($(".panel-linklist-widget").find(".media").length == 0) {
												$(".panel-linklist-widget").remove();
											}
										}'));
            echo Html::a('<i class="fa fa-pencil"></i>', $contentContainer->createUrl('/linklist/linklist/edit-link', ['link_id' => $link->id, 'category_id' => $category->id]), array('title' => 'Edit Link', 'class' => 'btn btn-xs btn-primary')) . ' ';
            ?>
                                        </div>
                                    <?php 
        }
        ?>
                                </li>
                            <?php 
    }
    ?>
                        </ul>
    echo $external_source->id;
    ?>
"
             class="panel panel-default panel-calendar-external-source" data-id="<?php 
    echo $external_source->id;
    ?>
">
            <div class="panel-heading">
                <div class="heading">
                    <?php 
    echo Html::encode($external_source->name);
    ?>
                    <div class="calendar-edit-controls calendar-editable">
                        <?php 
    echo \humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_external-sourcedelete_' . $external_source->id, 'linkOutput' => 'a', 'class' => 'deleteButton btn btn-xs btn-danger" title="' . Yii::t('CalendarModule.base', 'Delete external source'), 'title' => Yii::t('CalendarModule.base', '<strong>Confirm</strong> external source deleting'), 'message' => Yii::t('CalendarModule.base', 'Do you really want to delete this external source? All related events will be lost!'), 'buttonTrue' => Yii::t('CalendarModule.base', 'Delete'), 'buttonFalse' => Yii::t('CalendarModule.base', 'Cancel'), 'linkContent' => '<i class="fa fa-trash-o"></i>', 'linkHref' => $contentContainer->createUrl("/calendar/external-source/delete", array('external_source_id' => $external_source->id)), 'confirmJS' => 'function() {
								$("#calendar-external-source_' . $external_source->id . '").remove();
								$("#calendar-widget-external-source_' . $external_source->id . '").remove();
							}'));
    echo Html::a('<i class="fa fa-pencil"></i>', $contentContainer->createUrl('/calendar/external-source/edit', ['external_source_id' => $external_source->id]), array('title' => Yii::t('CalendarModule.views_external_source_index', 'Edit External Source'), 'class' => 'btn btn-xs btn-primary')) . ' ';
    ?>
                    </div>
                </div>
            </div>
        </div>
    <?php 
}
?>
</div>
<div class="calendar-add-external-source calendar-editable"><?php 
echo Html::a(Yii::t('CalendarModule.views_external_source_index', 'Add External Source'), $contentContainer->createUrl('/calendar/external-source/edit', ['external_source_id' => -1]), array('class' => 'btn btn-primary'));
?>
</div>