예제 #1
0
 /**
  * Build info text about a content
  *
  * This is a combination a the type of the content with a short preview
  * of it.
  *
  * @param Content $content
  * @return string
  */
 public function getContentInfo(\humhub\modules\content\interfaces\ContentTitlePreview $content)
 {
     return \yii\helpers\Html::encode($content->getContentName()) . ' "' . \humhub\widgets\RichText::widget(['text' => $content->getContentDescription(), 'minimal' => true, 'maxLength' => 60]) . '"';
 }
예제 #2
0
파일: edit.php 프로젝트: tonylow/skillslink
">
    <?php 
$form = CActiveForm::begin(['id' => 'post-edit-form']);
?>

    <?php 
echo $form->textArea($post, 'message', array('class' => 'form-control', 'id' => 'post_input_' . $post->id, 'placeholder' => Yii::t('PostModule.views_edit', 'Edit your post...')));
?>

    <!-- create contenteditable div for HEditorWidget to place the data -->
    <div id="post_input_<?php 
echo $post->id;
?>
_contenteditable" class="form-control atwho-input"
         contenteditable="true"><?php 
echo \humhub\widgets\RichText::widget(['text' => $post->message]);
?>
</div>

    <?php 
echo \humhub\widgets\RichTextEditor::widget(['id' => 'post_input_' . $post->id, 'inputContent' => $post->message]);
?>

    <?php 
// Creates Uploading Button
echo humhub\modules\file\widgets\FileUploadButton::widget(array('uploaderId' => 'post_upload_' . $post->id, 'object' => $post));
?>


    <?php 
echo \humhub\widgets\AjaxButton::widget(['label' => 'Save', 'ajaxOptions' => ['type' => 'POST', 'beforeSend' => new yii\web\JsExpression('function(html){  $("#post_input_' . $post->id . '_contenteditable").hide(); showLoader("' . $post->id . '"); }'), 'success' => new yii\web\JsExpression('function(html){ $(".wall_' . $post->getUniqueId() . '").replaceWith(html); }'), 'url' => Url::to(['/post/post/edit', 'id' => $post->id])], 'htmlOptions' => ['class' => 'btn btn-primary', 'id' => 'post_edit_post_' . $post->id, 'style' => 'position: absolute; left: -90000000px; opacity: 0;']]);
예제 #3
0
echo Html::hiddenInput('contentModel', $contentModel);
?>
    <?php 
echo Html::hiddenInput('contentId', $contentId);
?>
    <?php 
echo $form->textArea($comment, 'message', array('class' => 'form-control', 'id' => 'comment_input_' . $comment->id, 'placeholder' => Yii::t('CommentModule.views_edit', 'Edit your comment...')));
?>

    <!-- create contenteditable div for HEditorWidget to place the data -->
    <div id="comment_input_<?php 
echo $comment->id;
?>
_contenteditable" class="form-control atwho-input"
         contenteditable="true"><?php 
echo \humhub\widgets\RichText::widget(['text' => $comment->message, 'edit' => true]);
?>
</div>


    <?php 
/* Modify textarea for mention input */
echo \humhub\widgets\RichTextEditor::widget(array('id' => 'comment_input_' . $comment->id, 'inputContent' => $comment->message, 'record' => $comment));
?>

    <div class="comment-buttons">

        <?php 
// Creates Uploading Button
echo humhub\modules\file\widgets\FileUploadButton::widget(array('uploaderId' => 'comment_upload_' . $comment->id, 'fileListFieldName' => 'fileList', 'object' => $comment));
?>
예제 #4
0
<?php

use yii\helpers\Html;
echo strip_tags(Yii::t('CommentModule.views_activities_CommentCreated', "%displayName% wrote a new comment ", array('%displayName%' => Html::encode($originator->displayName))));
?>

"<?php 
echo strip_tags(\humhub\widgets\RichText::widget(['text' => $source->message, 'minimal' => true]));
?>
"
echo $file->id;
?>
">
    
    <div style="margin-bottom: 10px">
        <?php 
$form = CActiveForm::begin();
?>
    
        <!-- create contenteditable div for HEditorWidget to place the data -->
        <div id="cfiles_file_description_<?php 
echo $file->id;
?>
_contenteditable" class="form-control atwho-input"
             contenteditable="true"><?php 
echo \humhub\widgets\RichText::widget(['text' => $file->description, 'edit' => true]);
?>
</div>
    
        <?php 
echo $form->field($file, 'description')->label(false)->textArea(array('class' => 'form-control', 'id' => 'cfiles_file_description_' . $file->id, 'placeholder' => Yii::t('CfilesModule.base', 'Edit the file description...')));
?>
    
        <?php 
echo \humhub\widgets\RichTextEditor::widget(['id' => 'cfiles_file_description_' . $file->id, 'inputContent' => $file->description, 'record' => $file]);
?>
        
        <?php 
//echo $form->field($file, 'description');
?>
    
예제 #6
0
                    <form class="form-horizontal" role="form">
                        <?php 
    foreach ($user->profile->getProfileFields($category) as $field) {
        ?>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">
                                    <?php 
        echo Html::encode(Yii::t($field->getTranslationCategory(), $field->title));
        ?>
                                </label>
                                <?php 
        if (strtolower($field->title) == 'about') {
            ?>
                                    <div class="col-sm-9">
                                        <p class="form-control-static"><?php 
            echo RichText::widget(['text' => $field->getUserValue($user, true)]);
            ?>
</p>
                                    </div>
                                <?php 
        } else {
            ?>
                                    <div class="col-sm-9">
                                        <?php 
            if ($field->field_type_class == MarkdownEditor::className()) {
                ?>
                                            <p class="form-control-static" style="min-height: 0 !important;padding-top:0;">
                                                <?php 
                echo MarkdownView::widget(['markdown' => $field->getUserValue($user, false)]);
                ?>
                                            </p>
예제 #7
0
<?php

use yii\helpers\Html;
echo Yii::t('PostModule.views_activities_PostCreated', '{displayName} created a new {contentTitle}.', array('{displayName}' => '<strong>' . Html::encode($originator->displayName) . '</strong>', '{contentTitle}' => '<strong>' . Html::encode($source->getContentName()) . '</strong>'));
?>
<br />
<em>"<?php 
echo \humhub\widgets\RichText::widget(['text' => $source->getContentDescription(), 'minimal' => true]);
?>
"</em>
예제 #8
0
<?php

use yii\helpers\Html;
echo Yii::t('CommentModule.views_activities_CommentCreated', "%displayName% wrote a new comment ", array('%displayName%' => '<strong>' . Html::encode($originator->displayName) . '</strong>'));
?>
<br />

<em>"<?php 
echo \humhub\widgets\RichText::widget(['text' => $source->message, 'minimal' => true]);
?>
"</em>
<?php

humhub\modules\dropbox\Assets::register($this);
use yii\helpers\Html;
?>

<div class="media">
    <span id="dropbox-post-content-<?php 
echo $object->id;
?>
"
          style="overflow: hidden; margin-bottom: 5px;">
              <?php 
print \humhub\widgets\RichText::widget(['text' => $object->message]);
?>
    </span>
    <br><br>
    <?php 
foreach ($object->files as $file) {
    ?>

        <table style="margin-bottom: 8px; margin-left: 15px;">
            <tr>
                <!-- File or photo icon -->
                <td style="vertical-align: top;">
                    <?php 
    if (!$file->thumbnail_link) {
        ?>
                        <i class="fa fa-file"></i<
                    <?php 
    } else {
예제 #10
0
<?php

use yii\helpers\Html;
echo Yii::t('CommentModule.views_activities_CommentCreated', "%displayName% wrote a new comment ", array('%displayName%' => '<strong>' . Html::encode($originator->displayName) . '</strong>'));
echo ' "' . \humhub\widgets\RichText::widget(['text' => $source->message, 'minimal' => true, 'maxLength' => 100]) . '"';