tpi先建任务权限判断
This commit is contained in:
parent
32f14e957d
commit
d21350b754
|
@ -43,8 +43,8 @@
|
|||
<% end %>
|
||||
<!--实训任务-->
|
||||
<% unless @project.enabled_modules.where("name = 'training_tasks'").empty? %>
|
||||
<li id="project_menu_11">
|
||||
<%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project, :remote => true), :class => "pro_new_proname", :title => "#{training_tasks_count}" %>
|
||||
<li id="project_menu_011">
|
||||
<%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project), :class => "pro_new_proname", :title => "#{training_tasks_count}" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<!--讨论区-->
|
||||
|
|
|
@ -204,12 +204,12 @@
|
|||
|
||||
<!--实训任务列表开始-->
|
||||
<div class="myissues_con mb10">
|
||||
<% if is_project_manager?(User.current, @project) || User.current.admin? %>
|
||||
<% if !@project.is_child_training_project? || User.current.admin? %>
|
||||
<a href="<%= new_project_training_task_path(@project) %>" class="btn btn-green fr mb10">新建</a>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="pro_new_prompt mb10">
|
||||
<p>完成任务后提交代码,若通过系统测试,将为你发送下一个任务,祝你早日通关,加油!</p>
|
||||
<p>完成任务后,请点击“提交评测”按钮,若通过系统测试,将为你发送下一个任务,祝你早日通关,加油!</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @training_tasks.empty? %>
|
||||
|
@ -245,7 +245,6 @@
|
|||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<!--实训任务结束-->
|
||||
|
||||
|
|
Loading…
Reference in New Issue