Merge branch 'develop' into dev_newproject
This commit is contained in:
commit
e7811fdee5
|
@ -227,7 +227,15 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
|
||||
def deletegroup
|
||||
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
|
||||
|
|
|
@ -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 = {}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -39,10 +39,18 @@ class WatchersController < ApplicationController
|
|||
else
|
||||
|
||||
end
|
||||
|
||||
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"
|
||||
render_404
|
||||
|
@ -71,10 +79,17 @@ class WatchersController < ApplicationController
|
|||
@action = 'fans'
|
||||
else
|
||||
end
|
||||
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"
|
||||
render_404
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<br>
|
||||
<div style='width:380px;text-align:center;font-family: "微软雅黑","宋体"' class="f14">
|
||||
<% if count == 0 %>
|
||||
确定删除分班吗?
|
||||
<% else %>
|
||||
已有学生加入本分班,删除之后,这些学生将处于未分班状态
|
||||
您是否确定删除该分班
|
||||
<% end %>
|
||||
</div>
|
||||
</br>
|
||||
<div style='width:164px; margin:0 auto; text-align:center; font-family: "微软雅黑","宋体"'>
|
||||
<%=link_to '确定', deletegroup_course_path(:group_id => group_id), :method => 'delete', :remote => true, :class => 'Blue-btn fl', :method => 'delete'%>
|
||||
<a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a>
|
||||
</div>
|
|
@ -10,20 +10,27 @@
|
|||
|
||||
<% unless course_groups.nil? %>
|
||||
<% course_groups.each do |group| %>
|
||||
<script>
|
||||
function delete_group_<%= group.id%>(){
|
||||
var htmlvalue = '<%=escape_javascript(render :partial => 'delete_member_group', :locals => {:group_id => group.id, :count => group.members.count}) %>';
|
||||
pop_up_box(htmlvalue, 400);
|
||||
}
|
||||
</script>
|
||||
<%# group_name = " #{ group.name}( <span class='c_red'>#{group.members.count.to_s}人</span>)".html_safe %>
|
||||
<li class="fl sy_fenban_list clear mr10 mb10">
|
||||
<%= 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}')"%>
|
||||
<span class="fl sy_cgrey mr5">(<%=group.members.count.to_s %>人)</span>
|
||||
<% if @canShowCode%>
|
||||
<a href="javascript:void(0)" class="sy_icons_edit fl" onclick="$('#edit_group_name').val('<%= group.name%>');$('#edit_group_id').val('<%= group.id%>');$('#edit_group_form').slideToggle();"></a>
|
||||
<% 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%>
|
||||
<a href="javascript:void(0)" onClick="alert('温馨提示:已有学生加入该班级,不能删除该班级,仅可编辑班级名称。');" class="sy_icons_del fl"></a>
|
||||
<% end%>
|
||||
<!--<a href="javascript:void(0)" onClick="pop_up_box('<%#=escape_javascript(render :partial => 'delete_no_member_group', :locals => {:group_id => group.id}) %>');" class="sy_icons_del fl"></a>-->
|
||||
<%# else%>
|
||||
<a href="javascript:void(0)" onClick="delete_group_<%= group.id%>();" class="sy_icons_del fl"></a>
|
||||
<%#end%>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<% if show_nav?(course_board ? course_board.topics.count : 0) %>
|
||||
<li>
|
||||
<a href="<%=course_boards_path(@course) %>">讨论区</a>
|
||||
<%= 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? %>
|
||||
</li>
|
||||
<% unless course_board.children.empty? %>
|
||||
<ul class="sub-menu">
|
||||
|
@ -12,7 +12,7 @@
|
|||
<li>
|
||||
<% count = board ? (board.topics.count + Message.where("board_id =? and parent_id is not ?", board.id, nil).count) : 0 %>
|
||||
<a href="<%=course_boards_path(@course, :board_id =>board.id) %>"><%=board.name %><span><%=count %></span></a>
|
||||
<%= link_to( "",course_boards_path(@course, :board_id =>board.id, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
|
||||
<%= link_to( "",course_boards_path(@course, :board_id =>board.id, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") if User.current.logged? %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -1,2 +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})%>");
|
||||
$("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>");
|
||||
|
|
|
@ -12,12 +12,15 @@
|
|||
<span><%=@syllabus.title %></span>
|
||||
<input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" />
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<span class="c_red ml80" id="new_course_syllabus_notice" style="display: none;">请先选择课程</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="mt10 ml45">
|
||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||
<input type="text" name="course[name]" id="new_course_name" class="courses_input w289" maxlength="100" placeholder="例如:计算机系2016秋季A班" onkeyup="regex_course_name('new');">
|
||||
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
|
||||
<div class="cl"></div>
|
||||
<span class="c_red ml80" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml125 mb5 fontGrey3"><span class="success-icon mr25">正确示例:计算机系2016秋季A班</span></li>
|
||||
|
|
|
@ -4,161 +4,33 @@
|
|||
</div>
|
||||
<div class="clear">
|
||||
<div>
|
||||
<!-- <ul>
|
||||
<li>所有<a style="cursor: pointer;" onclick="showResultAll();" class="issues_greycirbg_btn "><%#= @issues_filter.count %></a></li>
|
||||
<li>开启<a style="cursor: pointer;" onclick="showResultOpen();" class="issues_greycirbg_btn "><%#= @issue_open_count %></a></li>
|
||||
<li>关闭<a style="cursor: pointer;" onclick="showResultClose();" class="issues_greycirbg_btn "><%#= @issue_close_count %></a></li>
|
||||
</ul>-->
|
||||
<ul class="new_roadmap_nav fl" >
|
||||
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
|
||||
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1' onclick='showResultAll();'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
|
||||
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
|
||||
</li>
|
||||
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
|
||||
<%= link_to "打开<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2' onclick='showResultOpen();'>#{@issue_open_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
|
||||
<%= link_to "打开<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@issue_open_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
|
||||
</li>
|
||||
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
|
||||
<%= link_to "锁定<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'onclick='showResultClose();'>#{@issue_close_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
|
||||
<%= link_to "锁定<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@issue_close_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr mt10" >新建</a>
|
||||
</div>
|
||||
<div id="result_all" class="">
|
||||
<table class="sy_new_table " cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="dis p10" style="width:166px;">指派给</td>
|
||||
<td class="w130">所有</td>
|
||||
<td class="w130">需求</td>
|
||||
<td class="w130">任务</td>
|
||||
<td class="w130">缺陷</td>
|
||||
<td class="w130">支持</td>
|
||||
<td class="w130">周报</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @results.each do |k,v|%>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
||||
<td class="w130"><%= v[0] %></td>
|
||||
<td class="w130"><%= v[2] %></td>
|
||||
<td class="w130"><%= v[4] %></td>
|
||||
<td class="w130"><%= v[1] %></td>
|
||||
<td class="w130"><%= v[3] %></td>
|
||||
<td class="w130"><%= v[5] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
||||
<td class="w130"><%= @alltotal[0] %></td>
|
||||
<td class="w130"><%= @alltotal[2] %></td>
|
||||
<td class="w130"><%= @alltotal[4] %></td>
|
||||
<td class="w130"><%= @alltotal[1] %></td>
|
||||
<td class="w130"><%= @alltotal[3] %></td>
|
||||
<td class="w130"><%= @alltotal[5] %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="merge_record_1" class="">
|
||||
<%= render "issues/statistics_all" %>
|
||||
</div>
|
||||
|
||||
<div id="result_open" style="display: none">
|
||||
<table class="sy_new_table " cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="dis p10" style="width:166px;">指派给</td>
|
||||
<td class="w130">所有</td>
|
||||
<td class="w130">需求</td>
|
||||
<td class="w130">任务</td>
|
||||
<td class="w130">缺陷</td>
|
||||
<td class="w130">支持</td>
|
||||
<td class="w130">周报</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @results.each do |k,v|%>
|
||||
<% if v[6] > 0 %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
||||
<td class="w130"><%= v[6] %></td>
|
||||
<td class="w130"><%= v[8] %></td>
|
||||
<td class="w130"><%= v[10] %></td>
|
||||
<td class="w130"><%= v[7] %></td>
|
||||
<td class="w130"><%= v[9] %></td>
|
||||
<td class="w130"><%= v[11] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
||||
<td class="w130"><%= @opentotal[0] %></td>
|
||||
<td class="w130"><%= @opentotal[2] %></td>
|
||||
<td class="w130"><%= @opentotal[4] %></td>
|
||||
<td class="w130"><%= @opentotal[1] %></td>
|
||||
<td class="w130"><%= @opentotal[3] %></td>
|
||||
<td class="w130"><%= @opentotal[5] %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="merge_record_2" class="undis">
|
||||
<%= render "issues/statistics_open" %>
|
||||
</div>
|
||||
|
||||
<div id="result_close" style="display: none">
|
||||
<table class="sy_new_table " cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="dis p10" style="width:166px;">指派给</td>
|
||||
<td class="w130">所有</td>
|
||||
<td class="w130">需求</td>
|
||||
<td class="w130">任务</td>
|
||||
<td class="w130">缺陷</td>
|
||||
<td class="w130">支持</td>
|
||||
<td class="w130">周报</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @results.each do |k,v|%>
|
||||
<% if v[12] > 0 %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
||||
<td class="w130"><%= v[12] %></td>
|
||||
<td class="w130"><%= v[14] %></td>
|
||||
<td class="w130"><%= v[16] %></td>
|
||||
<td class="w130"><%= v[13] %></td>
|
||||
<td class="w130"><%= v[15] %></td>
|
||||
<td class="w130"><%= v[17] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
||||
<td class="w130"><%= @closetotal[0] %></td>
|
||||
<td class="w130"><%= @closetotal[2] %></td>
|
||||
<td class="w130"><%= @closetotal[4] %></td>
|
||||
<td class="w130"><%= @closetotal[1] %></td>
|
||||
<td class="w130"><%= @closetotal[3] %></td>
|
||||
<td class="w130"><%= @closetotal[5] %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div id="merge_record_3" class="undis">
|
||||
<%= render "issues/statistics_lock" %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function showResultAll(){
|
||||
$("#result_all").show();
|
||||
$("#result_open").hide();
|
||||
$("#result_close").hide();
|
||||
}
|
||||
function showResultOpen(){
|
||||
$("#result_all").hide();
|
||||
$("#result_open").show();
|
||||
$("#result_close").hide();
|
||||
|
||||
}
|
||||
function showResultClose(){
|
||||
$("#result_all").hide();
|
||||
$("#result_open").hide();
|
||||
$("#result_close").show();
|
||||
}
|
||||
//issues列表
|
||||
// 导航选择效果
|
||||
function g(o){
|
||||
return document.getElementById(o);
|
||||
}
|
||||
|
@ -168,12 +40,12 @@
|
|||
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
|
||||
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
|
||||
g('new_roadmap_num_'+i).className='new_roadmap_nav_tagnomal';
|
||||
g('new_roadmap_content_'+i).className='undis';
|
||||
g('merge_record_'+i).className='undis';
|
||||
}
|
||||
g('new_roadmap_nav_'+n).className='new_roadmap_nav_hover';
|
||||
g('new_roadmap_type_'+n).className='new_roadmap_type_hover';
|
||||
g('new_roadmap_num_'+n).className='new_roadmap_nav_taghover';
|
||||
g('new_roadmap_content_'+n).className='dis';
|
||||
g('merge_record_'+n).className='dis';
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<table class="sy_new_table " cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="dis p10" style="width:166px;">指派给</td>
|
||||
<td class="w130">所有</td>
|
||||
<td class="w130">需求</td>
|
||||
<td class="w130">任务</td>
|
||||
<td class="w130">缺陷</td>
|
||||
<td class="w130">支持</td>
|
||||
<td class="w130">周报</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @results.each do |k,v|%>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
||||
<td class="w130"><%= v[0] %></td>
|
||||
<td class="w130"><%= v[2] %></td>
|
||||
<td class="w130"><%= v[4] %></td>
|
||||
<td class="w130"><%= v[1] %></td>
|
||||
<td class="w130"><%= v[3] %></td>
|
||||
<td class="w130"><%= v[5] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
||||
<td class="w130"><%= @alltotal[0] %></td>
|
||||
<td class="w130"><%= @alltotal[2] %></td>
|
||||
<td class="w130"><%= @alltotal[4] %></td>
|
||||
<td class="w130"><%= @alltotal[1] %></td>
|
||||
<td class="w130"><%= @alltotal[3] %></td>
|
||||
<td class="w130"><%= @alltotal[5] %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -0,0 +1,37 @@
|
|||
<table class="sy_new_table " cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="dis p10" style="width:166px;">指派给</td>
|
||||
<td class="w130">所有</td>
|
||||
<td class="w130">需求</td>
|
||||
<td class="w130">任务</td>
|
||||
<td class="w130">缺陷</td>
|
||||
<td class="w130">支持</td>
|
||||
<td class="w130">周报</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @results.each do |k,v|%>
|
||||
<% if v[12] > 0 %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
||||
<td class="w130"><%= v[12] %></td>
|
||||
<td class="w130"><%= v[14] %></td>
|
||||
<td class="w130"><%= v[16] %></td>
|
||||
<td class="w130"><%= v[13] %></td>
|
||||
<td class="w130"><%= v[15] %></td>
|
||||
<td class="w130"><%= v[17] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
||||
<td class="w130"><%= @closetotal[0] %></td>
|
||||
<td class="w130"><%= @closetotal[2] %></td>
|
||||
<td class="w130"><%= @closetotal[4] %></td>
|
||||
<td class="w130"><%= @closetotal[1] %></td>
|
||||
<td class="w130"><%= @closetotal[3] %></td>
|
||||
<td class="w130"><%= @closetotal[5] %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -0,0 +1,37 @@
|
|||
<table class="sy_new_table " cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="dis p10" style="width:166px;">指派给</td>
|
||||
<td class="w130">所有</td>
|
||||
<td class="w130">需求</td>
|
||||
<td class="w130">任务</td>
|
||||
<td class="w130">缺陷</td>
|
||||
<td class="w130">支持</td>
|
||||
<td class="w130">周报</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @results.each do |k,v|%>
|
||||
<% if v[6] > 0 %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
||||
<td class="w130"><%= v[6] %></td>
|
||||
<td class="w130"><%= v[8] %></td>
|
||||
<td class="w130"><%= v[10] %></td>
|
||||
<td class="w130"><%= v[7] %></td>
|
||||
<td class="w130"><%= v[9] %></td>
|
||||
<td class="w130"><%= v[11] %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<tr>
|
||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
||||
<td class="w130"><%= @opentotal[0] %></td>
|
||||
<td class="w130"><%= @opentotal[2] %></td>
|
||||
<td class="w130"><%= @opentotal[4] %></td>
|
||||
<td class="w130"><%= @opentotal[1] %></td>
|
||||
<td class="w130"><%= @opentotal[3] %></td>
|
||||
<td class="w130"><%= @opentotal[5] %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -4,7 +4,7 @@
|
|||
<li id="course_group_<%=group.id %>">
|
||||
<% count = group.members.count %>
|
||||
<a href="<%= group_member_course_path(course, :group_id => group.id) %>"><font class="hidden dis" style="max-width: 120px;"><%=group.name %></font><span style="vertical-align: top;"><%=count %></span></a>
|
||||
<% 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 %>
|
||||
</li>
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
<li id="sy_02" class="sy_icons_boards">
|
||||
<% count = course_board ? (course_board.topics.count + Message.where("board_id =? and parent_id is not ?", course_board.id, nil).count) : 0 %>
|
||||
<a href="<%=course_boards_path(@course) %>">讨论区<span><%=count %></span></a>
|
||||
<%= 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? %>
|
||||
</li>
|
||||
<div id="board_children_list">
|
||||
<%= render :partial => 'layouts/board_children_list', :locals => {:course_board => course_board} %>
|
||||
|
|
|
@ -46,12 +46,10 @@
|
|||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostAssignTo"><span class="fontGrey3">指派给</span>
|
||||
<% 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" %>
|
||||
<% if activity.assigned_to_id.blank? || activity.assigned_to_id == 0 %>
|
||||
<a class="newsBlue mr15">未指派</a>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:assigned_to) ? activity.try(:assigned_to).try(:realname) : "未指派", user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDeadline fl">
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<!--关注项目-->
|
||||
<li class="mr5 fl">
|
||||
<%= 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' %>
|
||||
</li>
|
||||
<!--加入项目-->
|
||||
<li class="mr5 fl">
|
||||
|
|
|
@ -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") %>
|
||||
<span class="fl"><div class="fb fontGrey3 mr5 fl hidden maxwidth150"><%=link_to user_commit_rep(@changesets_latest_coimmit.author_email), user_path(user_commit_rep(@changesets_latest_coimmit.author_email)) %></div>
|
||||
<div class="fl">提交于<%= time_tag(@changesets_latest_coimmit.created_at) %>:</div>
|
||||
<div class="fl">提交于 <%= time_tag(@changesets_latest_coimmit.created_at) %> 前:</div>
|
||||
<div class="commit_content_dec fl" title="<%= @changesets_latest_coimmit.comments %>"><%= @changesets_latest_coimmit.message %></div>
|
||||
</span>
|
||||
<% else %>
|
||||
|
@ -85,8 +85,8 @@
|
|||
<% unless @entries.blank? %>
|
||||
<div class="fr">
|
||||
<a style="color: #7f7f7f;">导出统计结果:</a>
|
||||
<%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" } %> <a style="color: #7f7f7f;">|</a>
|
||||
<%= 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" %> <a style="color: #7f7f7f;">|</a>
|
||||
<%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" }, :class => "linkBlue2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%#= link_to "导出excel", {:controller => 'repositories', :action => 'export_rep_static', :rev => @rev}, :format => 'xls' %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="fl" style="padding-bottom:10px; width:720px;">
|
||||
<div class="fl pr" style="padding-bottom:10px; width:720px;">
|
||||
<span class="c_dark f14 fb fl mr15">
|
||||
作品
|
||||
<font class="f12 c_red">
|
||||
|
@ -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%>
|
||||
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" onclick="show_or_hide_info();" style="display: none">[ 显示作业信息 ]</a> </span>
|
||||
<%# 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") %>
|
||||
<!--<div class="mt5 fr">-->
|
||||
<!--<a href="javascript:void(0);" class="memberBtn fl mt3 mr15" title="添加小组成员" onclick="add_or_delete_group_member();">合作成员</a>-->
|
||||
<!--</div>-->
|
||||
<%# end %>
|
||||
<% if @is_teacher && @homework.homework_type == 3 %>
|
||||
<div class="group_work_tip_box fontGrey2">
|
||||
<em></em>
|
||||
<span></span>
|
||||
<p class="mt5 mb5 break_word">大作品评分即组长的评分<br/>
|
||||
请先完成大作品评分,系统将把大作品<br/>评分做为每个组员的初始分值,您需<br/>要在此基础上对组员评分进行手动调整
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
</script>
|
|
@ -7,7 +7,8 @@
|
|||
<li class="ml45">
|
||||
<label><span class="c_red">*</span> 课程名称 :</label>
|
||||
<input type="text" name="title" id="new_syllabus_name" class="name_input" placeholder="例如:软件工程" maxlength="100" onkeyup="regex_syllabus_name();">
|
||||
<span class="c_red" id="new_syllabus_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
|
||||
<div class="cl"></div>
|
||||
<span class="c_red ml80" id="new_syllabus_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li class="ml125 fontGrey3"><span class="success-icon mr25">正确示例:软件工程</span><span class="error-icon">错误示例:2016软件工程</span></li>
|
||||
|
|
|
@ -59,12 +59,10 @@
|
|||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostAssignTo"><span class="fontGrey3">指派给</span>
|
||||
<% 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" %>
|
||||
<% if activity.assigned_to_id.blank? || activity.assigned_to_id == 0 %>
|
||||
<a class="newsBlue mr15">未指派</a>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
<%= link_to activity.try(:assigned_to).show_name, user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostDeadline fl">
|
||||
|
|
|
@ -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 %>
|
|
@ -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 %>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue