From 8a32c46ffe2aa54c0eeacda9e8d8f29f51fe7cd8 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 3 May 2017 14:02:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=ADtmp=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E8=BA=AB=E4=BB=BD=E5=88=97=E8=A1=A8=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=B7=B3=E8=BD=AC=E4=B8=8D=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/challenges/_content_list.html.erb | 9 +++++++-- public/editormd/css/editormd.css | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/views/challenges/_content_list.html.erb b/app/views/challenges/_content_list.html.erb index 660155249..69f384a48 100644 --- a/app/views/challenges/_content_list.html.erb +++ b/app/views/challenges/_content_list.html.erb @@ -13,10 +13,15 @@

第<%= challenge.position %>关 <%#= link_to challenge.subject, shixun_challenge_path(@shixun.id, challenge), :target => "_blank" %> - <% if allow_to_view_challenge(challenge, @shixun) %> + <% if User.current.id == challenge.user_id || User.current.admin? %> <%= link_to challenge.subject, shixun_challenge_path(@shixun, challenge), :target => "_blank" %> <% else %> - <%= challenge.subject %> + <% if allow_to_view_challenge(challenge, @shixun) %> + <% game = Game.find_by_challenge_id(challenge.id) %> + <%= link_to challenge.subject, myshixun_game_path(game, :myshixun_id => game.myshixun), :target => "_blank" %> + <% else %> + <%= challenge.subject %> + <% end %> <% end %>

<% if User.current.manager_of_shixun?(@shixun) %> diff --git a/public/editormd/css/editormd.css b/public/editormd/css/editormd.css index 73cbfbe07..ab71a13d2 100644 --- a/public/editormd/css/editormd.css +++ b/public/editormd/css/editormd.css @@ -4048,7 +4048,7 @@ li.L9 { .editormd-preview-container pre.prettyprint, .editormd-html-preview pre.prettyprint { padding: 10px; - border: 1px solid #ddd; + border: 0px solid #ddd; white-space: pre-wrap; word-wrap: break-word; }