Example #1
0
                                    <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>
                                        <?php 
            } else {
                ?>
                                            <p class="form-control-static"><?php 
                echo $field->getUserValue($user, false);
                ?>
</p>                     
                                        <?php 
            }
            ?>
                                    </div>
                                <?php 
        }
 /**
  * Markdown preview action for MarkdownViewWidget
  * We require an own preview action here to also handle internal wiki links.
  */
 public function actionPreviewMarkdown()
 {
     $this->forcePostRequest();
     $content = MarkdownView::widget(['markdown' => Yii::$app->request->post('markdown'), 'parserClass' => 'humhub\\modules\\wiki\\Markdown']);
     return $this->renderAjaxContent($content);
 }
                                                                <td style="font-size: 13px; line-height: 22px; font-family:Open Sans,Arial,Tahoma, Helvetica, sans-serif; color:#555555; font-weight:300; text-align:left; ">

                                                                    <strong><?php 
echo Html::encode($sender->displayName);
?>
</strong> <?php 
echo Yii::t('MailModule.views_emails_NewMessageEntry', 'sent you a new message in');
?>
 <strong><?php 
echo Html::encode($message->title);
?>
</strong>
                                                                    <br>
                                                                    <br>
                                                                    <?php 
echo MarkdownView::widget(array('markdown' => $entry->content));
?>

                                                                </td>
                                                            </tr>

                                                        </table>

                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <!-- end  content top-->

                                    <!--start space height -->
humhub\modules\wiki\Assets::register($this);
?>
<div class="panel panel-default">
    <div class="panel-body">

        <div class="row">
            <div class="col-lg-9 col-md-9 col-sm-9 wiki-content">
                <h1><strong><?php 
echo Html::encode($page->title);
?>
</strong></h1>
                <hr>

                <div class="markdown-render">
                    <?php 
echo \humhub\widgets\MarkdownView::widget(['markdown' => $content, 'parserClass' => "humhub\\modules\\wiki\\Markdown"]);
?>
                </div>
                <hr>

                <div class="social-controls">
                    <?php 
echo \humhub\modules\comment\widgets\CommentLink::widget(array('object' => $page));
?>
                    &middot; <?php 
echo \humhub\modules\like\widgets\LikeLink::widget(array('object' => $page));
?>
                </div>
                <?php 
echo \humhub\modules\comment\widgets\Comments::widget(array('object' => $page));
?>
                <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>';
    }
    ?>
                </div>
            </div>
        </a>
    </li>
<?php 
}
 public function actionPreview()
 {
     $this->forcePostRequest();
     return \humhub\widgets\MarkdownView::widget(['markdown' => Yii::$app->request->post('markdown')]);
 }
<?php

use humhub\libs\Helpers;
use humhub\widgets\MarkdownView;
?>
<div class="media meeting">
    <div class="media-body">
        <h4 class="media-heading"><a href="<?php 
echo $wiki->getUrl();
?>
"><?php 
echo $wiki->title;
?>
</a></h4>
        <div class="markdown-render">
            <?php 
echo MarkdownView::widget(['markdown' => Helpers::truncateText($content, 500), 'parserClass' => "humhub\\modules\\wiki\\Markdown"]);
?>
        </div>

        <a href="<?php 
echo $wiki->getUrl();
?>
"><?php 
echo Yii::t('WikiModule.widgets_views_wallentry', 'Open wiki page...');
?>
</a>
    </div>
</div>
<div class="media">
    <div class="media-body">
        <h4 class="media-heading"><a href="<?php 
echo $page->getUrl();
?>
"><?php 
echo $page->title;
?>
</a></h4>

        <?php 
if ($page->type == ContainerPage::TYPE_MARKDOWN) {
    ?>
            <div class="markdown-render">
                <?php 
    echo MarkdownView::widget(['markdown' => Helpers::truncateText($page->page_content, 500)]);
    ?>
            </div>
        <?php 
}
?>

        <a href="<?php 
echo $page->getUrl();
?>
"><?php 
echo Yii::t('CustomPagesModule.widgets_views_wallentry', 'Open page...');
?>
</a>
    </div>
</div>
Example #9
0
<?php

use yii\helpers\Url;
use yii\helpers\Html;
use humhub\widgets\MarkdownView;
echo strip_tags(Yii::t('MailModule.views_emails_NewMessage', '<strong>New</strong> message'));
?>


<?php 
echo Html::encode($originator->displayName);
?>
 <?php 
echo strip_tags(Yii::t('MailModule.views_emails_NewMessage', 'sent you a new message:'));
?>
 <?php 
echo Html::encode($message->title);
?>


<?php 
echo strip_tags(MarkdownView::widget(array('markdown' => $entry->content, 'returnPlain' => true)));
?>


<?php 
echo strip_tags(Yii::t('MailModule.views_emails_NewMessage', 'Reply now'));
?>
: <?php 
echo urldecode(Url::to(['/mail/mail/index', 'id' => $message->id], true));