1.增加创建作业时创建项目的连接

2.增加只有在老师布置作业和开启匿评这段时间内才能创建作业
This commit is contained in:
sw 2014-11-03 11:53:16 +08:00
parent fbc66484a0
commit 0896610464
2 changed files with 15 additions and 6 deletions

View File

@ -32,9 +32,16 @@
</span>
</li>
<li class="c_red" style="margin:25px 0 0 20px;"> 您还没交作业,请创建作业!</li>
<li class="wping">
<%= link_to "创建作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
</li>
<% if @bid.comment_status == 0 %>
<!-- 老师布置的作业在创建和开启匿评这段时间才允许创建作品 -->
<li class="wping">
<%= link_to "创建作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
</li>
<% else %>
<li class="wping">
<a style="width:80px; margin:20px 0 0 350px;">创建作业</a>
</li>
<% end %>
</ul>
<div class="cl"></div>
<% end %>

View File

@ -22,9 +22,10 @@
创建作品
</li>
<li class="N_top" style="width: 835px;">
<a href="#" target="_blank" >
创建项目
</a>
<%= link_to(l(:label_project_new), {:controller => 'projects',
:action => 'new',
:course => 0,
:project_type => 0}) if User.current.allowed_to?(:add_project, nil, :global => true) %>
</li>
</ul>
@ -84,6 +85,7 @@
<a href="#" class="tijiao" onclick="submit_homework_form();">
<%= l(:label_button_ok) %>
</a>
<a href="javascript:history.back()" class="tijiao">取&nbsp;&nbsp;消</a>
<!--<a href="#" target="_blank" class="tijiao">-->
<!--重&nbsp;&nbsp;置-->