<% if User.current.manager_of_subject?(@subject) %>
@@ -16,7 +16,7 @@
<% count = 0 %>
<% @stages.each_with_index do |stage, s_index| %>
-
+
第<%= s_index + 1 %>章 <%= stage.name %>
@@ -31,7 +31,7 @@
<%= stage.description %>
<% stage.stage_shixuns.each_with_index do |stage_shixun, index| %>
<% shixun = stage_shixun.shixun %>
-
1 ? "" : "onclick='shixun_link('#{shixun.identifier}')'" %>>
+
<%= s_index + 1 %>-<%= index + 1 %> <%= shixun.name %>
@@ -55,12 +55,14 @@
<% end %>
<% if allow_shixun_exec(shixun) %>
<% if shixun.status > 1 %>
+
<% myshixun = Myshixun.where(:user_id => User.current.id, :shixun_id => shixun.id).first %>
<% if myshixun.blank? %>
<%= link_to "开始实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-orange ", :style=>"display: none", :id => "shixun_operation", :remote => true %>
<% else %>
<%= link_to "继续实战", operation_shixun_path(shixun, :myshixun_id => myshixun.try(:id)), :class => "task-btn task-btn-orange", :style=>"display: none", :id => "shixun_operation", :remote => true %>
<% end %>
+
<% end %>
<% end %>
diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js
index 4f439fdef..e4de78649 100644
--- a/public/javascripts/edu/application.js
+++ b/public/javascripts/edu/application.js
@@ -1121,9 +1121,7 @@ function checkLesson(item){
}
}
}
-function shixun_link(shixun) {
- window.open('/shixuns/' + shixun);
-}
+
function subject_link(id){
window.open('/subjects/' + id);
}