Merge branch 'develop' into rep_quality

This commit is contained in:
daiao 2016-09-28 11:01:09 +08:00
commit f19c9f4890
25 changed files with 122 additions and 116 deletions

View File

@ -58,27 +58,26 @@ class IssuesController < ApplicationController
include ApplicationHelper
def index
# 为了性能所有用了两种模式issue的@query查询所有的没有优势
# 但是对过滤条件很有有时
if params[:set_filter] != "1"
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
@issues_filter = Issue.where(:project_id => @project.id).order('updated_on desc')
if User.current.member_of?(@project)
@issues_filter = Issue.where(:project_id => @project.id).order('updated_on desc')
else
@issues_filter = Issue.where(:project_id => @project.id, :is_private => 0).order('updated_on desc')
end
open_and_close_num(@project)
@issue_count = @issues_filter.count
@limit = 10
@is_remote = true
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
@offset ||= @issue_pages.offset
@issues = paginateHelper @issues_filter, @limit
# if params[:set_filter]
# @set_filter = params[:set_filter]
# end
# @issue_count_by_group = @query.issue_count_by_group
respond_to do |format|
format.js
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
format.api {Issue.load_visible_relations(@issues) if include_in_api_response?('relations')}
# format.json { render :json => @issues.map { |issue| issue.to_json}} #:json => @issues.map { |issue| issue.to_json}
# format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
# format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') }
# format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') }
format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls"
send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
@ -88,20 +87,8 @@ class IssuesController < ApplicationController
sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria)
sort_update(@query.sortable_columns)
@query.sort_criteria = sort_criteria.to_a
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
if @query.valid?
# case params[:format]
# when 'csv', 'pdf'
# @limit = 10#Setting.issues_export_limit.to_i
# when 'atom'
# @limit = 10#Setting.feeds_limit.to_i
# when 'xml', 'json'
# @offset, @limit = api_offset_and_limit({:limit => 10})
# else
# @limit = 10#per_page_option
# end
@tracker_id = params[:tracker_id]
@assign_to_id = params[:assigned_to_id]
@author_id = params[:author_id]
@ -111,9 +98,6 @@ class IssuesController < ApplicationController
@fixed_version_id = params[:fixed_version_id]
@issue_count = @query.issue_count
@test = params[:test]
# @issue_pages = Paginator.new @issue_count, @limit, params['page']
# params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1
# @offset ||= @issue_pages.offset
@project_sort = 'issues.updated_on desc'
if params[:test] != "0"
case @test
@ -127,6 +111,7 @@ class IssuesController < ApplicationController
@project_sort = 'issues.updated_on asc'
end
end
open_and_close_num(@project)
@issues_filter_assign_count = @query.issues.select{|issue| issue.assigned_to_id == User.current.id }.count
@issues_filter_author_count = @query.issues.select{|issue| issue.author_id == User.current.id }.count
@issues_filter = @query.issues(:order => @project_sort)
@ -135,35 +120,17 @@ class IssuesController < ApplicationController
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
@offset ||= @issue_pages.offset
@issues = paginateHelper @issues_filter, @limit
# if params[:set_filter]
# @set_filter = params[:set_filter]
# end
# @issue_count_by_group = @query.issue_count_by_group
if params[:export_issue_hidden] == "1"
# index(:format=>'xls', :export_issue_hidden => 0)
params[:export_issue_hidden] = "0"
redirect_to project_issues_path(:project_id => @project, :format => 'xls')
# respond_to do |format|
# format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls"
# send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
# return
# }
# return
# end
else
respond_to do |format|
format.js
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
format.api {Issue.load_visible_relations(@issues) if include_in_api_response?('relations')}
# format.json { render :json => @issues.map { |issue| issue.to_json}} #:json => @issues.map { |issue| issue.to_json}
format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') }
format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') }
format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls"
send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
end
respond_to do |format|
format.js
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
format.api {Issue.load_visible_relations(@issues) if include_in_api_response?('relations')}
# format.json { render :json => @issues.map { |issue| issue.to_json}} #:json => @issues.map { |issue| issue.to_json}
format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') }
format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') }
format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls"
send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
}
end
else
respond_to do |format|
@ -174,12 +141,21 @@ class IssuesController < ApplicationController
end
end
end
rescue ActiveRecord::RecordNotFound
render_404
end
# 获取issue的开启统计数
def open_and_close_num project
if User.current.member_of?(project)
@issue_open_count = Issue.where("project_id=#{project.id} and status_id in (1,2,3,4,6)").count
@issue_close_count = Issue.where(:project_id => project.id, :status_id => 5 ).count
else
@issue_open_count = Issue.where("project_id=#{project.id} and status_id in (1,2,3,4,6) and is_private = 0").count
@issue_close_count = Issue.where(:project_id => project.id, :status_id => 5, :is_private => 0).count
end
end
def show
# 打开编辑内容
@is_edit = true unless params[:edit].nil?

