Files
meanTorrent/modules/forums/client/views/index.client.view.html

88 lines
5.9 KiB
HTML

<section ng-controller="ForumsController as vm" ng-init="vm.init();">
<div ng-include="'/modules/forums/client/views/search.client.view.html'"></div>
<div class="container forum-list">
<div class="path margin-top-20">
<ol class="breadcrumb">
<li><a ui-sref="forums.list"><span class="small glyphicon glyphicon-home"></span> {{'FORUMS.HOME_INDEX' | translate}}</a></li>
<!--<li><a href="#">Library</a></li>-->
<!--<li class="active">Data</li>-->
</ol>
</div>
<div class="table-responsive table-category" ng-repeat="cat in vm.forumsConfig.category | orderBy: 'index'">
<table class="table table-hover table-valign-middle" ng-if="vm.getCatShowedStatus(cat)">
<thead>
<tr>
<th class="col-md-7">{{'FORUMS.CATEGORY.'+cat.name | translate}}</th>
<th class="text-center xs-hide">{{'FORUMS.FIELDS.TOPICS' | translate}}</th>
<th class="text-center xs-hide">{{'FORUMS.FIELDS.REPLIES' | translate}}</th>
<th class="xs-hide sm-hide">{{'FORUMS.FIELDS.LAST_REPLY' | translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="f in vm.forums | filter: { category: cat.value }" ng-if="vm.getForumShowedStatus(f)">
<td>
<span class="forum-icon glyphicon glyphicon-folder-open" ng-class="{'has-new-post': vm.hasNewReply(f.lastTopic)}"></span>
<div class="forum-info">
<h4><a ui-sref="forums.view({ forumId: f._id})">{{f.name}}</a>
<small class="badge badge_default readonly" title="{{'FORUMS.TITLE_READONLY' | translate}}" ng-show="f.readOnly">R</small>
<small class="badge badge_default readonly" title="{{'FORUMS.TITLE_VIPONLY' | translate}}" ng-show="f.vipOnly">V</small>
<small class="badge badge_default readonly" title="{{'FORUMS.TITLE_OPERONLY' | translate}}" ng-show="f.operOnly">O</small>
<span class="today-new-count" ng-if="vm.getTodayNewCount(f);" ng-bind-html="vm.getTodayNewCount(f);"></span>
</h4>
<p class="forum-desc" ng-bind-html="vm.getForumDesc(f);"></p>
<p ng-if="!f.operOnly"><span class="moderators-title">{{'FORUMS.FIELDS.MODERATORS' | translate}}:</span>
<span class="moderators-list">
<span class="moderators-item" ng-if="!f.moderators.length">{{'FORUMS.NONE_MODERATOR' | translate}}</span>
<span class="moderators-item" ng-repeat="m in f.moderators">
<span user-info="m" info-name></span>
<!--<span message-to="m" to-class="message-to-icon"></span>-->
</span>
</span>
</p>
</div>
</td>
<td class="text-center xs-hide"><span class="count-number">{{f.topicCount}}</span></td>
<td class="text-center xs-hide"><span class="count-number">{{f.replyCount}}</span></td>
<td class="xs-hide sm-hide reply-width">
<div ng-if="f.lastTopic">
<div ng-if="f.lastTopic._replies.length > 0"> <!--reply-->
<div class="text-long">
<a ui-sref="forums.topic({ forumId: f._id, topicId: f.lastTopic._id })">Re: {{f.lastTopic.title}}</a>
</div>
<div class="small reply-by">
<span translate="FORUMS.FIELDS.REPLY_BY_1"></span>
<span user-info="f.lastTopic.lastUser" info-name></span>
<!--<span message-to="f.lastTopic.lastUser" to-class="message-to-icon"></span>-->
</div>
<div class="small reply-by"
translate="FORUMS.FIELDS.REPLY_BY_2"
translate-values="{createdAt: '{{f.lastTopic.lastReplyAt | date: 'yyyy-MM-dd HH:mm:ss'}}'}">
</div>
</div>
<div ng-if="f.lastTopic._replies.length == 0"> <!--post-->
<div class="text-long">
<a ui-sref="forums.topic({ forumId: f._id, topicId: f.lastTopic._id })">{{f.lastTopic.title}}</a>
</div>
<div class="small reply-by">
<span translate="FORUMS.FIELDS.REPLY_BY_1"></span>
<span user-info="f.lastTopic.user" info-name></span>
<!--<span message-to="f.lastTopic.user" to-class="message-to-icon"></span>-->
</div>
<div class="small reply-by"
translate="FORUMS.FIELDS.REPLY_BY_3"
translate-values="{createdAt: '{{f.lastTopic.createdAt | date: 'yyyy-MM-dd HH:mm:ss'}}'}">
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</section>