班级留言不显示
This commit is contained in:
parent
f35c3e8528
commit
4932b9fad8
|
@ -29,7 +29,7 @@ module Mobile
|
|||
if container_type == "All" || container_type == "Course"
|
||||
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
|
||||
user_course_ids = (user.courses.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
end
|
||||
|
||||
page = params[:page] ? params[:page] : 0
|
||||
|
|
|
@ -297,7 +297,7 @@ module Mobile
|
|||
|
||||
user = current_user
|
||||
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
activities = UserActivity.where("(container_type = 'Course' and container_id = #{params[:id]} and act_type in #{course_types})").order('updated_at desc')
|
||||
|
||||
page = params[:page] ? params[:page] : 0
|
||||
|
|
|
@ -8,7 +8,7 @@ button:
|
|||
sub_button:
|
||||
-
|
||||
type: "view"
|
||||
name: "我的课程"
|
||||
name: "我的班级"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
|
||||
-
|
||||
type: "view"
|
||||
|
|
|
@ -8,7 +8,7 @@ button:
|
|||
sub_button:
|
||||
-
|
||||
type: "view"
|
||||
name: "我的课程"
|
||||
name: "我的班级"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
|
||||
-
|
||||
type: "view"
|
||||
|
|
|
@ -8,7 +8,7 @@ button:
|
|||
sub_button:
|
||||
-
|
||||
type: "view"
|
||||
name: "我的课程"
|
||||
name: "我的班级"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.forge.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=class_list#wechat_redirect"
|
||||
-
|
||||
type: "view"
|
||||
|
|
|
@ -163,41 +163,41 @@
|
|||
</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=='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'">
|
||||
|
|
|
@ -164,41 +164,41 @@
|
|||
</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=='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">
|
||||
|
|
Loading…
Reference in New Issue