View File

@ -106,13 +106,13 @@ class StudentWorkController < ApplicationController
rescue Timeout::Error
tEndtime = Time.now
tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000
logger.debug "program_test_ex user wait time = #{tUsedtime} 毫秒"
logger.info "program_test_ex user wait time = #{tUsedtime} 毫秒"
#status 0:答案正确 -5program_test_ex 函数出错 -4judge代码出错 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时
resultObj[:status] = -3
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>-3,:wait_time=>tUsedtime,:student_work_id=>student_work.id)
rescue => e
#-4 judge代码 出错
logger.debug "program_test_error #{e}"
logger.info "program_test_error #{e}"
resultObj[:status] = -4
tmpstatus = -4
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id)
@ -217,7 +217,7 @@ class StudentWorkController < ApplicationController
end
rescue
#-5 program_test_ex 函数出错
logger.debug "program_test_error 2"
logger.info "program_test_error 2"
resultObj[:status] = -5
tmpstatus = -5
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id)

View File

@ -60,9 +60,9 @@ module IssuesHelper
def states_done_ratio(issue)
done_ratio = issue.done_ratio
if done_ratio == 100
"<span class='c_green'>#{l(:label_done_ratio_endding)}</span>".html_safe
"<span class='c_green' style='display:inline-block;'>#{l(:label_done_ratio_endding)}</span>".html_safe
else
"<span class='c_orange'>#{l(:label_done_ratio_doing)}</span>".html_safe
"<span class='c_orange' style='display:inline-block;'>#{l(:label_done_ratio_doing)}</span>".html_safe
end
end

View File

@ -5,12 +5,6 @@
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
:method => :get, :id => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %>
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
</div>
</fieldset>
<p style="float:right;">
<%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %>
</p>

View File

@ -24,10 +24,9 @@
<span class="tip"><%= render_issue_tooltip i %></span>
</div>
<% else %>
<span class="icon icon-package">
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_version i%>
</span>
<span class="icon icon-package"></span>
<%= h("#{i.project} -") unless @project && @project == i.project %>
<%= link_to_version i%>
<% end %>
<% end %>
</td>

View File

@ -7,9 +7,9 @@
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
div.respond-form .reply_btn{margin-left:625px;margin-top:5px;}
div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
div.recall_con .reply_btn{margin-left:585px;margin-top:5px;}
/*.ke-container{height: 80px !important;}*/
</style>
<%= content_for(:header_tags) do %>
@ -19,7 +19,7 @@
<script >
init_KindEditor_data('',80);
</script>
<div class="msg_box fl mb10" id='leave-message'>
<div class="msg_box fl mb10" id='leave-message' style="width:730px;">
<h4><%= l(:label_leave_message) %></h4>
<% if !User.current.logged?%>

View File

@ -5,7 +5,7 @@
<div class="ping_dispic">
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
</div>
<div class="ping_discon upload_img" style="width: 610px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
<div class="ping_discon upload_img" style="width: 670px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
<div class="ping_distop f14">
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
<span>

View File

@ -2,7 +2,7 @@
<!-- <#%= stylesheet_link_tag 'css', :media => 'all' %> -->
<div class="courseRSide fl">
<div class="project_r_h">
<div class="project_r_h" style="width:730px;">
<h2 class="project_h2"><%= l(:label_contest_userresponse) %></h2>
</div>

View File

@ -0,0 +1 @@
<span class="issues_nav_tag ml5" ><%= @issue_count %></span>

