diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb index ef2b9a001..514820fdd 100644 --- a/app/views/homework_attach/_homeworks_list.html.erb +++ b/app/views/homework_attach/_homeworks_list.html.erb @@ -32,9 +32,16 @@
  • 您还没交作业,请创建作业!
  • -
  • - <%= link_to "创建作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %> -
  • + <% if @bid.comment_status == 0 %> + +
  • + <%= link_to "创建作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %> +
  • + <% else %> +
  • + 创建作业 +
  • + <% end %>
    <% end %> diff --git a/app/views/homework_attach/new.html.erb b/app/views/homework_attach/new.html.erb index a54030902..fcf4099ab 100644 --- a/app/views/homework_attach/new.html.erb +++ b/app/views/homework_attach/new.html.erb @@ -22,9 +22,10 @@ 创建作品
  • - - 创建项目 - + <%= 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) %>
  • @@ -84,6 +85,7 @@ <%= l(:label_button_ok) %> + 取  消