tpi中未发布状态下不显示关卡状态

This commit is contained in:
huang 2017-09-01 10:13:55 +08:00
parent 717c9cc7b8
commit bcb3005bfa
1 changed files with 14 additions and 12 deletions

View File

@ -8,18 +8,20 @@
<div class="panel-list">
<div class=" clearfix -task-list-inner" id="game_status_<%= challenge.id %>">
<span class="icon-success fl mr5"><%= challenge.try(:position) %></span>
<% if game.try(:status) == 0 %>
<h4 class=" -task-list-title fl"><%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
<a class="fr " data-tip-down="待完成"><i class="fa fa-play-circle color-light-green fr font-18 mt5 -text-danger w20_center" ></i></a>
<% elsif game.try(:status) == 1 %>
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
<span class="fr color-light-green">正在解决</span>
<% elsif game.try(:status) == 2 %>
<h4 class="-task-list-title fl"> <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
<a class="fr" data-tip-down="已解决"><i class="fa fa-check-circle fr font-18 mt5 color-light-green w20_center" ></i></a>
<% elsif game.try(:status) == 3 %>
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
<a class="fr" data-tip-down="未解锁"><i class="fa fa-play-circle fr font-18 mt5 color-grey w20_center" ></i></a>
<% if @myshixun.shixun.try(:status) == 2 %>
<% if game.try(:status) == 0 %>
<h4 class=" -task-list-title fl"><%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
<a class="fr " data-tip-down="待完成"><i class="fa fa-play-circle color-light-green fr font-18 mt5 -text-danger w20_center" ></i></a>
<% elsif game.try(:status) == 1 %>
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
<span class="fr color-light-green">正在解决</span>
<% elsif game.try(:status) == 2 %>
<h4 class="-task-list-title fl"> <%= link_to challenge.try(:subject), myshixun_game_path(game, :myshixun_id => @myshixun), :remote => true %></h4>
<a class="fr" data-tip-down="已解决"><i class="fa fa-check-circle fr font-18 mt5 color-light-green w20_center" ></i></a>
<% elsif game.try(:status) == 3 %>
<h4 class="-task-list-title fl"> <%= challenge.try(:subject) %></h4>
<a class="fr" data-tip-down="未解锁"><i class="fa fa-play-circle fr font-18 mt5 color-grey w20_center" ></i></a>
<% end %>
<% end %>
<div class="cl"></div>
<div style="display: flex;" class="with80 ml30">