From 08966104641256c8073fd08c6d5bd83f38ff8c5a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 3 Nov 2014 11:53:16 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E5=88=9B=E5=BB=BA=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E6=97=B6=E5=88=9B=E5=BB=BA=E9=A1=B9=E7=9B=AE=E7=9A=84?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=202.=E5=A2=9E=E5=8A=A0=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E5=9C=A8=E8=80=81=E5=B8=88=E5=B8=83=E7=BD=AE=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=92=8C=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84=E8=BF=99=E6=AE=B5?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=86=85=E6=89=8D=E8=83=BD=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_attach/_homeworks_list.html.erb | 13 ++++++++++--- app/views/homework_attach/new.html.erb | 8 +++++--- 2 files changed, 15 insertions(+), 6 deletions(-) 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) %> + 取  消