unserver-unify
Version:
134 lines • 5.76 kB
HTML
<div ng-controller="CourseHomeCtrl as ctrl">
<div ng-if="ctrl.course._id">
<span ng-switch="ctrl.course.theme">
<div ng-switch-when="red">
<div ng-include="'app/course/homered.html'">
</div>
</div>
<div ng-switch-when="blue">
<div ng-include="'app/course/homeblue.html'">
</div>
</div>
<div ng-switch-when="yellow">
<div ng-include="'app/course/homeyellow.html'">
</div>
</div>
<div ng-switch-when="mobile">
<div ng-include="'app/course/homemobile.html'">
</div>
</div>
<div ng-switch-when="orange">
<div ng-include="'app/course/homeorange.html'">
</div>
</div>
<div ng-switch-when="sidebar">
<div ng-include="'app/course/homesidebar.html'">
</div>
</div>
<div ng-switch-when="purple" style="margin:0 -15px;">
<div ng-include="'app/course/homepurple.html'">
</div>
</div>
<div ng-switch-when="tab">
<div ng-include="'app/course/hometab.html'">
</div>
</div>
<div ng-switch-when="practice">
<div ng-include="'app/course/homepractice.html'">
</div>
</div>
<div ng-switch-default="">
<div ng-include="'app/course/homedefault.html'">
</div>
</div>
</span>
<div class="clearfix">
</div>
<div ng-if="ctrl.course.theme !== 'purple'">
<div ng-if="ctrl.course.theme !== 'sidebar'">
<div ng-include="'app/course/homecourseinformation.html'">
</div>
<div ng-include="'app/course/homerelatedcourse.html'">
</div>
</div>
<session-table-list buildingflag="true" courseid="ctrl.id" ng-if="ctrl.course.theme!='mobile'" pageitemcount="5">
</session-table-list>
<div class="row" ng-if="ctrl.course.theme!='mobile'" style="margin-top:20px;">
<div class="col-md-12 margin-bottom-30">
<!-- New Style Starts -->
<div class="profile" ng-if="!currentSchool.apiOptions.hdbftp">
<div class="panel-heading overflow-h">
<h2 class="panel-title heading-sm pull-left">
<i class="fa fa-comments">
</i>
{{'Leave Your Comments' | translate }}
</h2>
</div>
<div class="panel-body white-bg margin-bottom-30">
<div class="media media-v2">
<a class="pull-left" href="#">
<img class="media-object rounded-x" height="80" ng-src="{{ ctrl.profileImg }}" width="80"/>
</a>
<div class="media-body">
<textarea class="form-control" name="content" ng-model="ctrl.commentscontent" placeholder="{{'Write your comments here' | translate }}..." required="" rows="5">
</textarea>
<div class="clearfix margin-bottom-10">
</div>
<button class="btn btn-u" ng-click="ctrl.sendComment()" ng-if="ctrl.commentscontent&&ctrl.commentscontent.length>1" style="padding-left:30px; padding-right:30px;" translate="">
Submit
</button>
</div>
</div>
</div>
<div class="panel-heading overflow-h" ng-if="ctrl.commentscount>0">
<h2 class="panel-title heading-sm pull-left">
<i class="fa fa-comments">
</i>
{{'Users Comments' | translate }}
<span style="color:#337ab7;">
({{ctrl.commentscount}})
</span>
</h2>
</div>
<div class="panel-body white-bg" ng-if="ctrl.commentscount>0">
<div class="media media-v2" ng-repeat="topic in ctrl.coursetopics">
<a class="pull-left" ui-sref="index.setting.profile({ id: topic.author.loginname ,cs:getCheckSum(topic.author.loginname)})">
<img class="media-object rounded-x img_res_adj" height="80" ng-src="{{ topic.avatar_url }}" title="{{ topic.authorname }}" width="80"/>
</a>
<div class="media-body">
<h4 class="media-heading">
<strong>
<a ui-sref="index.setting.profile({ id: topic.author.loginname ,cs:getCheckSum(topic.author.loginname)})">
{{ topic.author.fullname }}
</a>
</strong>
@{{ topic.author.loginname }}
<small>
{{ topic.create_at | date: 'short' }}
</small>
<a class="pull-right color-red" ng-click="ctrl.delete(topic)" ng-if="loginService.user&&loginService.user.is_admin||loginService.user.grole=='admin'||loginService.user._id == topic.author_id" style="margin-top:15px;">
<i class="fa fa-remove expand-list rounded-x">
</i>
</a>
</h4>
<p style="margin-right: 30px;">
{{topic.content}}
</p>
</div>
</div>
<button class="btn btn-info btn-block" ng-click="ctrl.getMore()" ng-if="ctrl.coursetopics.length<ctrl.commentscount">
More +
</button>
</div>
</div>
<!-- New Style Ends -->
</div>
</div>
</div>
<div class="clearfix">
</div>
</div>
<div ng-if="!ctrl.course._id" class="loader">
<img src="assets/images/preloader.gif">
</div>
</div>