View File

@ -47,12 +47,30 @@
// });
}
function remote_function_export() {
$("#export_issue_hidden").attr("value","1");
// $("#issue_query_form").attr("format","xls");
$("#issue_query_form").submit();
function remote_function_export(project_id) {
// $("#export_issue_hidden").attr("value","1");
// $("#issue_query_form").attr("set_filter","1");
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues.xls");
// $("#issue_query_form").submit();
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues");
// $("#issue_query_form").removeAttr("format");
$("#export_issue_hidden").attr("value","0");
// $("#issue_query_form").attr("set_filter","0");
// $("#export_issue_hidden").attr("value","0");
var tracker_id = $("#tracker_id").attr("value");
var subject = $("#v_subject").attr("value");
var assigned_to_id = $("#assigned_to_id").attr("value");
var fixed_version_id = $("#fixed_version_id").attr("value");
var status_id = $("#status_id").attr("value");
var done_ratio = $("#done_ratio").attr("value");
var test = $("#test").attr("value");
var author_id = $("#author_id").attr("value");
var issue_create_date_start = $("#issue_date_start_issue_export").attr("value");
var issue_create_date_end = $("#issue_date_end_issue_export").attr("value");
$("#sendexcel").attr("href","/projects/"+project_id+"/issues.xls?export=true&set_filter=1&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end);
///projects/1811/issues.xls?export=true&set_filter=1
}
// function nh_reset_form() {
@ -105,15 +123,15 @@
<div class="issues_statistics fl">
<ul>
<li>所有<a class="issues_greycirbg_btn "><%= @project.project_score.issue_num %></a></li>
<li>开启<a class="issues_greycirbg_btn "><%#= @issues_filter_assign_count %><%= @project.issues.where('status_id in (1,2,3,4,6)').visible.all.count %></a></li>
<li>关闭<a class="issues_greycirbg_btn "><%#= @issues_filter_author_count %><%= @project.issues.where(:status_id => 5 ).visible.all.count %></a></li>
<li>开启<a class="issues_greycirbg_btn "><%#= @issues_filter_assign_count %><%= @issue_open_count %></a></li>
<li>关闭<a class="issues_greycirbg_btn "><%#= @issues_filter_author_count %><%= @issue_close_count %></a></li>
</ul>
</div><!--issues_statistics end-->
<!--<input type="button" class="hw_btn_blue fr" value="导出EXCEL" onclick="remote_function_export()">-->
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls', :export => true, :set_filter => "1")%>" class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export()">导出EXCEL</a>
<!--<input type="button" class="hw_btn_blue fr" value="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">-->
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls', :export => true, :set_filter => "1")%>" id="sendexcel" class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">导出EXCEL</a>
</div>
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'true', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
<%= hidden_field_tag 'set_filter', '1' %>
<%= hidden_field_tag 'export_issue_hidden', '0' %>
<!--<input id="exprot_issues_hidden" value="0" type="hidden">-->
@ -125,12 +143,12 @@
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="all_reset_form();">清除</a>
<div class="calendar_div fr">
<input name="issue_create_date_end" nhname="date_val" type="hidden"/>
<input id="issue_date_end_issue_export" name="issue_create_date_end" nhname="date_val" type="hidden"/>
<input type="text" nhname="date_show" id="issue_create_date_end_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="结束日期">
<%= calendar_for('issue_create_date_end_show')%>
</div>
<div class="calendar_div fr">
<input name="issue_create_date_start" nhname="date_val" type="hidden"/>
<input id="issue_date_start_issue_export" name="issue_create_date_start" nhname="date_val" type="hidden"/>
<input type="text" nhname="date_show" id="issue_create_date_start_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="开始日期">
<%= calendar_for('issue_create_date_start_show')%>
</div>
@ -141,7 +159,8 @@
<div class="issues_con_list" style="position: relative;">
<ul id="issues_list_nav" >
<li id="issues_list_nav_1" onclick="HoverLi(1);all_reset_form();">
<a href="javascript:void(0);" onclick="all_reset_form();" id="issues_type_1" >所有<span class="issues_nav_tag ml5"><%= @project.project_score.issue_num %></span></a>
<a href="javascript:void(0);" onclick="all_reset_form();" id="issues_type_1" >所有
<span id="issue_filter_all"><%= render :partial => "issues/issue_filter_all" %></span></a>
</li>
<!--li id="issues_list_nav_2" onclick="HoverLi(2);">
<a href="javascript:void(0);" onclick="switch_assign_to(<%#= User.current.id %>)" id="issues_type_2" >指派给我
@ -217,12 +236,7 @@
)
%>
<%#= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]),
{ :include_blank => false,:selected=>@author_id ? @author_id : 0
},
{:onchange=>"remote_function();",:id=>"author_id",:name=>"author_id",:class=>"w90 mr18"}
)
%>

View File

@ -1,6 +1,7 @@
//$("#issue_list").html("<%#= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
$("#issue_assigned_count").html("<%= escape_javascript(render :partial => 'issues/issue_filter') %>");
$("#issue_author_count").html("<%= escape_javascript(render :partial => 'issues/issue_filter_author') %>");
//$("#issue_assigned_count").html("<%#= escape_javascript(render :partial => 'issues/issue_filter') %>");
$("#issue_filter_all").html("<%= escape_javascript(render :partial => 'issues/issue_filter_all') %>");
//$("#issue_author_count").html("<%#= escape_javascript(render :partial => 'issues/issue_filter_author') %>");
$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/all_list',:locals => {:issues => @issues, :query => @query, :issue_pages=> @issue_pages, :issue_count => @issue_count, :project=> @project})%>");
$("#issue_list_pagination").html('<%= pagination_links_full @issue_pages, @issue_count, :issues => @issues, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');

View File

@ -25,13 +25,13 @@
<p class="sy_cgrey">
<span class=" mr15">项目评分:
<% if @project.project_type == 0 %>
<% unless static_project_score(@project.project_score) == 0 %>
<%# unless static_project_score(@project.project_score) == 0 %>
<%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i,
{:controller => 'projects',
:action => 'show_projects_score',
:remote => true,
:id => @project.id}, :class => "sy_cblue" ) %>
<% end %>
<%# end %>
<% end %>
</span>
<span class=" mr15">浏览:<a class="sy_corange"><%= @project.visits.to_i %></a></span>

View File

@ -7,7 +7,7 @@
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
div.respond-form .reply_btn{margin-left:626px;margin-top:5px;}
div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:585px;margin-top:5px;}
</style>

View File

@ -1,4 +1,4 @@
<div class="st_list">
<div class="st_list2">
<div class="st_box">
<a href="#" class="fr fb mb5" >加入时间</a>
<div class="cl"></div><!--st_box_top end-->

View File

@ -1,4 +1,4 @@
<div class="project_r_h">
<div class="project_r_h" style="width:730px;">
<h2 class="project_h2 fl"><%= @subPage_title %></h2>
<% if is_project_manager?(User.current, @project) %>
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
@ -11,3 +11,7 @@
<%= render :partial => @render_file, :locals => {:members => @members} %>
</div>
<script>
$("#RSide").css("width","730px");
</script>

View File

@ -1,7 +1,7 @@
<div class="project_r_h">
<div class="project_r_h" style="width:730px;">
<h2 class="project_h2"><%= l(:label_user_watcher)%></h2>
</div>
<div class="st_list">
<div class="st_list2">
<div class="st_box">
<a href="#" class="fr fb mb5" >加入时间</a>
<div class="cl"></div><!--st_box_top end-->
@ -23,4 +23,8 @@
</div>
</div>
<% html_title(l(:label_followers)) -%>
<% html_title(l(:label_followers)) -%>
<script>
$("#RSide").css("width","730px");
</script>

View File

@ -2,7 +2,7 @@
// $("#ajax-indicator span").text("载入中...");
$("#ajax-indicator").show();
</script>
<div class="project_r_h">
<div class="project_r_h" style="width:730px;">
<h2 class="project_h2">分析结果</h2>
</div>
<ul class="analysis-result-list">
@ -35,4 +35,8 @@
<%#= 数据为空时候界面,待完善 %>
<% end %>
<script>
$("#RSide").css("width","730px");
</script>

View File

