From df47c09fa4bebbfb05f865b1f78ae876886ce511 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 28 Oct 2016 16:53:02 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 3 +++ app/views/repositories/show.html.erb | 2 +- public/stylesheets/repository.css | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 1548e90b7..75f562b8b 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -428,6 +428,9 @@ update end def changes + # 顶部导航 + @project_menu_type = 5 + @entry = @repository.entry(@path, @rev) (show_error_not_found; return) unless @entry g = Gitlab.client diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index f7f0f8f81..716139a5f 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -54,7 +54,7 @@ <% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %> <%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %> -
提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:
+
提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:
<%= @changesets_latest_coimmit.message %>
<% else %> diff --git a/public/stylesheets/repository.css b/public/stylesheets/repository.css index c16f251a4..1e66ae8c7 100644 --- a/public/stylesheets/repository.css +++ b/public/stylesheets/repository.css @@ -246,7 +246,7 @@ li.commit .commit-row-title { margin-bottom: 2px; } li.commit .commit-row-title .str-truncated { - max-width: 70%; + max-width: 82%; } .str-truncated { display: inline-block; From cfea5e9da497d45a2c4ebfbd7ab198c972434d0c Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 28 Oct 2016 17:10:13 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E5=88=86=E7=BB=84=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_work/_student_work_list.html.erb | 21 +++++++++++++++++-- public/stylesheets/css/courses.css | 5 +++++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb index ad7feb027..66911d15f 100644 --- a/app/views/student_work/_student_work_list.html.erb +++ b/app/views/student_work/_student_work_list.html.erb @@ -1,4 +1,4 @@ -
+
作品 @@ -31,7 +31,20 @@ <%= link_to "代码查重", work_canrepeat_student_work_index_path(homework:@homework.id, course_id:@course.id), class: 'BlueCirBtn fl',:remote => true %> <% end %> <% end%> - + <%# if @homework.homework_type == 3 && my_work && my_work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") %> + + + + <%# end %> + <% if @is_teacher && @homework.homework_type == 3 %> +
+ + +

大作品评分即组长的评分
+ 请先完成大作品评分,系统将把大作品
评分做为每个组员的初始分值,您需
要在此基础上对组员评分进行手动调整 +

+
+ <% end %>
@@ -96,4 +109,8 @@ <% end %> }); + function add_or_delete_group_member() { + var html_value = "<%#= escape_javascript(render :partial => 'student_work/add_or_delete_member',:locals => {:homework=>@homework,:edit_mode => true}) %>"; + pop_up_box(html_value, 528); + } \ No newline at end of file diff --git a/public/stylesheets/css/courses.css b/public/stylesheets/css/courses.css index f418f46e3..30794a18c 100644 --- a/public/stylesheets/css/courses.css +++ b/public/stylesheets/css/courses.css @@ -581,3 +581,8 @@ a:hover.blueCir{ background:#3598db; color:#fff;} .ye_tips_box_inner{ position: absolute;line-height: 1.5;padding: 5px 10px; white-space: nowrap; background-color: #FFFEF4; left:30px; top: -5px; border: solid 1px #F3DDB3;} .ye_tips_box_inner span { display: block; border-width: 10px;position: absolute;top: 15px; left: -18px; border-style: dashed solid dashed dashed;border-color: transparent #FFFEF4 transparent transparent;font-size: 0;line-height: 0;} .ye_tips_box_inner em { display: block; border-width: 10px;position: absolute;top: 42px; left: -20px; border-style: dashed solid dashed dashed;border-color: transparent #F3DDB3 transparent transparent;font-size: 0;line-height: 0;} + +/*分组作业评分提示框*/ +.group_work_tip_box {width:200px; position:absolute; padding:5px 10px; white-space:nowrap; background-color:#fff; right:-255px; top:-10px; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);} +.group_work_tip_box em {display:block; border-width:10px; position:absolute;top:26px; left:-20px; border-style:dashed solid dashed dashed; border-color:transparent #eaeaea transparent transparent; font-size:0; line-height:0;} +.group_work_tip_box span {display:block; border-width:10px; position:absolute;top:26px; left:-18px; border-style:dashed solid dashed dashed; border-color:transparent #fff transparent transparent; font-size:0; line-height:0;} From e018e301ef40b6577a73ac9f79e757298881dd19 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 28 Oct 2016 17:47:21 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=85=B3=E6=B3=A8BUG?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/watchers_controller.rb | 27 ++++++++++++++++----- app/views/projects/_applied_status.html.erb | 2 +- app/views/watchers/unwatch.js.erb | 7 ++++++ app/views/watchers/watch.js.erb | 8 +++++- 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 app/views/watchers/unwatch.js.erb diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb index 6e7f0adc6..304ba10a2 100644 --- a/app/controllers/watchers_controller.rb +++ b/app/controllers/watchers_controller.rb @@ -39,9 +39,17 @@ class WatchersController < ApplicationController else end - respond_to do |format| - format.html { redirect_to_referer_or {render :text => (true ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} - format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'add',:list => @list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} } + + if params[:object_type] == 'project' + @project = Project.find(params[:object_id]) + respond_to do |format| + format.js + end + else + respond_to do |format| + format.html { redirect_to_referer_or {render :text => (true ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} + format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'add',:list => @list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} } + end end rescue Exception => e if e.message == "404" @@ -71,9 +79,16 @@ class WatchersController < ApplicationController @action = 'fans' else end - respond_to do |format| - format.html { redirect_to_referer_or {render :text => (false ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} - format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete',:list=>@list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} } + if params[:object_type] == 'project' + @project = Project.find(params[:object_id]) + respond_to do |format| + format.js + end + else + respond_to do |format| + format.html { redirect_to_referer_or {render :text => (false ? 'Watcher added.' : 'Watcher removed.'), :layout => true}} + format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete',:list=>@list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} } + end end rescue Exception => e if e.message == "404" diff --git a/app/views/projects/_applied_status.html.erb b/app/views/projects/_applied_status.html.erb index 414449eb8..e5a8eae05 100644 --- a/app/views/projects/_applied_status.html.erb +++ b/app/views/projects/_applied_status.html.erb @@ -3,7 +3,7 @@
  • <%= watcher_link_for_project(@project, User.current) %> - <%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'pro_new_topbtn fl' %> + <%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id},:id=>"fans_num", :class => 'pro_new_topbtn fl' %>
  • diff --git a/app/views/watchers/unwatch.js.erb b/app/views/watchers/unwatch.js.erb new file mode 100644 index 000000000..6101cee19 --- /dev/null +++ b/app/views/watchers/unwatch.js.erb @@ -0,0 +1,7 @@ +<% if @project %> + $('#fans_num').html('<%= @project.watcher_users.count %>'); +// $('#project-'+'<%=@project.id%>'+'-watcher').html('添加关注'); + $('#project-'+'<%=@project.id%>'+'-watcher').replaceWith("<%= escape_javascript watcher_link_for_project(@project, User.current)%>"); +<% else %> + $('#fans_num').html('<%= j(@user.watcher_users.count) %>'); +<% end %> diff --git a/app/views/watchers/watch.js.erb b/app/views/watchers/watch.js.erb index 104583fef..e39165008 100644 --- a/app/views/watchers/watch.js.erb +++ b/app/views/watchers/watch.js.erb @@ -1 +1,7 @@ -$('#fans_num').html('<%= j(@user.watcher_users.count) %>') +<% if @project %> + $('#fans_num').html('<%= @project.watcher_users.count %>'); +// $('#project-'+'<%=@project.id%>'+'-watcher').html('取消关注'); + $('#project-'+'<%=@project.id%>'+'-watcher').replaceWith("<%= escape_javascript watcher_link_for_project(@project, User.current)%>"); +<% else %> + $('#fans_num').html('<%= j(@user.watcher_users.count) %>'); +<% end %> From 21655565ea8b7e70de8ae6a183d00f2bd73c3819 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 28 Oct 2016 17:49:09 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=88=86=E7=8F=AD?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=88=A0=E9=99=A4=E6=97=B6=EF=BC=8C=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E6=98=AF=E5=90=A6=E6=9C=89=E6=88=90=E5=91=98=EF=BC=8C?= =?UTF-8?q?=E5=81=9A=E4=B8=8D=E5=90=8C=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 11 ++++++++++- app/views/courses/_delete_member_group.html.erb | 14 ++++++++++++++ app/views/courses/_new_groups_name.html.erb | 17 ++++++++++++----- app/views/courses/deletegroup.js.erb | 1 + 4 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 app/views/courses/_delete_member_group.html.erb diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index b597696ab..6616c74ab 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -227,7 +227,15 @@ class CoursesController < ApplicationController end def deletegroup - CourseGroup.delete(params[:group_id]) + group = CourseGroup.find params[:group_id] + if group + if group.members.count == 0 + CourseGroup.delete(params[:group_id]) + else + group.members.update_all(:course_group_id => 0) + CourseGroup.delete(params[:group_id]) + end + end @subPage_title = l :label_student_list @canShowCode = isCourseTeacher(User.current.id,@course) && params[:role] != '1' @is_remote = true @@ -395,6 +403,7 @@ class CoursesController < ApplicationController page_from = params[:page].nil? ? 0 : (params[:page].to_i - 1) @results = student_homework_score(0,page_from, 10,"desc") end + @no_group_count = @course.student.count - @course.members.where("course_group_id != 0").count @course_groups = @course.course_groups @limit = 50 @page = params[:page].nil? ? 1 : params['page'].to_i diff --git a/app/views/courses/_delete_member_group.html.erb b/app/views/courses/_delete_member_group.html.erb new file mode 100644 index 000000000..03f4dda56 --- /dev/null +++ b/app/views/courses/_delete_member_group.html.erb @@ -0,0 +1,14 @@ +
    +
    + <% if count == 0 %> + 确定删除分班吗? + <% else %> + 已有学生加入本分班,删除之后,这些学生将处于未分班状态 + 您是否确定删除该分班 + <% end %> +
    +
    +
    + <%=link_to '确定', deletegroup_course_path(:group_id => group_id), :method => 'delete', :remote => true, :class => 'Blue-btn fl', :method => 'delete'%> + 取消 +
    \ No newline at end of file diff --git a/app/views/courses/_new_groups_name.html.erb b/app/views/courses/_new_groups_name.html.erb index 24be067ba..2b1e03ab3 100644 --- a/app/views/courses/_new_groups_name.html.erb +++ b/app/views/courses/_new_groups_name.html.erb @@ -10,20 +10,27 @@ <% unless course_groups.nil? %> <% course_groups.each do |group| %> + <%# group_name = " #{ group.name}( #{group.members.count.to_s}人)".html_safe %>
  • <%= link_to group.name, searchgroupmembers_course_path(@course,:group_id => group.id), class: 'fl mr5', method: 'get', remote: true,:onclick => "checkclass('group_name_#{group.id}')"%> (<%=group.members.count.to_s %>人) <% if @canShowCode%> - <% if group.members.empty?%> - <%= link_to '', deletegroup_course_path(:group_id => group.id), :method => 'delete', :remote => true, + <%# if group.members.empty?%> + <%#= link_to '', deletegroup_course_path(:group_id => group.id), :method => 'delete', :remote => true, :data => {confirm: l(:label_delete_group)}, :class => 'sy_icons_del fl' %> - <% else%> - - <% end%> + + <%# else%> + + <%#end%> <% end %>
  • <% end %> diff --git a/app/views/courses/deletegroup.js.erb b/app/views/courses/deletegroup.js.erb index f0c0f4be3..39a096c8e 100644 --- a/app/views/courses/deletegroup.js.erb +++ b/app/views/courses/deletegroup.js.erb @@ -1,2 +1,3 @@ +hideModal(); $("#st_groups").html("<%= escape_javascript( render :partial => 'new_groups_name', locals: {:course_groups => @course_groups})%>"); $("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>"); \ No newline at end of file From 2a1549457b5906e7966520b7333520c0bc204c38 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 28 Oct 2016 17:58:16 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=BA=94=E8=AF=A5=E5=9C=A8=E5=B7=A6=E4=BE=A7?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E5=A4=84=E7=9C=8B=E5=88=B0=E8=AE=A8=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E6=96=B0=E5=BB=BA=E5=B8=96=E5=AD=90=E7=9A=84=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_tool_expand.html.erb | 4 ++-- app/views/layouts/base_courses.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/courses/_tool_expand.html.erb b/app/views/courses/_tool_expand.html.erb index 57ad2e570..64a685f4a 100644 --- a/app/views/courses/_tool_expand.html.erb +++ b/app/views/courses/_tool_expand.html.erb @@ -4,7 +4,7 @@ <% if show_nav?(course_board ? course_board.topics.count : 0) %>
  • 讨论区 - <%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %> + <%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if User.current.logged? %>
  • <% unless course_board.children.empty? %> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 7efe06347..19f7694b3 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -69,7 +69,7 @@
  • <% count = course_board ? (course_board.topics.count + Message.where("board_id =? and parent_id is not ?", course_board.id, nil).count) : 0 %> 讨论区<%=count %> - <%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if is_teacher %> + <%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if User.current.logged? %>
  • <%= render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board} %> From d76ce0706e6384b41b65df2f947acc71b98dca44 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 28 Oct 2016 18:04:49 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=A1=B5=E9=9D=A2JS?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 10 +- app/views/issues/_statistics.html.erb | 194 ++++----------------- app/views/issues/_statistics_all.html.erb | 35 ++++ app/views/issues/_statistics_lock.html.erb | 37 ++++ app/views/issues/_statistics_open.html.erb | 37 ++++ app/views/issues/index.html.erb | 2 +- 6 files changed, 152 insertions(+), 163 deletions(-) create mode 100644 app/views/issues/_statistics_all.html.erb create mode 100644 app/views/issues/_statistics_lock.html.erb create mode 100644 app/views/issues/_statistics_open.html.erb diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f59fba784..cfa2e2bf0 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -624,9 +624,17 @@ class IssuesController < ApplicationController @project_sort = 'issues.updated_on asc' end end - + # 搜索结果 @issues_filter = @query.issues(:order => @project_sort) + # if params[:type] == 1 || params[:type].nil? + # @results = @issues_filter + # elsif params[:type] == "2" + # @results = @issues_filter.collect{|result| result.status_id !=5 } + # elsif params[:type] == "3" + # @results = @issues_filter.collect{|result| result.status_id !=5 } + # end + #统计 @results = {} diff --git a/app/views/issues/_statistics.html.erb b/app/views/issues/_statistics.html.erb index a015a12fd..b144b8e6b 100644 --- a/app/views/issues/_statistics.html.erb +++ b/app/views/issues/_statistics.html.erb @@ -1,164 +1,36 @@ -
    -

    issue统计

    -
    -
    -
    - -
      -
    • - <%= link_to "所有#{@issues_filter.count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %> -
    • -
    • - <%= link_to "打开#{@issue_open_count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %> -
    • -
    • - <%= link_to "锁定#{@issue_close_count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %> -
    • -
    -
    - 新建 -
    -
    - - - - - - - - - - - - - - <% @results.each do |k,v|%> - - - - - - - - - - <% end %> - - - - - - - - - - -
    指派给所有需求任务缺陷支持周报
    <%= v[0] %><%= v[2] %><%= v[4] %><%= v[1] %><%= v[3] %><%= v[5] %>
    <%= @alltotal[0] %><%= @alltotal[2] %><%= @alltotal[4] %><%= @alltotal[1] %><%= @alltotal[3] %><%= @alltotal[5] %>
    -
    +
    +

    issue统计

    +
    +
    +
    +
      +
    • + <%= link_to "所有#{@issues_filter.count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %> +
    • +
    • + <%= link_to "打开#{@issue_open_count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %> +
    • +
    • + <%= link_to "锁定#{@issue_close_count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %> +
    • +
    +
    + 新建 +
    +
    + <%= render "issues/statistics_all" %> +
    +
    + <%= render "issues/statistics_open" %> +
    +
    + <%= render "issues/statistics_lock" %> +
    - + + diff --git a/app/views/issues/_statistics_all.html.erb b/app/views/issues/_statistics_all.html.erb new file mode 100644 index 000000000..0ef85057a --- /dev/null +++ b/app/views/issues/_statistics_all.html.erb @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + <% @results.each do |k,v|%> + + + + + + + + + + <% end %> + + + + + + + + + + +
    指派给所有需求任务缺陷支持周报
    <%= v[0] %><%= v[2] %><%= v[4] %><%= v[1] %><%= v[3] %><%= v[5] %>
    <%= @alltotal[0] %><%= @alltotal[2] %><%= @alltotal[4] %><%= @alltotal[1] %><%= @alltotal[3] %><%= @alltotal[5] %>
    \ No newline at end of file diff --git a/app/views/issues/_statistics_lock.html.erb b/app/views/issues/_statistics_lock.html.erb new file mode 100644 index 000000000..f8628144e --- /dev/null +++ b/app/views/issues/_statistics_lock.html.erb @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + <% @results.each do |k,v|%> + <% if v[12] > 0 %> + + + + + + + + + + <% end %> + <% end %> + + + + + + + + + + +
    指派给所有需求任务缺陷支持周报
    <%= v[12] %><%= v[14] %><%= v[16] %><%= v[13] %><%= v[15] %><%= v[17] %>
    <%= @closetotal[0] %><%= @closetotal[2] %><%= @closetotal[4] %><%= @closetotal[1] %><%= @closetotal[3] %><%= @closetotal[5] %>
    \ No newline at end of file diff --git a/app/views/issues/_statistics_open.html.erb b/app/views/issues/_statistics_open.html.erb new file mode 100644 index 000000000..d5eb843f7 --- /dev/null +++ b/app/views/issues/_statistics_open.html.erb @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + <% @results.each do |k,v|%> + <% if v[6] > 0 %> + + + + + + + + + + <% end %> + <% end %> + + + + + + + + + + +
    指派给所有需求任务缺陷支持周报
    <%= v[6] %><%= v[8] %><%= v[10] %><%= v[7] %><%= v[9] %><%= v[11] %>
    <%= @opentotal[0] %><%= @opentotal[2] %><%= @opentotal[4] %><%= @opentotal[1] %><%= @opentotal[3] %><%= @opentotal[5] %>
    \ No newline at end of file diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 7a899f87b..a9f70f999 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -203,7 +203,7 @@ -
    +
      From 9b89b59d60b45bb29bc5e7456c6b505bc17c86af Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 28 Oct 2016 18:16:35 +0800 Subject: [PATCH 07/14] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E7=8F=AD?= =?UTF-8?q?=E6=97=A0=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_group_children_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/_group_children_list.html.erb b/app/views/layouts/_group_children_list.html.erb index 6092272b9..0be36dc64 100644 --- a/app/views/layouts/_group_children_list.html.erb +++ b/app/views/layouts/_group_children_list.html.erb @@ -4,7 +4,7 @@
    • <% count = group.members.count %> <%=count %> - <% if is_teacher %> + <% if User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %> <%= link_to '', search_not_group_member_course_path(@course,:group_id => group.id),:remote => true, :class => "sy_class_add", :title => "添加成员" %> <% end %>
    • From 0dbf8c7a8afcdfbb4db19b1c6c8e5b349b52fba1 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 28 Oct 2016 18:18:14 +0800 Subject: [PATCH 08/14] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=88=86=E7=8F=AD?= =?UTF-8?q?=E6=97=B6=E6=9B=B4=E6=96=B0=E7=8F=AD=E7=BA=A7=E7=9A=84=E5=B7=A6?= =?UTF-8?q?=E4=BE=A7=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/deletegroup.js.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/courses/deletegroup.js.erb b/app/views/courses/deletegroup.js.erb index 39a096c8e..dd61937e0 100644 --- a/app/views/courses/deletegroup.js.erb +++ b/app/views/courses/deletegroup.js.erb @@ -1,3 +1,4 @@ hideModal(); $("#st_groups").html("<%= escape_javascript( render :partial => 'new_groups_name', locals: {:course_groups => @course_groups})%>"); -$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>"); \ No newline at end of file +$("#member_content").html("<%= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @members})%>"); +$("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>"); From 9f702bae1e03f3450b439f0d8224ffef4078af7e Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 28 Oct 2016 18:21:03 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=88=86=E7=8F=AD?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E7=9A=84=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_delete_member_group.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/_delete_member_group.html.erb b/app/views/courses/_delete_member_group.html.erb index 03f4dda56..b350b1dc0 100644 --- a/app/views/courses/_delete_member_group.html.erb +++ b/app/views/courses/_delete_member_group.html.erb @@ -1,5 +1,5 @@
      -
      +
      <% if count == 0 %> 确定删除分班吗? <% else %> From d3599602d5d3f0e534fbc9ec7f450bdb9ee88654 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 28 Oct 2016 18:34:06 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E9=93=BE=E6=8E=A5=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 716139a5f..59b398168 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -85,8 +85,8 @@ <% unless @entries.blank? %>
      导出统计结果: - <%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" } %> | - <%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" } %> + <%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week " }, :class => "linkBlue2" %> | + <%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" }, :class => "linkBlue2" %>
      <% end %> <%#= link_to "导出excel", {:controller => 'repositories', :action => 'export_rep_static', :rev => @rev}, :format => 'xls' %> From 557f5d4e26f2fcdca9ea3ffe2b3daf05ec372343 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 28 Oct 2016 18:36:35 +0800 Subject: [PATCH 11/14] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E3=80=81=E6=96=B0=E5=BB=BA=E8=AF=BE=E7=A8=8B=E7=9A=84=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/new.html.erb | 5 ++++- app/views/syllabuses/new.html.erb | 5 +++-- public/javascripts/course.js | 3 +++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 8bff43710..da637320e 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -12,12 +12,15 @@ <%=@syllabus.title %> <% end %> +
      +
    • - +
      +
    • 正确示例:计算机系2016秋季A班
    • diff --git a/app/views/syllabuses/new.html.erb b/app/views/syllabuses/new.html.erb index 2d7efe5c2..db68f2268 100644 --- a/app/views/syllabuses/new.html.erb +++ b/app/views/syllabuses/new.html.erb @@ -6,8 +6,9 @@ <%= labelled_form_for @syllabus do |f| %>
    • - - + +
      +
    • 正确示例:软件工程错误示例:2016软件工程
    • diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 696af9d0e..71e817e9f 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -189,11 +189,14 @@ function regex_syllabus_option(str) { var obj = document.getElementById(str + "_syllabus_id"); var syllabus = obj.options[obj.selectedIndex]; if(parseInt(syllabus.value) == 0) { + $("#"+str+"_course_syllabus_notice").show(); return false; } else{ + $("#"+str+"_course_syllabus_notice").hide(); return true; } } else { + $("#"+str+"_course_syllabus_notice").hide(); return true; } } From 6a113bdd7e7e41fb1abea3852801109c561c8ab2 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 28 Oct 2016 18:57:37 +0800 Subject: [PATCH 12/14] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E4=B8=80?= =?UTF-8?q?=E5=91=A8=E7=BB=9F=E8=AE=A1=E5=AF=BC=E5=87=BA=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 59b398168..bca79fc07 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -85,7 +85,7 @@ <% unless @entries.blank? %>
      导出统计结果: - <%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week " }, :class => "linkBlue2" %> | + <%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" }, :class => "linkBlue2" %> | <%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" }, :class => "linkBlue2" %>
      <% end %> From c64822d7a1f550d068cfab6b039116103f3b0de7 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 28 Oct 2016 19:05:39 +0800 Subject: [PATCH 13/14] =?UTF-8?q?=E6=9C=AA=E6=8C=87=E6=B4=BE=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/projects/_act_issues.html.erb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/projects/_act_issues.html.erb b/app/views/projects/_act_issues.html.erb index e7b9761ff..022144364 100644 --- a/app/views/projects/_act_issues.html.erb +++ b/app/views/projects/_act_issues.html.erb @@ -46,12 +46,10 @@
      指派给   - <% unless activity.assigned_to_id.nil? %> - <% if activity.try(:assigned_to).try(:realname) == ' ' %> - <%= link_to activity.try(:assigned_to) ? activity.try(:assigned_to) : "未指派", user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> - <% else %> - <%= link_to activity.try(:assigned_to) ? activity.try(:assigned_to).try(:realname) : "未指派", user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> - <% end %> + <% if activity.assigned_to_id.blank? || activity.assigned_to_id == 0 %> + 未指派 + <% else %> + <%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> <% end %>
      From 00784e65873c5e0c4038284767bf8f5ee7c93af7 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 28 Oct 2016 19:13:09 +0800 Subject: [PATCH 14/14] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E6=8C=87=E6=B4=BE=E7=BB=99=E4=B8=BA=E7=A9=BA=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E5=8E=BB=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_project_issue.html.erb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 1a5577ec5..8a860723e 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -59,12 +59,10 @@
      指派给   - <% unless activity.assigned_to_id.nil? %> - <% if activity.try(:assigned_to).try(:realname) == ' ' %> - <%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> - <% else %> - <%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> - <% end %> + <% if activity.assigned_to_id.blank? || activity.assigned_to_id == 0 %> + 未指派 + <% else %> + <%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> <% end %>