Beispiel #1
0
        <?php 
foreach ($model->feeds['feeds'] as $feed) {
    ?>
            <li class="post-item">
                <div class="post-content">
                    <?php 
    if (!empty($feed->content)) {
        echo Html::encode($feed->content);
    } else {
        echo strtr($feed['template'], unserialize($feed['feed_data']));
    }
    ?>
                </div>
                <div class="clearfix"></div>
                <div class="post-info">
                    <i class="glyphicon glyphicon-time icon-muted"></i> <?php 
    echo Tools::formatTime($feed->created_at);
    ?>
                </div>
            </li>
        <?php 
}
?>
        <?php 
echo InfiniteScrollPager::widget(['pagination' => $model->posts['pages'], 'widgetId' => '#content']);
?>
      </ul>
    </div><!-- activity-list -->
  </div>
</div>
Beispiel #2
0
        ?>
                    </span>
                    <div class="media-content">
                        <?php 
        echo $broadcast['content'];
        ?>
                    </div>
                    <div class="thread-time"></div>
                  </div>
                </div>
              </div>
          <?php 
    }
    ?>
          <?php 
    echo InfiniteScrollPager::widget(['pagination' => $model->broadcasts['pages'], 'widgetId' => '.thread-list']);
    ?>
        <?php 
} else {
    ?>
            <div class="widget-container">
                <div style="padding:50px">
                    <h1><?php 
    echo Yii::t('app', 'No data to display.');
    ?>
</h1>
                </div>
            </div>
        <?php 
}
?>
Beispiel #3
0
 public function infiniteScrollScript()
 {
     $widgetId = $this->options['id'];
     echo InfiniteScrollPager::widget(['pagination' => $this->pagination, 'widgetId' => '#' . $widgetId, 'contentLoadedCallback' => "function(newElements) {\n    \$(newElements).appendTo('#{$widgetId}');\n    \$('#{$widgetId}').imagesLoaded( function() {\n        new Masonry(document.getElementById('{$widgetId}'));\n    });\n  }"]);
 }
Beispiel #4
0
" data-confirm="<?php 
    echo Yii::t('app', 'Are you sure to delete it?');
    ?>
" data-method="post">
                                    <span class="glyphicon glyphicon-trash"></span> <?php 
    echo Yii::t('app', 'Delete');
    ?>
                                </a>
                            </div>
                        </div>
                    </li>
                <?php 
}
?>
                <?php 
echo InfiniteScrollPager::widget(['pagination' => $pages, 'widgetId' => '.post-all']);
?>
            </ul>
        </div>
        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><?php 
echo Yii::t('app', 'Recommendation');
?>
</h3>
                </div>
                <div class="panel-body">
                    <div class="list-group">
                        <?php 
foreach ($forums as $forum) {
Beispiel #5
0
    echo Yii::t('app', 'Are you sure to delete it?');
    ?>
" data-method="post">
                                    <span class="glyphicon glyphicon-trash"></span> <?php 
    echo Yii::t('app', 'Delete');
    ?>
                                </a>
                            </div>
                        </div>
                    </li>
                <?php 
}
?>
            </ul>
            <?php 
echo InfiniteScrollPager::widget(['pagination' => $pages, 'widgetId' => '.timeline']);
?>
        </div>
        <div class="col-md-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><?php 
echo Yii::t('app', 'Recommendation');
?>
</h3>
                </div>
                <div class="panel-body">
                    <div class="list-group">
                        <?php 
foreach ($forums as $forum) {
    ?>
Beispiel #6
0
                        <a href="javascript:;" onclick="setRepostFormAction(<?php 
        echo $feed['id'];
        ?>
)" data-toggle="modal" data-target="#repost-modal">
                            <span class="glyphicon glyphicon-share-alt"></span> <?php 
        echo Yii::t('app', 'Repost');
        ?>
                        </a>
                    </div>
                </div>
            </div>
        <?php 
    }
    ?>
        <?php 
    echo InfiniteScrollPager::widget(['pagination' => $pages, 'widgetId' => '#content']);
    ?>
    </div>
