Example #1
0
                                    <div class="checkbox">
                                        <label>
                                            <?php 
            echo CHtml::checkBox('user_' . $user->guid . "[adminRole]", $membership->admin_role, array('class' => 'check_admin', 'id' => "chk_admin_" . $user->id, 'data-view' => 'slider'));
            ?>
                                        </label>
                                    </div>
                                </td>




                                <td style="vertical-align:middle">
                                    <!-- load modal confirm widget -->
                                    <?php 
            echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => $user->id, 'title' => Yii::t('SpaceModule.views_admin_members', '<strong>Remove</strong> member'), 'message' => Yii::t('SpaceModule.views_admin_members', 'Are you sure, that you want to remove this member from this space?'), 'buttonTrue' => Yii::t('SpaceModule.views_admin_members', 'Yes, remove'), 'buttonFalse' => Yii::t('SpaceModule.views_admin_members', 'No, cancel'), 'cssClass' => 'btn btn-sm btn-danger', 'linkContent' => Yii::t('SpaceModule.views_admin_members', 'Remove'), 'linkHref' => $space->createUrl('/space/admin/remove-member', array('userGuid' => $user->guid, 'ajax' => 1))));
            ?>

                                </td>
                            <?php 
        } else {
            ?>
                                <td colspan="3">
                                    <div class="space-owner"><?php 
            echo Yii::t('SpaceModule.views_admin_members', 'Space owner');
            ?>
</div>
                                </td>
                                <td></td>
                            <?php 
        }
Example #2
0
<?php

use yii\helpers\Url;
/* @var $this humhub\components\View */
?>
<li>

    <?php 
echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_permalink_' . $id, 'linkOutput' => 'a', 'title' => Yii::t('ContentModule.widgets_views_permaLink', '<strong>Permalink</strong> to this post'), 'message' => '<textarea rows="3" id="permalink-txt-' . $id . '" class="form-control permalink-txt">' . $permaLink . '</textarea><p class="help-block">Copy to clipboard: Ctrl+C, Enter</p>', 'buttonFalse' => Yii::t('ContentModule.widgets_views_permaLink', 'Close'), 'linkContent' => '<i class="fa fa-link"></i> ' . Yii::t('ContentModule.widgets_views_permaLink', 'Permalink'), 'linkHref' => '', 'modalShownJS' => 'setTimeout(function(){$("#permalink-txt-' . $id . '").focus(); $("#permalink-txt-' . $id . '").select();}, 1);'));
?>
</li>
Example #3
0
                            class="fa fa-cloud-upload"></i></a>
                    <a id="profile-image-upload-edit-button"
                       style="<?php 
    if (!$space->getProfileImage()->hasImage()) {
        echo 'display: none;';
    }
    ?>
"
                       href="<?php 
    echo $space->createUrl('/space/manage/image/crop');
    ?>
"
                       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('SpaceModule.widgets_views_deleteImage', '<strong>Confirm</strong> image deleting'), 'message' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Do you really want to delete your profile image?'), 'buttonTrue' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Delete'), 'buttonFalse' => Yii::t('SpaceModule.widgets_views_deleteImage', 'Cancel'), 'linkContent' => '<i class="fa fa-times"></i>', 'cssClass' => 'btn btn-danger btn-sm', 'style' => $space->getProfileImage()->hasImage() ? '' : 'display: none;', 'linkHref' => $space->createUrl("/space/manage/image/delete", array('type' => 'profile')), 'confirmJS' => 'function(jsonResp) { resetProfileImage(jsonResp); }'));
    ?>
                </div>
            <?php 
}
?>

        </div>


    </div>

    <div class="panel-body">

        <div class="panel-profile-controls">
            <!-- start: User statistics -->
Example #4
0
        echo AjaxButton::widget(['label' => '<i class="fa fa-pencil"></i> ' . Yii::t('CommentModule.widgets_views_showComment', 'Edit'), 'ajaxOptions' => ['type' => 'POST', 'success' => new yii\web\JsExpression("function(html){ \$('.preferences .dropdown').removeClass('open'); \$('#comment_editarea_" . $comment->id . "').replaceWith(html); \$('#comment_input_" . $comment->id . "_contenteditable').focus(); }"), 'url' => Url::to(['/comment/comment/edit', 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id, 'id' => $comment->id])], 'tag' => 'a']);
        ?>

                        </li>
                    <?php 
    }
    ?>

                    <?php 
    if ($canDelete) {
        ?>
                        <li>

                            <!-- load modal confirm widget -->
                            <?php 
        echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_commentdelete_' . $comment->id, 'linkOutput' => 'a', 'title' => Yii::t('CommentModule.widgets_views_showComment', '<strong>Confirm</strong> comment deleting'), 'message' => Yii::t('CommentModule.widgets_views_showComment', 'Do you really want to delete this comment?'), 'buttonTrue' => Yii::t('CommentModule.widgets_views_showComment', 'Delete'), 'buttonFalse' => Yii::t('CommentModule.widgets_views_showComment', 'Cancel'), 'linkContent' => '<i class="fa fa-trash-o"></i> ' . Yii::t('CommentModule.widgets_views_showComment', 'Delete'), 'linkHref' => Url::to(["/comment/comment/delete", 'contentModel' => $comment->object_model, 'contentId' => $comment->object_id, 'id' => $comment->id]), 'confirmJS' => "function(html) { \$('#comment_" . $comment->id . "').slideUp(); }"));
        ?>
                        </li>
                    <?php 
    }
    ?>
                </ul>
            </li>
        </ul>

    <?php 
}
?>

    <a href="<?php 
