实训tmp根据不同身份列表点击跳转不同

This commit is contained in:
daiao 2017-05-03 14:02:31 +08:00
parent c5c0f3eb7c
commit 8a32c46ffe
2 changed files with 8 additions and 3 deletions

View File

@ -13,10 +13,15 @@
<div class=" clearfix panel-inner" id="shixun_index_<%= index %>">
<h4 class="fl panel-inner-title "><i class="fa fa-dot-circle-o font-18 color-green mr5"></i><span class="color-red mr10">第<%= challenge.position %>关</span>
<%#= 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 %>
<a href="javascript:void(0);" onclick="shixun_authority_top();"><%= challenge.subject %></a>
<% 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 %>
<a href="javascript:void(0);" onclick="shixun_authority_top();"><%= challenge.subject %></a>
<% end %>
<% end %>
</h4>
<% if User.current.manager_of_shixun?(@shixun) %>

View File

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