<?php 
} else {
    ?>
    <div class="no-data-found">
        <i class="glyphicon glyphicon-folder-open"></i>
        <?php 
    echo Yii::t('app', 'No feed to display. Go to ');
    echo Html::a(Yii::t('app', 'Explore') . '?', ['/explore/index']);
    ?>
    </div>
<?php 
}
Modal::begin(['header' => '<h4>' . Yii::t('app', 'Repost') . '</h4>', 'options' => ['id' => 'repost-modal']]);
Beispiel #7
0
                                <h3><?php 
        echo Html::a(Html::encode($comment['title']), ['/home/comment/view', 'id' => $comment['id']]);
        ?>
</h3>
                            <?php 
    }
    ?>
                            <?php 
    echo HtmlPurifier::process($comment['comment']);
    ?>
                        </p>
                        <a href="<?php 
    echo Url::toRoute(['/forum/thread/view', 'id' => $comment['id']]);
    ?>
">
                            <span class="glyphicon glyphicon-comment"></span> <?php 
    echo Yii::t('app', 'Reply');
    ?>
                        </a>
                    </div>
                </div>
            <?php 
}
?>
            <?php 
echo InfiniteScrollPager::widget(['pagination' => $user->comments['pages'], 'widgetId' => '.col-md-12']);
?>
        </div>
    </div>
</div>
Beispiel #8
0
 public function infiniteScrollScript()
 {
     $widgetId = '#' . $this->options['id'];
     echo InfiniteScrollPager::widget(['pagination' => $this->pagination, 'widgetId' => $widgetId, 'contentLoadedCallback' => "function( newElements ) {\n    var newElems = \$( newElements );\n    \$('{$widgetId}').imagesLoaded( function() {\n        \$('{$widgetId}').masonry('appended', newElems );\n    });\n  }"]);
 }
Beispiel #9
0
                                <span class="item-line"></span>
                                <?php 
        }
        ?>
                                <span class="glyphicon glyphicon-time"></span> <?php 
        echo Yii::$app->formatter->asRelativeTime($post['created_at']);
        ?>
                            </div>
                        </footer>
                </article>
            <?php 
    }
    ?>
        <?php 
} else {
    ?>
            <div class="no-data-found">
                <i class="glyphicon glyphicon-folder-open"></i>
                <?php 
    echo Yii::t('app', 'No data to display.');
    ?>
            </div>
        <?php 
}
?>
    </div>
    <?php 
echo InfiniteScrollPager::widget(['pagination' => $pages, 'widgetId' => '#social-container']);
?>
</div>
Beispiel #10
0
    echo Yii::$app->tools->formatTime($post['created_at']);
    ?>
                        </span>
                        <a class="floor-number" id="<?php 
    echo $post['id'];
    ?>
" href="#<?php 
    echo $floor_number;
    ?>
">
                           <span class="badge"><?php 
    echo $floor_number;
    ?>
#</span>
                        </a>
                    </div>
                    <div class="post-content">
                        <?php 
    echo HtmlPurifier::process($post['content']);
    ?>
                    </div>
                </div>
            </div>
        <?php 
}
?>
        <?php 
echo InfiniteScrollPager::widget(['pagination' => $pages, 'widgetId' => '#post-view']);
?>
    </div>
</section>
Beispiel #11
0
    echo Html::a($notice['username'], ['/user/view', 'id' => $notice['username']]);
    ?>
                <?php 
    echo Yii::t('notice', $notice['type_title'], unserialize($notice['title']));
    ?>
            </h4>
            <p><?php 
    echo $notice['content'];
    ?>
</p>
            <p>
                <?php 
    echo Yii::$app->formatter->asRelativeTime($notice['created_at']);
    ?>
                <a class="pull-right" href="<?php 
    echo Url::toRoute(unserialize($notice['source_url']));
    ?>
"><?php 
    echo Yii::t('app', 'View Details');
    ?>
</a>
            </p>
        </div>
    </li>
    <?php 
}
?>
</ul>
<?php 
echo InfiniteScrollPager::widget(['pagination' => $notices['pages'], 'widgetId' => '#notice-content']);