echo $user->getUrl();
        ?>
                            <li><?php 
        echo Html::a('<i class="fa fa-pencil-square-o edit"></i> ' . Yii::t('WikiModule.base', 'Edit page'), $contentContainer->createUrl('/wiki/page/edit', array('id' => $page->id)));
        ?>
</li>
                        <?php 
    }
    ?>

                        <li><?php 
    echo Html::a('<i class="fa fa-clock-o history"></i> ' . Yii::t('WikiModule.base', 'Page History'), $contentContainer->createUrl('/wiki/page/history', array('id' => $page->id)));
    ?>
</li>
                        <li>
                            <?php 
    echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_permalink', 'linkOutput' => 'a', 'title' => Yii::t('ContentModule.widgets_views_permaLink', '<strong>Permalink</strong> to this page'), 'message' => '<textarea rows="3" id="permalink-txt" class="form-control permalink-txt">' . \yii\helpers\Url::to(['/content/perma', 'id' => $page->content->id], true) . '</textarea><p class="help-block">Copy to clipboard: Ctrl+C, Enter</p>', 'buttonFalse' => Yii::t('ContentModule.widgets_views_permaLink', 'Close'), 'linkContent' => '<i class="fa fa-link link"></i> ' . Yii::t('WikiModule.base', 'Permalink'), 'linkHref' => '', 'confirmJS' => 'function(jsonResp) { wallDelete(jsonResp); }', 'modalShownJS' => 'setTimeout(function(){$("#permalink-txt").focus(); $("#permalink-txt").select();}, 1);'));
    ?>
                        </li>




                    <?php 
} else {
    ?>

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

                            <!-- load modal confirm widget -->
Example #6
0
<?php

use yii\helpers\Url;
/* @var $this humhub\components\View */
?>
<li>
    <!-- load modal confirm widget -->
    <?php 
echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_postdelete_' . $id, 'linkOutput' => 'a', 'title' => Yii::t('ContentModule.widgets_views_deleteLink', '<strong>Confirm</strong> post deleting'), 'message' => Yii::t('ContentModule.widgets_views_deleteLink', 'Do you really want to delete this post? All likes and comments will be lost!'), 'buttonTrue' => Yii::t('ContentModule.widgets_views_deleteLink', 'Delete'), 'buttonFalse' => Yii::t('ContentModule.widgets_views_deleteLink', 'Cancel'), 'linkContent' => '<i class="fa fa-trash-o"></i> ' . Yii::t('ContentModule.widgets_views_deleteLink', 'Delete'), 'linkHref' => Url::to(['/content/content/delete', 'model' => $model, 'id' => $id]), 'confirmJS' => 'function(json) { $(".wall_"+json.uniqueId).remove(); }'));
?>
</li>
        <div class="modal-footer">
            <div class="row">
                <div class="col-md-6 text-left">
                    <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => Yii::t('MailModule.views_mail_edit', 'Save'), 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => 'function(){ $("#create-message-loader").removeClass("hidden"); }', 'success' => 'function(html){ $("#globalModal").html(html); }', 'url' => Url::to(['/mail/mail/edit-entry', 'messageEntryId' => $entry->id])], 'htmlOptions' => ['class' => 'btn btn-primary']]);
?>

                    <button type="button" class="btn btn-primary" data-dismiss="modal"><?php 
echo Yii::t('MailModule.views_mail_create', 'Close');
?>
</button>

                </div>
                <div class="col-md-6 text-right">
                    <?php 
echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_maildelete_' . $entry->id, 'title' => Yii::t('MailModule.views_mail_show', '<strong>Confirm</strong> message deletion'), 'message' => Yii::t('MailModule.views_mail_show', 'Do you really want to delete this message?'), 'buttonTrue' => Yii::t('MailModule.views_mail_show', 'Delete'), 'buttonFalse' => Yii::t('MailModule.views_mail_show', 'Cancel'), 'linkContent' => Yii::t('MailModule.views_mail_show', 'Delete'), 'cssClass' => 'btn btn-danger', 'linkHref' => Url::to(["/mail/mail/delete-entry", 'messageEntryId' => $entry->id])));
?>
                </div>
            </div>

            <div class="col-md-1 modal-loader">
                <div id="create-message-loader" class="loader loader-small hidden"></div>
            </div>
        </div>

        <?php 
CActiveForm::end();
?>
    </div>

</div>
Example #8
0
        ?>


                    <div class="task-controls end pull-right">

                        <a href="<?php 
        echo $contentContainer->createUrl('edit', ['id' => $task->id]);
        ?>
"
                           class="tt"
                           data-target="#globalModal" data-toggle="tooltip"
                           data-placement="top" data-original-title="Edit Task"><i class="fa fa-pencil"></i></a>


                        <?php 
        echo humhub\widgets\ModalConfirm::widget(array('uniqueID' => 'modal_delete_task_' . $task->id, 'linkOutput' => 'a', 'title' => Yii::t('TasksModule.views_task_show', '<strong>Confirm</strong> deleting'), 'message' => Yii::t('TasksModule.views_task_show', 'Do you really want to delete this task?'), 'buttonTrue' => Yii::t('TasksModule.views_task_show', 'Delete'), 'buttonFalse' => Yii::t('TasksModule.views_task_show', 'Cancel'), 'linkContent' => '<i class="fa fa-times-circle-o colorDanger"></i>', 'linkHref' => $contentContainer->createUrl('delete', array('id' => $task->id)), 'confirmJS' => "\$('#task_" . $task->id . "').fadeOut('fast')"));
        ?>

                    </div>

                    <div class="task-controls pull-right">

                        <a data-toggle="collapse"
                           href="#task-comment-<?php 
        echo $task->id;
        ?>
"
                           onclick="$('#comment_humhubmodulestasksmodelsTask_<?php 
        echo $task->id;
        ?>
').show();return false;"