@ -1,5 +1,5 @@
<%= javascript_include_tag 'highcharts','highcharts-more' %>
<div class="project_r_h">
<div class="project_r_h" style="width:730px;">
<h2 class="project_h2" style="width:180px;">质量分析</h2>
</div>
@ -161,3 +161,7 @@
</div>
<% end %>
<script>
$("#RSide").css("width","730px");
</script>

View File

@ -22,7 +22,7 @@
<% end %>
<% is_pro = homework.homework_type == 2 && is_teacher %>
<% is_base_group = homework.homework_type == 3 && homework.homework_detail_group.base_on_project == 1 && !is_teacher %>
<% is_base_group = homework.homework_type == 3 && (homework.homework_detail_group.base_on_project == 1 || !(cur_user_works_for_homework(homework).nil?)) && !is_teacher %>
<div class="mt8 mb5">
<%= render :partial => 'users/homework_opr', :locals => {:activity => homework, :is_teacher => is_teacher, :hw_status => 5, :user_activity_id => homework.id} %>
<% if is_pro || is_base_group %>
@ -42,7 +42,7 @@
</div>
<div class="homeworkInfo" id="homeworkInformation">
<div class="">
<div class="homeworkDetail upload_img break_word list_style max_h54" id="homeworkDetail">
<div class="homeworkDetail upload_img break_word list_style" id="homeworkDetail">
<div id="homework_description">
<%= homework.description.html_safe %>
</div>

View File

@ -95,7 +95,9 @@
</div>
<div class="cl"></div>
</div>
<div id="div_user_issue_reply_<%=user_activity_id%>">
<%= render :partial => 'users/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
</div>
</div>
<script type="text/javascript">
$(function(){

View File

@ -11,7 +11,7 @@
<%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %>
<% end %>
</div>
<div class="recall_con f14" style="width:650px;">
<div class="recall_con f14" style="width:630px;">
<% id = 'project_respond_form_'+ reply.id.to_s %>
<%= link_to reply.user.show_name, user_path(reply.user) %>
<%= l(:label_reply_to)%>

View File

@ -623,7 +623,7 @@ zh:
label_course_news_description: '课程必须是高校正式开设的课程,或是围绕特定主题定期发布课程资料的公共开放课程;<br/>如果您想创建一个协作研究空间,请您前往“我的项目”页面创建项目,谢谢!'
label_course_board: 讨论区
label_version: 版本
label_version_new: 新建版本
label_version_new: 新建里程碑
label_close_versions: 关闭已完成的版本
label_confirmation: 确认

View File

@ -1054,10 +1054,12 @@ function showNormalImage(id) {
//无格式的图片不让点击显示大图,显示的话会有问题
var tmpsrc = image.attr('src');
if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {
var element = $("<a></a>").attr("href", image.attr('src'));
image.wrap(element);
$(image).parent().colorbox({rel: 'nofollow', close: "关闭", returnFocus: false});
if(tmpsrc){
if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {
var element = $("<a></a>").attr("href", image.attr('src'));
image.wrap(element);
$(image).parent().colorbox({rel: 'nofollow', close: "关闭", returnFocus: false});
}
}
}
//$('#'+id+' a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); //有图片才将链接变为弹出框

View File

@ -167,7 +167,7 @@ div.thumbnails div {background:#fff;display:inline-block;margin-right:2px;}
/* 里程碑 */
.roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;}
.progress{ width:648px; height:20px; margin-bottom:5px; background:#e9e9e9;}
.closed{ background:#bae0ba; height:20px;}
.closed{ background:#bae0ba;}
.done{ background:#d3edd3; display:block;height:20px;float:left;}
.roadmap_box{ margin-bottom:10px;}
.roadmap_list_ul{border:1px solid #ddd; border-bottom:none; margin-bottom:10px;}

View File

@ -722,6 +722,7 @@ a.wzan_visited{background:url(../images/pic_zan.png) 0 0 no-repeat;}
/* 学生列表*/
.st_list{ width:670px;}
.st_list2{ width:730px;}
.st_search{ }
.st_search span{ font-size:14px; font-weight:bold; color:#606060; margin-right:35px;}
.st_search_input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:220px; padding-left:5px; margin-bottom:5px;}