<div class="post-container">
    <div loading-spinner></div>
    <div class="class-detail-name"><span class="course-name-width hidden inline-block">{{course.syllabus_title}}<font ng-if="course.syllabus_title != null" class="fb" style="height:39px; line-height:39px; vertical-align:top; margin:0 3px;">·</font>{{course.name}}</span><span  ng-click="invite()" class="f13 blue-title-sub">邀请码</span></div>
    <div class="tab-wrap">
        <a ng-click="tab($index+1)" ng-repeat="menu in menus" id="class_tab_1" href="javascript:void(0);" ng-class="['weixin-tab', {'class-tab-active': currentTab == $index+1}]">{{menu}}</a>
    </div>
    <!--<div class="slice3 fl"></div>-->


    <!--<div ng-repeat="menu in menus">-->
    <!--<div id="class_tab_1" ng-class="[{'class-detail-tab': isTeacher},{'class-detail-tab3': !isTeacher},{'class-tab-active':currentTab==$index+1}]" ng-click="tab($index+1);"><a herf="javascript:void(0);">{{menu}}</a></div>-->
    <!--<div ng-if="!$last" class="slice2 fl">-->
    <!--<div class="slice-line2"></div>-->
    <!--</div>-->
    <!--</div>-->

    <!--<div class="slice3 fl"></div>-->
    <!--<div class="cl"></div>-->

    <div ng-class="{'undis': !showActivities,'mb50':!course_has_more}">
        <div ng-repeat="act in course_activities">
            <div ng-if="act.container_type=='Course' ">
                <div ng-if="act.act_type=='HomeworkCommon'">
                    <div class="post-container">
                        <div class="post-wrapper">
                            <div class="post-main">
                                <div dataID = "{{act.act_id}}" ng-click="goDetail('homework',act.act_id, act.id)" id="act_{{act.id}}">
                                    <div class="post-avatar fl mr10"><img female="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>
                                    <div class="post-dynamic-author hidden fl">
                                        <span>{{act.author.real_name}}</span>
                                        <img ng-if="act.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
                                        <img ng-if="act.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
                                    </div>
                                    <div class="post-dynamic-time fr f13">{{act.latest_update}}</div>
                                    <div class="cl"></div>
                                    <div class="post-dynamic-title c-grey3 hidden mt12 fb">【作业】{{act.subject|safeHtml}}</div>
                                    <div class="post-content c-grey3 mt10 mb10">
                                        <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
                                        <span class="mr15 f12 c-grey2">迟交扣分：{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f12 c-grey2">匿评开启时间：{{act.homework_common_detail.evaluation_start}}</span><br />
                                        <span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15 f12 c-grey2">缺评扣分：{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f12 c-grey2">匿评关闭时间：{{act.homework_common_detail.evaluation_end}}</span>
                                    </div>
                                    <div class="cl"></div>
                                </div>
                                <!--<div class="post-dynamic-from hidden fl c-grey3">来源: <span class="c-blue">{{act.course_project_name}}</span></div>-->
                                <div class="fr f13">
                                    <div ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
                                    <div ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
                                    <div ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
                                </div>
                                <div class="fr mr25 f13">
                                    <a ng-if="!act.reply_count" ng-click="goDetail('homework',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
                                    <a ng-if="act.reply_count" ng-click="goDetail('homework',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
                                </div>
                                <div class="cl"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div ng-if="act.act_type=='News'">
                    <div class="post-container">
                        <div class="post-wrapper">
                            <div class="post-main">
                                <div dataID = "{{act.act_id}}" ng-click="goDetail('course_notice',act.act_id, act.id)" id="act_{{act.id}}">
                                    <div class="post-avatar fl mr10"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>
                                    <div class="post-dynamic-author hidden fl">
                                        <span>{{act.author.real_name}}</span>
                                        <img ng-if="act.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
                                        <img ng-if="act.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
                                    </div>
                                    <div class="post-dynamic-time fr f13">{{act.latest_update}}</div>
                                    <div class="cl"></div>
                                    <div class="post-dynamic-title c-grey3 hidden mt12 fb">【通知】{{act.subject|safeHtml}}</div>
                                    <div class="post-content c-grey3 mt10 mb10">
                                        <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
                                    </div>
                                    <div class="cl"></div>
                                </div>
                                <!--<div class="post-dynamic-from hidden fl c-grey3">来源: <span class="c-blue">{{act.course_project_name}}</span></div>-->
                                <div class="fr f13">
                                    <div ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
                                    <div ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
                                    <div ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
                                </div>
                                <div class="fr mr25 f13">
                                    <a ng-if="!act.reply_count" ng-click="goDetail('course_notice',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
                                    <a ng-if="act.reply_count" ng-click="goDetail('course_notice',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
                                </div>
                                <div class="cl"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div ng-if="act.act_type=='Message'">
                    <div class="post-container">
                        <div class="post-wrapper">
                            <div class="post-main">
                                <div dataID = "{{act.act_id}}" ng-click="goDetail('course_discussion',act.act_id, act.id)" id="act_{{act.id}}">
                                    <div class="post-avatar fl mr10"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>
                                    <div class="post-dynamic-author hidden fl">
                                        <span>{{act.author.real_name}}</span>
                                        <img ng-if="act.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
                                        <img ng-if="act.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
                                    </div>
                                    <div class="post-dynamic-time fr f13">{{act.latest_update}}</div>
                                    <div class="cl"></div>
                                    <div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div>
                                    <div class="post-content c-grey3 mt10 mb10">
                                        <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
                                    </div>
                                    <!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
                                    <div class="cl"></div>
                                </div>
                                <!--<div class="post-dynamic-from hidden fl c-grey3">来源: <span class="c-blue">{{act.course_project_name}}</span></div>-->
                                <div class="fr f13">
                                    <div ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
                                    <div ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
                                    <div ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>
                                </div>
                                <div class="fr mr25 f13">
                                    <a ng-if="!act.reply_count" ng-click="goDetail('course_discussion',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
                                    <a ng-if="act.reply_count" ng-click="goDetail('course_discussion',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>
                                </div>
                                <div class="cl"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div ng-if="act.act_type=='Poll'">
                    <div class="post-container">
                        <div class="post-wrapper">
                            <div class="post-main">
                                <div dataID = "{{act.act_id}}" id="act_{{act.id}}">
                                    <div class="post-avatar fl mr10"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>
                                    <div class="post-dynamic-author hidden fl">
                                        <span>{{act.author.real_name}}</span>
                                        <img ng-if="act.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
                                        <img ng-if="act.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
                                    </div>
                                    <div class="post-dynamic-time fr f13">{{act.latest_update}}</div>
                                    <div class="cl"></div>
                                    <div class="post-dynamic-title c-grey3 hidden mt12 fb">【问卷】{{act.subject|safeHtml}}</div>
                                    <div class="post-content c-grey3 mt10 mb10">
                                        <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
                                    </div>
                                    <!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
                                    <div class="cl"></div>
                                </div>
                                <!--<div class="post-dynamic-from hidden fl c-grey3">来源: <span class="c-blue">{{act.course_project_name}}</span></div>-->
                                <!--<div class="fr f13">-->
                                    <!--<div ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>-->
                                    <!--<div ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>-->
                                    <!--<div ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>-->
                                <!--</div>-->
                                <!--<div class="fr mr25 f13">-->
                                    <!--<a ng-if="!act.reply_count" ng-click="goDetail('course_discussion',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>-->
                                    <!--<a ng-if="act.reply_count" ng-click="goDetail('course_discussion',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>-->
                                <!--</div>-->
                                <div class="cl"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <!--<div ng-if="act.act_type=='JournalsForMessage'">-->
                    <!--<div class="post-container">-->
                        <!--<div class="post-wrapper">-->
                            <!--<div class="post-main">-->
                                <!--<div dataID = "{{act.act_id}}" ng-click="goDetail('journal_for_message',act.act_id, act.id)" id="act_{{act.id}}">-->
                <!--<div class="post-avatar fl mr10"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>-->
                                    <!--<div class="post-dynamic-author hidden fl">-->
                                        <!--<span>{{act.author.real_name}}</span>-->
                                        <!--<img ng-if="act.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />-->
                                        <!--<img ng-if="act.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />-->
                                    <!--</div>-->
                                    <!--<div class="post-dynamic-time fr f13">{{act.latest_update}}</div>-->
                                    <!--<div class="cl"></div>-->
                                    <!--<div class="post-dynamic-title c-grey3 hidden mt12 fb">【班级留言】{{act.subject|safeHtml}}</div>-->
                                    <!--<div class="post-content c-grey3 mt10 mb10">-->
                                        <!--<div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>-->
                                    <!--</div>-->
                                    <!--<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
                                    <!--<div class="cl"></div>-->
                                <!--</div>-->
                                <!--<!--<div class="post-dynamic-from hidden fl c-grey3">来源: <span class="c-blue">{{act.course_project_name}}</span></div>-->
                                <!--<div class="fr f13">-->
                                    <!--<div ng-if="!act.praise_count" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>-->
                                    <!--<div ng-if="act.praise_count && !act.has_praise" ng-click="addPraise(act);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>-->
                                    <!--<div ng-if="act.has_praise" ng-click="decreasePraise(act);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{act.praise_count}}</span></div>-->
                                <!--</div>-->
                                <!--<div class="fr mr25 f13">-->
                                    <!--<a ng-if="!act.reply_count" ng-click="goDetail('journal_for_message',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>-->
                                    <!--<a ng-if="act.reply_count" ng-click="goDetail('journal_for_message',act.act_id, act.id)"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{act.reply_count}}</span></a>-->
                                <!--</div>-->
                                <!--<div class="cl"></div>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->

                <div ng-if="act.act_type=='Course'">
                    <div class="post-container">
                        <div class="post-wrapper">
                            <div class="post-main">
                                <div class="post-avatar fl mr10"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="30" height="30" class="border-radius img-circle" /></div>
                                <div class="post-title hidden mb5"><span class="c-grey3 f13 fb mr10">{{act.author.real_name}}</span>创建了<span class="c-grey3 f13 fb ml10">{{act.course_project_name}} | 班级</span></div>
                                <div class="post-title hidden"><span class="mr10">{{act.latest_update}}</span></div>
                                <div class="cl"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div ng-if="course_has_more" class="mb50">
            <div id="more_course_activities" class="more-events mt10" ng-click="getClassActivities(course_activities_page+1);">更多</div>
        </div>
        <div ng-show="course.is_member" class="bottom-tab-wrap mt10">
            <a ng-show="isTeacher" ng-click="goPublishNotice()" class="weixin-tab link-blue2 border-top">发布通知</a>
            <a ng-click="goPublishIssue()" class="weixin-tab link-blue2 border-top">发起讨论</a>
        </div>
    </div>

    <div ng-class="['class-search-wrap',{'undis': current_tab != 1}]">
        <div class="class-search-inner"> <img src="/images/wechat/search.png" width="18" class="class-search-icon" />
            <input class="class-detail-search" ng-model="searchText" placeholder="输入关键词进行搜索" />
        </div>
    </div>

    <div ng-class="{'undis': !showResources}">
        <div ng-repeat="r in resources|filter:searchText" ng-class="['class-detail-row', 'f13', 'c-grey3', {'border-top': $first}]"><img src="/images/wechat/courseware.png" width="15" class="ml10 fl" /><a ng-href="{{g_localhost}}/attachments/download/{{r.id}}/{{r.filename}}?type=wechat" target="_blank" class="fl ml10 resource-width">{{r.filename}}</a><a ng-show="isTeacher" herf="javascript:void(0);" class="fr mr10 link-blue2" ng-click="sendFile(r,1)">发送</a><div class="cl"></div></div>
        <p ng-show="resources_tag == true && resources.length<=0" class="class-test-tip">暂无课件，<br />
            请登录Trustie网站，在PC浏览器中上传课件。</p>
    </div>
    <div class="mb50" ng-class="{'undis': !showClassMate}">
        <div class="member-banner f13 c-grey3">授课老师</div>

        <div class="class-member-row f13 c-grey3" ng-repeat="teacher in teachers|filter:searchText">
            <img ng-src="{{teacher.img_url}}" width="30" height="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{teacher.name}}</span><img ng-src="/images/wechat/{{teacher.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
            <img src="/images/wechat/setting.png" ng-show = "isTeacher && teacher.id != course.tea_id" width="15" class="fr mr10" style="margin-top:7px;" ng-click="onSetting(teacher)" />
            <span class = "fr mr25 mt5" ng-show ="teacher.id == course.tea_id">管理员</span>
            <span ng-class="['fr','mt5',{'mr10': course.is_creator,'mr25': !course.is_creator}]" ng-show ="teacher.id != course.tea_id && teacher.roles_id == 7">助教</span>
            <div class="cl"></div>
        </div>

        <div ng-show ="course.is_creator" class="class-member-row f13 c-grey3" ng-repeat="reviewer in reviewers|filter:searchText">
            <img ng-src="{{reviewer.img_url}}" width="30" height="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{reviewer.name}}</span><img ng-src="/images/wechat/{{reviewer.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
            <span ng-click="review(reviewer)" class = "fr mr10 mt5 c-red">待审批 ▶</span>
            <div class="cl"></div>
        </div>


        <div class="member-banner f13 mt10 c-grey3">我的同学</div>
        <div class="class-member-row f13 c-grey3" ng-repeat="student in students|filter:searchText">
            <img ng-src="{{student.img_url}}" width="30" height="30" class="fl ml10 img-circle" /><span class="fl ml10 mt5">{{student.name}}</span><img ng-src="/images/wechat/{{student.gender==0 ? 'male' : 'female'}}.png" width="15" class="fl ml10 mt5" />
            <img src="/images/wechat/setting.png" ng-show = "isTeacher" width="15" class="class-list-setting" ng-click="onSetting(student)" />
            <img src="/images/wechat/setting.png" ng-show = "!isTeacher && student.is_me==1" width="15" class="class-list-setting" ng-click="onSetting_1(student)" />
            <div class="cl"></div>
        </div>

        <div ng-show="course.is_member" class="bottom-tab-wrap mt10" ng-class="{'undis': !showClassMate}">
            <a ng-show="!course.is_creator" ng-click="quit()" class="weixin-tab link-blue2 border-top">退出班级</a>
            <a ng-show="isTeacher" ng-click="goEditGroup()" class="weixin-tab link-blue2 border-top">分班管理</a>
        </div>

    </div>

    <div ng-class="{'undis': !showHomework}">
        <div ng-repeat="r in homeworks|filter:searchText" ng-class="['class-detail-row', 'f13', 'c-grey3', {'border-top': $first}]"><img src="/images/wechat/homework.png" width="15" class="ml10 fl" /><span ng-click="goHomeworkDetail(r.id)" class="fl ml10 resource-width">{{r.homework_name}}</span><a ng-show="isTeacher" herf="javascript:void(0);" class="fr mr10 link-blue2 " ng-click="sendFile(r,2)">发送</a><div class="cl"></div></div>
        <p ng-show="homeworks_tag == true && homeworks.length<=0" class="class-test-tip">暂无作业，<br />
            请登录Trustie网站，在PC浏览器中上传作业。</p>

    </div>

    <div ng-class="{'undis': !showTestcase}">
        <div ng-repeat="r in exercises|filter:searchText" ng-class="['class-detail-row', 'f13', 'c-grey3', {'border-top': $first}]"><img src="/images/wechat/test.png" width="15" class="ml10 fl" /><span class="fl ml10 resource-width">{{r.exercise_name}}</span><a ng-show="isTeacher" herf="javascript:void(0);" class="fr mr10 link-blue2 undis" ng-click="sendFile(r,3)">发送</a><div class="cl"></div></div>
        <p ng-show="exercises_tag == true && exercises.length<=0" class="class-test-tip">暂无测验，<br />
            请登录Trustie网站，在PC浏览器中上传测验。</p>
    </div>

    <my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>
    <my-alert2 message="alertService_2.message" title="alertService_2.title" visible="alertService_2.visible" cb="alertService_2.cb"></my-alert2>
</div>
