From 80e3e44f1364e09b3212cb02f633c4f33440ecb4 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 17 Nov 2014 15:01:48 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E9=80=80=E5=87=BA=E7=A7=81=E6=9C=89=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/watchers_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 298331c69..6d916f43e 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -97,7 +97,7 @@ module WatchersHelper return '' unless user && user.logged? # modify by nwb # 主讲教师不允许退出课程 - return '' if user.id == course.tea_id || course.is_public == 0 + return '' if user.id == course.tea_id joined = user.member_of_course?(course) text = joined ? l(:label_exit_course) : l(:label_new_join) url_t = join_path(:object_id => course.id) From 4b5ad833b01da73009cf5e62412fcca6ee02a44d Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 18 Nov 2014 10:26:33 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=90=84=E6=8C=89=E9=92=AE=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_course_file.html.erb | 30 +++++++++++++++++++++++++++ app/views/files/_course_new.html.erb | 22 -------------------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index c48900426..46a954746 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -13,7 +13,37 @@ <%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %> <%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %>

+ +
diff --git a/app/views/files/_course_new.html.erb b/app/views/files/_course_new.html.erb index f864f8629..2eaa70cb6 100644 --- a/app/views/files/_course_new.html.erb +++ b/app/views/files/_course_new.html.erb @@ -20,28 +20,6 @@ <% end %>
- -
- <%=l(:label_attachment_new)%> - <% attachmenttypes = course.attachmenttypes %> - <%= error_messages_for 'attachment' %> - <%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form", :class => "tabular") do %> - -

- <% if attachmenttypes.any? %> - <%= l(:attachment_type) %> - <%= select_tag "attachment_type", - options_from_collection_for_select(attachmenttypes, "id", - "typeName", 2), {style: 'width:100px'} %> - <% end %> -

- -

<%=l(:label_attachment_plural)%><%= render :partial => 'attachments/form' %>

- - <%= submit_tag l(:button_add) %> - <% end %> -
- \ No newline at end of file diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index d0d71c50d..b0d427018 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -12,7 +12,8 @@ h4 {border-bottom: 1px dotted #bbb;} .course_ad{ position:absolute; visibility:visible; - background:#ffffff + background:#ffffff; + width:14%; } .ad_title{ From 90f5cd2e609c23443573d7e2e77f6623a3d07101 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 18 Nov 2014 10:39:50 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=A9=E6=94=BEhtml?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=97=B6=E6=82=AC=E6=B5=AE=E6=A1=86=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_course_ad.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/courses/_course_ad.html.erb b/app/views/courses/_course_ad.html.erb index 8318bb5d1..f8b4781f8 100644 --- a/app/views/courses/_course_ad.html.erb +++ b/app/views/courses/_course_ad.html.erb @@ -49,6 +49,7 @@ } $("#floatpoint").css("top",YY); } - //$("#floatpoint").css("left",screen_width/2+body_width/2+5); - $(document).ready(function(){var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10);}); + function change_size(){var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10);} + $(document).ready(function(){change_size();}); + $(window).resize(function(){screen_width = $(window).width();change_size();}); \ No newline at end of file From e359b987e5f98561fa92eaf559f5d8d56c6f8860 Mon Sep 17 00:00:00 2001 From: moon Date: Tue, 18 Nov 2014 10:56:56 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E2=80=9C=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E4=BD=9C=E4=B8=9A=E2=80=9D=E6=9D=83=E9=99=90=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/homework.html.erb | 9 +++++---- config/locales/zh.yml | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/courses/homework.html.erb b/app/views/courses/homework.html.erb index 95e26abd0..68ec0dc2e 100644 --- a/app/views/courses/homework.html.erb +++ b/app/views/courses/homework.html.erb @@ -5,11 +5,12 @@ <%= javascript_include_tag 'attachments' %> -
- <% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where(id: [3, 4, 7, 9] )).size >0))%> - <%= link_to(l(:label_course_homework_new), {:controller => 'courses', :action => 'new_homework'}, :class => 'icon icon-add') %> - <% end %> + <% if User.current.logged? && (User.current.admin? || (!Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, @course.id).first.roles&Role.where(id: [3, 4, 7, 9] )).size >0))%> + <%= link_to(l(:label_course_homework_new), {:controller => 'courses', :action => 'new_homework'}, :class => 'icon icon-add') %> + <% else %> + <%= l(:label_coursejoin_tip) %> + <% end %>
<%= render :partial => 'bids/bid_homework_show', :locals => {:bids => @bids, :bid_pages => @bid_pages} %> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 0220a10e5..a3807dca3 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2134,6 +2134,7 @@ zh: label_notification: 通知公告 label_course_ad_description: 课程模块正在优化中,使用过程中如有问题请您与我们联系,感谢大家的支持! label_course_adcolick: 请点击: + label_coursejoin_tip: 提示:加入课程才有权限查看或提交作业,“加入”按钮见课程图标右侧! #end #end