From ce33efba30d7680e677c2cd2fe71424f5d345e04 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Mon, 9 Oct 2017 17:23:17 +0800 Subject: [PATCH] =?UTF-8?q?TPI=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/games/_game_show.html.erb | 4 +- .../games/_shixun_comment_block.html.erb | 2 +- app/views/games/_shixun_comment_list.html.erb | 51 ++++++++++--------- app/views/praise_tread/_edu_praise.html.erb | 4 +- app/views/shixuns/_shixun_reply.html.erb | 2 +- .../shixuns/_shixun_reply_detail.html.erb | 36 ++++++------- app/views/users/_reply_to_comment.html.erb | 2 +- public/stylesheets/css/edu-common.css | 2 +- 8 files changed, 53 insertions(+), 50 deletions(-) diff --git a/app/views/games/_game_show.html.erb b/app/views/games/_game_show.html.erb index 5751bf232..c61c1dd2b 100644 --- a/app/views/games/_game_show.html.erb +++ b/app/views/games/_game_show.html.erb @@ -79,10 +79,10 @@
diff --git a/app/views/praise_tread/_edu_praise.html.erb b/app/views/praise_tread/_edu_praise.html.erb index 0704eebad..84a727c5c 100644 --- a/app/views/praise_tread/_edu_praise.html.erb +++ b/app/views/praise_tread/_edu_praise.html.erb @@ -6,7 +6,7 @@ 赞 <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> - <%= get_praise_num(activity) %> + <%= get_praise_num(activity)>0 ? get_praise_num(activity):"" %> <% else %> 赞 - <%= get_praise_num(activity) %> + <%= get_praise_num(activity)>0 ? get_praise_num(activity):"" %> <%# num = activity.praise_tread_cache ? activity.praise_tread_cache.praise_num : 0 %> diff --git a/app/views/shixuns/_shixun_reply.html.erb b/app/views/shixuns/_shixun_reply.html.erb index 40d9244ba..f1a8d28b3 100644 --- a/app/views/shixuns/_shixun_reply.html.erb +++ b/app/views/shixuns/_shixun_reply.html.erb @@ -1,4 +1,4 @@ -
+ <% if comment.creator_user == User.current || User.current.admin? || User.current.manager_of_shixun?(comment.dis_id) %> + 删除 + <% end %> + | + <%= link_to( + '回复'.html_safe, + {:controller => 'users' ,:action => 'reply_to',:reply_id => comment.id, :type => @game_challenge.class.to_s, :user_activity_id => @game_challenge.id}, + :remote => true, + :method => 'get', + :title => l(:button_reply),:class => "color-grey") %> + | + + <%=render :partial=> "praise_tread/edu_praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%> + +
+