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; }